|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfacets.util.Tracer
facets.core.app.SimpleContenter
public abstract class SimpleContenter
SContenter
that builds a content root with no
viewers.
SimpleContenter
is suitable for content that cannot
(or need not) appear in viewers, being exposed by an arrangement of
simple facets.
The content passed to the constructor is represented to the surface by
targets returned by lazyContentRootElements()
.
Since SimpleContenter
primarily creates content for
DialogSurface
, it provides a basic implementation of
DialogSurface.Contenter
.
Constructor Summary | |
---|---|
SimpleContenter(java.lang.String title)
Unique constructor. |
Method Summary | |
---|---|
void |
applyChanges()
Change content state to match surface state. |
protected abstract void |
attachRootMountFacet(SAreaTarget rootArea)
Attach a facet to the tree headed by root . |
java.awt.Dimension |
contentAreaSize()
Return the panel size needed for the content surface elements. |
SFrameTarget |
contentFrame()
Implements abstract method. |
void |
dialogClosed()
Called once the containing dialog has closed. |
protected abstract STarget[] |
lazyContentRootElements()
Create simple targets representing the content. |
SAreaTarget |
newContentRoot(boolean faceted,
boolean shareSelection)
Implements abstract method. |
void |
reverseChanges()
Restore content to its original state. |
void |
rootRetargeted(SContentRootTargeter t)
Implements interface method. |
void |
setDialog(DialogSurface dialog)
Empty implementation. |
java.lang.String |
title()
Implements abstract method. |
Methods inherited from class facets.util.Tracer |
---|
trace, trace, trace, trace, trace, traceDebug, traceDebug, traceObjectText, traceOutput, traceOutputWithClass |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface facets.core.app.DialogSurface.Contenter |
---|
newContentPanel |
Constructor Detail |
---|
public SimpleContenter(java.lang.String title)
title
- returned by title()
passed to lazyContentRootElements()
Method Detail |
---|
public SAreaTarget newContentRoot(boolean faceted, boolean shareSelection)
Creates a trivial subclass of
DialogSurface.ContentRoot
returning elements
defined in
lazyContentRootElements()
, with (to meet the contract of
SAreaTarget.activeContent()
) a single SFrameTarget
child created from the content.
Note If the SimpleContenter
is to be used in an
AppSurface
this method must be re-implemented to return a
comparable subclass of AppSurface.ContentRoot
.
newContentRoot
in interface SContenter
faceted
- should the area tree have facets attached?shareSelection
- should the new tree frame the existing viewable
SAreaTarget
root of an area tree containing either
the content or viewers for the content; the root should in turn return with
SAreaTarget.newTargeter()
a SContentRootTargeter
for the content
wrapped by the SContenter
.protected abstract STarget[] lazyContentRootElements()
protected abstract void attachRootMountFacet(SAreaTarget rootArea)
root
.
Called by newContentRoot(boolean, boolean)
;
the facet attached should be a suitable MountFacet
for the
facet returned by DialogSurface.Contenter.newContentPanel(SContentRootTargeter)
.
rootArea
- was created in newContentRoot(boolean, boolean)
public void rootRetargeted(SContentRootTargeter t)
Empty impementation.
rootRetargeted
in interface SContenter
t
- will be retargeted on a content root
created by this SContenter
type (not generally by this
instance).public final SFrameTarget contentFrame()
Returns the content passed to the constructor.
contentFrame
in interface SContenter
public final java.lang.String title()
Returns the title passed to the constructor.
title
in interface DialogSurface.Contenter
title
in interface SContenter
title
in interface Titled
null
, non-empty string with no structural whitespacepublic void setDialog(DialogSurface dialog)
setDialog
in interface DialogSurface.Contenter
public void reverseChanges()
DialogSurface.Contenter
reverseChanges
in interface DialogSurface.Contenter
public java.awt.Dimension contentAreaSize()
DialogSurface.Contenter
contentAreaSize
in interface DialogSurface.Contenter
public void applyChanges()
DialogSurface.Contenter
This will generally mean setting content state to that of a buffer storing surface state.
applyChanges
in interface DialogSurface.Contenter
public void dialogClosed()
DialogSurface.Contenter
dialogClosed
in interface DialogSurface.Contenter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |