facets.facet.app
Class FacetDialogSurface.MultiPaged

java.lang.Object
  extended by facets.util.Tracer
      extended by facets.core.app.DialogSurface
          extended by facets.facet.app.FacetDialogSurface
              extended by facets.facet.app.FacetDialogSurface.MultiPaged
All Implemented Interfaces:
SSurface, Notifiable, Titled
Enclosing class:
FacetDialogSurface

public abstract static class FacetDialogSurface.MultiPaged
extends FacetDialogSurface

FacetDialogSurface for multi-page dialogs.


Nested Class Summary
 
Nested classes/interfaces inherited from class facets.facet.app.FacetDialogSurface
FacetDialogSurface.MultiPaged
 
Nested classes/interfaces inherited from class facets.core.app.DialogSurface
DialogSurface.Contenter, DialogSurface.ContentRoot, DialogSurface.DialogActions
 
Field Summary
static int MULTI_AREA_PAGES
           
static int MULTI_AREA_TREE
           
 
Fields inherited from class facets.facet.app.FacetDialogSurface
ff
 
Fields inherited from class facets.core.app.DialogSurface
app, AT_NOT_SET, TRIMMINGS_TAB, TRIMMINGS_TREE
 
Constructor Summary
FacetDialogSurface.MultiPaged(FacetAppSurface app, DialogHost host, java.lang.String title, DialogSurface.DialogActions actions, DialogSurface.Contenter[] contents)
           
 
Method Summary
protected  void attachSurfaceRootFacets(SAreaTarget areaRoot)
          Attach suitable facets to the dialog area root and its children.
 SHost host()
           
protected  boolean isMultiPage()
          Required to ensure correct calculation of default host size.
protected  SAreaTarget[] newContentPages(DialogSurface.Contenter[] contents, SAreaTarget[] contentRoots)
          Create at least one dialog page.
protected  SView newPagesTreeView(TypedNode[] treeNodes)
          Re-implementation creating either a ListView or a TreeView.
protected static TypedNode newPageTreeNode(SAreaTarget page, TypedNode... children)
          Creates a node for a page selection tree.
protected  TypedNode[] newPageTreeNodes(SAreaTarget[] pages)
          Creates the top-level children of a page selection tree.
 AreaTargeter surfaceRootTargeter()
           
 java.lang.String title()
          Return human-readable identifying text.
 
Methods inherited from class facets.facet.app.FacetDialogSurface
addExtensionPanel, attachPageFacet, calculateSmartDialogAt, hostWindowDismissed, isResizable, newControlButtons, newDefaultPagedSurfacer, newDefaultTabbedSurfacer, newExtras, notify, scaledLaunchBounds, traceOutput
 
Methods inherited from class facets.core.app.DialogSurface
buildRetargeted, contents, contentsKey, contentsMatch, dismissHostWindow, findDialogTrigger, findRootArea, getLaunchBounds, hostWindowDismissed, persistBoundsState, replaceContents
 
Methods inherited from class facets.util.Tracer
trace, trace, trace, trace, trace, traceDebug, traceDebug, traceObjectText, 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.superficial.app.SSurface
host, surfaceRootTargeter
 
Methods inherited from interface facets.util.Titled
title
 

Field Detail

MULTI_AREA_TREE

public static final int MULTI_AREA_TREE
See Also:
Constant Field Values

MULTI_AREA_PAGES

public static final int MULTI_AREA_PAGES
See Also:
Constant Field Values
Constructor Detail

FacetDialogSurface.MultiPaged

public FacetDialogSurface.MultiPaged(FacetAppSurface app,
                                     DialogHost host,
                                     java.lang.String title,
                                     DialogSurface.DialogActions actions,
                                     DialogSurface.Contenter[] contents)
Method Detail

isMultiPage

protected final boolean isMultiPage()
Description copied from class: DialogSurface
Required to ensure correct calculation of default host size.

Default returns false.

Overrides:
isMultiPage in class DialogSurface

attachSurfaceRootFacets

protected final void attachSurfaceRootFacets(SAreaTarget areaRoot)
Attach suitable facets to the dialog area root and its children.

Overrides:
attachSurfaceRootFacets in class FacetDialogSurface
Parameters:
areaRoot - contains either a single page area returned by newContentPages(DialogSurface.Contenter[], SAreaTarget[]) or viewer and switching areas managing multiple page areas

newPagesTreeView

protected final SView newPagesTreeView(TypedNode[] treeNodes)
Re-implementation creating either a ListView or a TreeView.

Parameters:
treeNodes - will have at least two members

newContentPages

protected SAreaTarget[] newContentPages(DialogSurface.Contenter[] contents,
                                        SAreaTarget[] contentRoots)
Create at least one dialog page.

Where the implementation returns a multi-member array,

The default implementation defines a single-page dialog by returning a single-member array containing:

Parameters:
contents - passed during construction or to DialogSurface.replaceContents(DialogSurface.Contenter[]); may be queried for additional information such as page titles
contentRoots - were created from contents
Returns:
an SAreaTarget[] with at least one member

newPageTreeNodes

protected TypedNode[] newPageTreeNodes(SAreaTarget[] pages)
Creates the top-level children of a page selection tree.

Children created will be passed to newPagesTreeView(TypedNode[]) which should be reimplemented to define a viewer for the tree.

The default implementation returns an array constructed from panelAreas using newPageTreeNode(SAreaTarget,TypedNode[]) and suitable for a list viewer; this method can also be used to created more complex trees.

Parameters:
pages - were returned from newContentPages(DialogSurface.Contenter[], SAreaTarget[])

surfaceRootTargeter

public final AreaTargeter surfaceRootTargeter()

title

public final java.lang.String title()
Description copied from interface: Titled
Return human-readable identifying text.

Specified by:
title in interface Titled
Returns:
non-null, non-empty string with no structural whitespace

newPageTreeNode

protected static final TypedNode newPageTreeNode(SAreaTarget page,
                                                 TypedNode... children)
Creates a node for a page selection tree.

The node returned will

Parameters:
page - should be an area tree defining the layout of a dialog page
children - to appear in a tree viewer below the node created; themselves created using this method

host

public final SHost host()