|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfacets.util.Tracer
facets.core.app.ViewerContenter
facets.facet.app.tree.TreeAppContenter
public final class TreeAppContenter
ViewerContenter that manages content for TreeAppSpecifier.
Effectively a package-private class;
declared public for documentation purposes only.
The code exemplifies 'filling out' the abstract ViewerContenter
to provide real-world functionality.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class facets.core.app.ViewerContenter |
|---|
ViewerContenter.ContentSource |
| Field Summary | |
|---|---|
static int |
TARGETS_CONTENT
Index into return of lazyContentRootElements(SAreaTarget). |
static int |
TARGETS_PANE
Index into return of lazyContentRootElements(SAreaTarget). |
| Fields inherited from class facets.core.app.ViewerContenter |
|---|
VIEWABLE_NONE |
| Method Summary | |
|---|---|
protected void |
attachContentRootFacets(SAreaTarget rootArea)
Attach viewer and area facets to the tree headed by rootArea using a suitable facet builder. |
boolean |
hasChanged()
Implements interface method. |
protected STarget[] |
lazyContentRootElements(SAreaTarget root)
Re-implementation returning pane and extra tree menu targets. |
SHost.FacetLayout |
newContentLayout(SHost host,
SFacet appRoot,
SContentRootTargeter t)
Return a layout of facets that expose a content type. |
protected ViewableFrame |
newContentViewable(java.lang.Object source)
Create a ViewableFrame framing content. |
protected FacetedTarget[] |
newContentViewers(ViewableFrame viewable)
Delegates to TreeAppSpecifier |
void |
saveToSink(java.lang.Object sink)
Attempt to save to a sink. |
boolean |
setSink(java.lang.Object sink)
Attempts to set a data sink for the content. |
FileSpecifier[] |
sinkFileSpecifiers()
Specify file passed to ViewerContenter.saveToSink(Object). |
void |
wasAdded()
Called when the content has been added to the surface. |
| Methods inherited from class facets.core.app.ViewerContenter |
|---|
alignAddedRoot, contentFrame, newAppContentRoot, newContentRoot, newContentRootTitle, newViewableContentRoot, rootRetargeted, sink, title, wasRemoved |
| 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 |
| Field Detail |
|---|
public static final int TARGETS_PANE
lazyContentRootElements(SAreaTarget).
public static final int TARGETS_CONTENT
lazyContentRootElements(SAreaTarget).
| Method Detail |
|---|
protected ViewableFrame newContentViewable(java.lang.Object source)
ViewerContenterViewableFrame framing content.
Called by the first invocation of ViewerContenter.newContentRoot(boolean, boolean),
with the content or source passed to the constructor.
A valid implementation of this method should create default content and/or
content from a file or database connection, possibly using an implementation of
ViewerContenter.ContentSource passed to the constructor.
The ViewableFrame returned will be passed to
ViewerContenter.newContentViewers(ViewableFrame).
Default implementation is an invalid stub.
newContentViewable in class ViewerContentersource - must be capable either of defining or of creating content; it
should not generally be the content itselfprotected FacetedTarget[] newContentViewers(ViewableFrame viewable)
TreeAppSpecifier
newContentViewers in class ViewerContenterviewable - was returned by ViewerContenter.newContentViewable(Object)
and should be returned as the viewable of all
ViewerTargets
constructed in this method.protected void attachContentRootFacets(SAreaTarget rootArea)
ViewerContenterrootArea using a suitable facet builder.
Called by the first invocation of ViewerContenter.newContentRoot(boolean, boolean),
with the SAreaTarget returned by
ViewerContenter.newAppContentRoot(String, FacetedTarget[])
Default implementation is an invalid stub.
attachContentRootFacets in class ViewerContenterrootArea - was returned by ViewerContenter.newContentRoot(boolean, boolean)
public SHost.FacetLayout newContentLayout(SHost host,
SFacet appRoot,
SContentRootTargeter t)
AppSurface.Contenter
host - will generally create the layout, to ensure that it is of
a type known to SHost.setLayout(FacetLayout)appRoot - is attached to the SAreaTarget heading
the application surface area treet - was created by a content root returned by
SContenter.newContentRoot(boolean, boolean)protected STarget[] lazyContentRootElements(SAreaTarget root)
lazyContentRootElements in class ViewerContenterroot - contains the viewers returned by
ViewerContenter.newContentViewers(ViewableFrame).
STarget[] indexable by TARGETS_PANE
and TARGETS_CONTENT; the latter created in
TreeAppSpecifier.newContentRootTargets()public boolean hasChanged()
ViewerContenterDefault returns true.
hasChanged in interface AppSurface.ContenterhasChanged in class ViewerContenterpublic FileSpecifier[] sinkFileSpecifiers()
ViewerContenterViewerContenter.saveToSink(Object).
sinkFileSpecifiers in class ViewerContenterFileSpecifiers; default is invalid stubpublic boolean setSink(java.lang.Object sink)
ViewerContenter
setSink in class ViewerContentersink - becomes the new ViewerContenter.sink()
true by default; return false to signal
unacceptable sink
public void saveToSink(java.lang.Object sink)
throws java.io.IOException
ViewerContenterDefault is invalid stub.
saveToSink in class ViewerContentersink - typically a file
java.io.IOExceptionpublic void wasAdded()
AppSurface.Contenter
wasAdded in interface AppSurface.ContenterwasAdded in class ViewerContenter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||