facets.facet
Class FacetFactory

java.lang.Object
  extended by facets.util.Tracer
      extended by facets.facet.FacetFactory
All Implemented Interfaces:
AppHost.LayoutFeatures, AppServices
Direct Known Subclasses:
FacetDialogContenter.PanelFacets, TreeAppFacets

public abstract class FacetFactory
extends Tracer
implements AppHost.LayoutFeatures, AppServices

Factory that creates and lays out facets.

FacetFactory provides a facet builder API for creating facets, attaching them to a targeter tree and assembling them into a complete application layout.

Most of its methods comply with the following general contract:

The core FacetFactory for a surface must be created using one of the class methods newDesktopCore(FacetAppSpecifier) and newAppletCore(FacetAppSpecifier, SurfaceStyle, Shade); it may then be passed to the constructor of concrete subclasses which will thus use the same toolkit and other resources, typically within methods re-implementing AppHost.LayoutFeatures.

Hints

Hints can be any concatenation of the HINT_XXX class constants; for examples of their use see XXXFacets classes in the demo package tree included with the Facets distribution.


Nested Class Summary
static interface FacetFactory.AppletHost
          SHost that can create and set an applet layout.
 class FacetFactory.AppMenuBuilder
          Creates MenuFacets for an application main menu.
 class FacetFactory.AppTargeters
           
static class FacetFactory.ComboCoupler
          Coupler for any combination of indexed list and text box.
 class FacetFactory.EditFacets
          Creates facets for an application edit menu.
static class FacetFactory.SurfaceStyle
          Possible app surface styles.
static class FacetFactory.ToolkitType
          Possible widget toolkits and look-and-feels.
 
Field Summary
static facets.facet.toolkit.KitFacet BREAK
          Alternative name for null facet that can be used as divider for facet layouts.
static int dragNotifyPause
          Time delay for drag input notifications, in milliseconds.
static boolean dragNotifyWait
          Should drag notification only take place when drag is paused?
static int facets
           
static java.lang.String findGraphValue
           
static SIndexing fontIndexing
           
static int fontSizeAt
           
static java.lang.Integer[] fontSizes
           
static int GRAPH_APP
           
static int GRAPH_DIALOGS
           
static java.lang.String GRAPH_FIND_NONE
           
protected static OffsetPath GRAPH_NO_PATH
           
static int GRAPH_NONE
           
static boolean graphBuild
           
static int graphFindAt
           
static boolean graphFindNow
           
static int graphShowWhere
           
static java.lang.String HINT_BARE
          Flag constant to be passed to facet factory methods; may be concatenated with others.
static java.lang.String HINT_DEBUG
          Flag constant to be passed to facet factory methods; may be concatenated with others.
static java.lang.String HINT_EXTRAS_PANE
          Flag constant to be passed to facet factory methods; may be concatenated with others.
static java.lang.String HINT_GRID
          Flag constant to be passed to facet factory methods; may be concatenated with others.
static java.lang.String HINT_INDEXING_SELECT
          Flag constant to be passed to facet factory methods; may be concatenated with others.
static java.lang.String HINT_LABEL_AUTOCLEAR
          Flag constant to be passed to facet factory methods; may be concatenated with others.
static java.lang.String HINT_MENU_NO_MNEMONICS
          Flag constant to be passed to facet factory methods; may be concatenated with others.
static java.lang.String HINT_MENU_PRELOAD
          Flag constant to be passed to facet factory methods; may be concatenated with others.
static java.lang.String HINT_NO_FLASH
          Flag constant to be passed to facet factory methods; may be concatenated with others.
static java.lang.String HINT_NO_FOCUS
          Flag constant to be passed to facet factory methods; may be concatenated with others.
static java.lang.String HINT_NONE
          Flag constant to be passed to facet factory methods; may be concatenated with others.
static java.lang.String HINT_NUMERIC_FIELDS
          Flag constant to be passed to facet factory methods; may be concatenated with others.
static java.lang.String HINT_NUMERIC_NUDGERS_FIRST
          Flag constant to be passed to facet factory methods; may be concatenated with others.
static java.lang.String HINT_NUMERIC_UNGROUPED
          Flag constant to be passed to facet factory methods; may be concatenated with others.
static java.lang.String HINT_PAINT_CACHE_DEEP
          Flag constant to be passed to facet factory methods; may be concatenated with others.
static java.lang.String HINT_PANEL_ABOVE
          Flag constant to be passed to facet factory methods; may be concatenated with others.
static java.lang.String HINT_PANEL_BELOW
          Flag constant to be passed to facet factory methods; may be concatenated with others.
static java.lang.String HINT_PANEL_BORDER
          Flag constant to be passed to facet factory methods; may be concatenated with others.
static java.lang.String HINT_PANEL_CENTER
          Flag constant to be passed to facet factory methods; may be concatenated with others.
static java.lang.String HINT_PANEL_INSET
          Flag constant to be passed to facet factory methods; may be concatenated with others.
static java.lang.String HINT_PANEL_MIDDLE
          Flag constant to be passed to facet factory methods; may be concatenated with others.
static java.lang.String HINT_PANEL_RIGHT
          Flag constant to be passed to facet factory methods; may be concatenated with others.
static java.lang.String HINT_SLIDER_FIELDS_TICKS_LABELS
          Flag constant to be passed to facet factory methods; may be concatenated with others.
static java.lang.String HINT_SLIDER_LABELS
          Flag constant to be passed to facet factory methods; may be concatenated with others.
static java.lang.String HINT_SLIDER_LOCAL
          Flag constant to be passed to facet factory methods; may be concatenated with others.
static java.lang.String HINT_SLIDER_TICKS
          Flag constant to be passed to facet factory methods; may be concatenated with others.
static java.lang.String HINT_SPREAD
          Flag constant to be passed to facet factory methods; may be concatenated with others.
static java.lang.String HINT_SQUARE
          Flag constant to be passed to facet factory methods; may be concatenated with others.
static java.lang.String HINT_TALL
          Flag constant to be passed to facet factory methods; may be concatenated with others.
static java.lang.String HINT_TEXT_FONT
          Flag constant to be passed to facet factory methods; may be concatenated with others.
static java.lang.String HINT_TITLE2
          Flag constant to be passed to facet factory methods; may be concatenated with others.
static java.lang.String HINT_TITLE3
          Flag constant to be passed to facet factory methods; may be concatenated with others.
static java.lang.String HINT_TOOLTIPS
          Flag constant to be passed to facet factory methods; may be concatenated with others.
static java.lang.String HINT_USAGE_FORM
          Flag constant to be passed to facet factory methods; may be concatenated with others.
static java.lang.String HINT_USAGE_PANEL
          Flag constant to be passed to facet factory methods; may be concatenated with others.
protected  facets.facet.toolkit.Kit kit
           
static int MENU_APP
           
static int MENU_EDIT
           
static int MENU_HELP
           
static int MENU_PANE
           
static int MENU_WINDOW
           
static facets.facet.toolkit.KitFacet NO_FACET
          Alternative name for null facet that can be used as divider for facet layouts.
static boolean notifyInterim
          Should drag notification only take place when drag is paused?
static Shade panelShade
          Shade to be used for surface panels and menus.
static FacetFactory.SurfaceStyle surfaceStyle
          App surface contentStyle.
static java.lang.String TITLE_CORE_MENU
          Title for standard application menu.
static java.lang.String TITLE_EDIT_MENU
          Title for standard application menu.
static java.lang.String TITLE_FILE_MENU
          Title for standard application menu.
static java.lang.String TITLE_HELP_MENU
          Title for standard application menu.
static java.lang.String TITLE_WINDOW_MENU
          Title for standard application menu.
static java.lang.String TREE_COLLAPSE
          Flag constant to be passed to facet factory methods; may be concatenated with others.
static java.lang.String TREE_EXPAND
          Flag constant to be passed to facet factory methods; may be concatenated with others.
 
Constructor Summary
FacetFactory(FacetFactory src)
          Constructor for use by subclasses to be passed as AppHost.LayoutFeatures.
 
Method Summary
protected  MenuFacets[] adjustMenuRoots(MenuFacets[] menus)
          Enables modification of standard menus.
 FacetFactory.AppletHost appletHostWrap(javax.swing.JMenuBar menuBar)
          Creates a Swing host for an applet-based application surface.
 AreaFacets areas()
          Returns a sub-factory for viewer, area and surface facets.
 SFacet colorChooser(STargeter rgb)
          Creates a facet enabling the user to define an RGB shade.
 AppWatcher coupleAppWatcher(AppWatcher.WatcherCoupler coupler)
           
 SFacet[] editTools(SContentRootTargeter t)
          Creates facets for an application edit toolbar.
 SFacet extras()
          Implements interface method.
 SFacet extras(AreaTargeter targeter)
           
 SFacet fill()
          Creates a facet defining an empty panel to fill spare space in a row panel.
static void fillFontSizes(int kitMidSize)
           
protected  STargeter findPaneTargeter(SContentRootTargeter root)
          Retrieve a STargeter targeting the return of AreaFacets.panesGetTargets(SAreaTarget).
static double fontFactor()
           
 MenuFacets helpMenuFacets(SContentRootTargeter rootTargeter)
          Creates facets for an application help menu.
 SFacet hideMount(STargeter targeter, SFacet contents, java.lang.String hints)
          Creates a facet that can hide its contents.
 void hideMountSetHidden(SFacet mount, boolean hidden)
           
 SFacet indexingDropdownList(STargeter t, java.lang.String hints)
          Creates a facet defining a dropdown list.
 SFacet indexingIteratorButtons(STargeter t, java.lang.String hints)
          Creates a facet defining either a single or a pair of iterating pushbuttons.
 SFacet indexingIteratorItems(STargeter t)
          Creates a facet defining either a single or a pair of iterating action menu items.
 SFacet indexingIteratorMenu(STargeter t, java.lang.String hints)
          Creates a facet defining a sub-menu containing either a single or a pair of iterating action menu items.
 SFacet indexingPaneChecked(STargeter t, int width, int rows, java.lang.String hints)
          Creates a facet defining a list pane of items selected by checkboxes.
 SFacet indexingPaneMultiple(STargeter t, int width, int rows, java.lang.String hints)
          Creates a facet defining a multiple-selection list pane.
 SFacet indexingPaneSingle(STargeter t, int width, int rows, java.lang.String hints)
          Creates a facet defining a single-selection list pane.
 SFacet indexingRadioButtonMenu(STargeter t, java.lang.String hints)
          Creates a facet defining a radio-button sub-menu.
 SFacet indexingRadioButtonMenuItems(STargeter t, java.lang.String hints)
          Creates a facet defining a radio-button items group.
 SFacet indexingRadioButtons(STargeter t, java.lang.String hints)
          Creates a facet defining a radio-button panel.
 SFacet indexingRadioButtonSingle(STargeter t, int index, java.lang.String hints)
          Creates a facet defining a single radio-button from a panel.
static SFacet[] join(SFacet[] front, SFacet[] back)
          Joins two facet arrays.
 SFacet menuRoot(MenuFacets content)
          Creates a facet defining a menu for attachment to a menu bar.
 SFacet menuRoot(STargeter t, java.lang.String title, SFacet... facets)
          Creates a facet defining a menu for attachment to a menu bar.
 SFacet[] menus()
          Implements interface method.
protected  SFacet[] newAdjustedMenus(FacetAppSurface app, SContentRootTargeter root)
          Creates standard menus to match an AppSpecifier.
static FacetFactory newAppletCore(FacetAppSpecifier spec, FacetFactory.SurfaceStyle style, Shade panelShade)
          Creates a basic FacetFactory for use in an applet.
static java.lang.String newCountsText()
           
static FacetFactory newDesktopCore(FacetAppSpecifier spec)
          Creates a basic FacetFactory for use in a desktop application.
 AppHost newDesktopHost(FacetAppSurface app)
          Supplies the AppHost for a desktop app.
protected  SFacet newExtrasMount(AreaTargeter targeter, ValueNode stateApp, SFacet graph, SFacet help)
           
 SFacet numericFields(STargeter t, java.lang.String hints)
          Creates a facet defining one or more numeric text fields exposing the target of t or those of its elements.
 SFacet numericNudgeButtons(STargeter t, java.lang.String hints)
          Creates a facet defining one or more pairs of nudge buttons exposing the target of t or those of its elements.
 SFacet numericNudgeMenu(STargeter t, java.lang.String hints)
          Creates a facet attached to t defining a pair of action items.
 SFacet[] numericNudgeMenuItems(STargeter t, java.lang.String hints)
          Creates nudge menu items exposing a numeric.
 SFacet[] numericNudgeMenus(STargeter t, java.lang.String hints)
          Creates nudge menus exposing a numeric.
 SFacet numericSliders(STargeter t, int width, java.lang.String hints)
          Creates a facet defining one or more sliders exposing the target of t or those of its elements.
 ProvidingCache providingCache()
           
static void resetCounts()
           
 SFacet rowPanel(STargeter t, int hgap, int vgap, java.lang.String hints, SFacet... contents)
          Creates an area facet defining a containing panel.
 SFacet rowPanel(STargeter t, SFacet... contents)
          Creates an area facet defining a containing panel with special layout behaviour.
 SFacet[] rowPanels(SFacet[][] facets, STargeter t, java.lang.String hints)
          Wraps facet arrays in row panels.
 SurfaceServices services()
          /** Implements interface method.
 void setAppProvidingCache(ProvidingCache cache)
           
 SFacet sidebar()
          Implements interface method.
 SFacet simpleMastered(STargeter t, FacetMaster.Simple master)
          Creates a simple facet with a custom panel.
 SFacet spacerTall(int gap)
          Creates a facet defining an empty panel for use as a vertical spacer.
 SFacet spacerWide(int gap)
          Creates a facet defining an empty panel for use as a horizontal spacer.
 StatefulViewable.ClipperSource statefulClipperSource(boolean useSystemClipboard)
           
 SFacet status()
          Implements interface method.
 MountFacet switchMount(java.lang.String title)
          Creates a facet mount that can switch its visible contents.
static SIndexing switchMountIndexing(SFacet mount, SIndexing.Coupler coupler)
          Creates an indexing setting the facet to be displayed by the facet passed.
 SFacet tabMount(STargeter targeter, SFacet[] facets, java.lang.String[] titles)
           
 SFacet textualField(STargeter t, int cols, java.lang.String hints)
          Creates a facet defining a single-line text field.
 SFacet textualLabel(STargeter t, java.lang.String hints)
          Creates a facet defining a single-line variable text label.
 SFacet togglingButtons(STargeter t, java.lang.String hints)
          Creates a facet defining a toggle button or button panel.
 SFacet togglingCheckboxes(STargeter t, java.lang.String hints)
          Creates a facet defining a checkbox or checkbox panel.
 SFacet togglingCheckboxMenu(STargeter t, java.lang.String hints)
          Creates a facet defining a checkbox sub-menu.
 SFacet togglingCheckboxMenuItems(STargeter t, java.lang.String hints)
          Creates a facet defining one or more checkbox menu items.
 SFacet toolbar()
          Implements interface method.
 SFacet toolGroups(STargeter t, java.lang.String hints, SFacet... contents)
          Creates an area facet defining groups of facets.
 java.lang.String toString()
           
 SFacet triggerButtons(STargeter t, java.lang.String hints)
          Creates a facet defining one or more pushbuttons.
 SFacet triggerMenu(STargeter t, java.lang.String hints)
          Creates a facet defining an action menu.
 SFacet triggerMenuItems(STargeter t, java.lang.String hints)
          Creates a facet defining one or more action menu items.
static java.lang.String version()
           
 void warningCritical(java.lang.String appTitle, java.lang.Exception e, boolean inOpen)
           
 MenuFacets windowMenuFacets(SContentRootTargeter rootTargeter, boolean withLayout)
          Creates facets for an application window menu.
 
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, wait, wait, wait
 
Methods inherited from interface facets.util.app.AppServices
coupleAppWatcher
 

Field Detail

GRAPH_NONE

public static final int GRAPH_NONE
See Also:
Constant Field Values

GRAPH_APP

public static final int GRAPH_APP
See Also:
Constant Field Values

GRAPH_DIALOGS

public static final int GRAPH_DIALOGS
See Also:
Constant Field Values

MENU_APP

public static final int MENU_APP
See Also:
Constant Field Values

MENU_EDIT

public static final int MENU_EDIT
See Also:
Constant Field Values

MENU_PANE

public static final int MENU_PANE
See Also:
Constant Field Values

MENU_WINDOW

public static final int MENU_WINDOW
See Also:
Constant Field Values

MENU_HELP

public static final int MENU_HELP
See Also:
Constant Field Values

graphBuild

public static boolean graphBuild

graphFindNow

public static boolean graphFindNow

GRAPH_FIND_NONE

public static final java.lang.String GRAPH_FIND_NONE
See Also:
Constant Field Values

findGraphValue

public static java.lang.String findGraphValue

GRAPH_NO_PATH

protected static final OffsetPath GRAPH_NO_PATH

graphShowWhere

public static int graphShowWhere

graphFindAt

public static int graphFindAt

panelShade

public static Shade panelShade
Shade to be used for surface panels and menus.

May be null to signify use of toolkit defaults.


surfaceStyle

public static FacetFactory.SurfaceStyle surfaceStyle
App surface contentStyle.


facets

public static int facets

dragNotifyPause

public static int dragNotifyPause
Time delay for drag input notifications, in milliseconds.


notifyInterim

public static boolean notifyInterim
Should drag notification only take place when drag is paused?


dragNotifyWait

public static boolean dragNotifyWait
Should drag notification only take place when drag is paused?


TITLE_CORE_MENU

public static final java.lang.String TITLE_CORE_MENU
Title for standard application menu.

See Also:
Constant Field Values

TITLE_FILE_MENU

public static final java.lang.String TITLE_FILE_MENU
Title for standard application menu.

See Also:
Constant Field Values

TITLE_EDIT_MENU

public static final java.lang.String TITLE_EDIT_MENU
Title for standard application menu.

See Also:
Constant Field Values

TITLE_WINDOW_MENU

public static final java.lang.String TITLE_WINDOW_MENU
Title for standard application menu.

See Also:
Constant Field Values

TITLE_HELP_MENU

public static final java.lang.String TITLE_HELP_MENU
Title for standard application menu.

See Also:
Constant Field Values

BREAK

public static final facets.facet.toolkit.KitFacet BREAK
Alternative name for null facet that can be used as divider for facet layouts.

Interpreted as follows:


NO_FACET

public static final facets.facet.toolkit.KitFacet NO_FACET
Alternative name for null facet that can be used as divider for facet layouts.

Interpreted as follows:


fontSizes

public static final java.lang.Integer[] fontSizes

fontSizeAt

public static int fontSizeAt

fontIndexing

public static final SIndexing fontIndexing

TREE_EXPAND

public static final java.lang.String TREE_EXPAND
Flag constant to be passed to facet factory methods; may be concatenated with others.

See Also:
Constant Field Values

TREE_COLLAPSE

public static final java.lang.String TREE_COLLAPSE
Flag constant to be passed to facet factory methods; may be concatenated with others.

See Also:
Constant Field Values

HINT_NONE

public static final java.lang.String HINT_NONE
Flag constant to be passed to facet factory methods; may be concatenated with others.


HINT_EXTRAS_PANE

public static final java.lang.String HINT_EXTRAS_PANE
Flag constant to be passed to facet factory methods; may be concatenated with others.


HINT_NO_FLASH

public static final java.lang.String HINT_NO_FLASH
Flag constant to be passed to facet factory methods; may be concatenated with others.


HINT_BARE

public static final java.lang.String HINT_BARE
Flag constant to be passed to facet factory methods; may be concatenated with others.


HINT_TALL

public static final java.lang.String HINT_TALL
Flag constant to be passed to facet factory methods; may be concatenated with others.


HINT_TEXT_FONT

public static final java.lang.String HINT_TEXT_FONT
Flag constant to be passed to facet factory methods; may be concatenated with others.


HINT_LABEL_AUTOCLEAR

public static final java.lang.String HINT_LABEL_AUTOCLEAR
Flag constant to be passed to facet factory methods; may be concatenated with others.


HINT_TITLE2

public static final java.lang.String HINT_TITLE2
Flag constant to be passed to facet factory methods; may be concatenated with others.


HINT_TITLE3

public static final java.lang.String HINT_TITLE3
Flag constant to be passed to facet factory methods; may be concatenated with others.


HINT_SQUARE

public static final java.lang.String HINT_SQUARE
Flag constant to be passed to facet factory methods; may be concatenated with others.


HINT_SPREAD

public static final java.lang.String HINT_SPREAD
Flag constant to be passed to facet factory methods; may be concatenated with others.


HINT_GRID

public static final java.lang.String HINT_GRID
Flag constant to be passed to facet factory methods; may be concatenated with others.


HINT_DEBUG

public static final java.lang.String HINT_DEBUG
Flag constant to be passed to facet factory methods; may be concatenated with others.


HINT_USAGE_PANEL

public static final java.lang.String HINT_USAGE_PANEL
Flag constant to be passed to facet factory methods; may be concatenated with others.


HINT_USAGE_FORM

public static final java.lang.String HINT_USAGE_FORM
Flag constant to be passed to facet factory methods; may be concatenated with others.


HINT_PAINT_CACHE_DEEP

public static final java.lang.String HINT_PAINT_CACHE_DEEP
Flag constant to be passed to facet factory methods; may be concatenated with others.


HINT_NO_FOCUS

public static final java.lang.String HINT_NO_FOCUS
Flag constant to be passed to facet factory methods; may be concatenated with others.


HINT_PANEL_CENTER

public static final java.lang.String HINT_PANEL_CENTER
Flag constant to be passed to facet factory methods; may be concatenated with others.


HINT_PANEL_MIDDLE

public static final java.lang.String HINT_PANEL_MIDDLE
Flag constant to be passed to facet factory methods; may be concatenated with others.


HINT_PANEL_RIGHT

public static final java.lang.String HINT_PANEL_RIGHT
Flag constant to be passed to facet factory methods; may be concatenated with others.


HINT_PANEL_BELOW

public static final java.lang.String HINT_PANEL_BELOW
Flag constant to be passed to facet factory methods; may be concatenated with others.


HINT_PANEL_ABOVE

public static final java.lang.String HINT_PANEL_ABOVE
Flag constant to be passed to facet factory methods; may be concatenated with others.


HINT_PANEL_INSET

public static final java.lang.String HINT_PANEL_INSET
Flag constant to be passed to facet factory methods; may be concatenated with others.


HINT_PANEL_BORDER

public static final java.lang.String HINT_PANEL_BORDER
Flag constant to be passed to facet factory methods; may be concatenated with others.


HINT_NUMERIC_NUDGERS_FIRST

public static final java.lang.String HINT_NUMERIC_NUDGERS_FIRST
Flag constant to be passed to facet factory methods; may be concatenated with others.


HINT_NUMERIC_UNGROUPED

public static final java.lang.String HINT_NUMERIC_UNGROUPED
Flag constant to be passed to facet factory methods; may be concatenated with others.


HINT_NUMERIC_FIELDS

public static final java.lang.String HINT_NUMERIC_FIELDS
Flag constant to be passed to facet factory methods; may be concatenated with others.


HINT_SLIDER_TICKS

public static final java.lang.String HINT_SLIDER_TICKS
Flag constant to be passed to facet factory methods; may be concatenated with others.


HINT_SLIDER_LABELS

public static final java.lang.String HINT_SLIDER_LABELS
Flag constant to be passed to facet factory methods; may be concatenated with others.


HINT_SLIDER_LOCAL

public static final java.lang.String HINT_SLIDER_LOCAL
Flag constant to be passed to facet factory methods; may be concatenated with others.


HINT_SLIDER_FIELDS_TICKS_LABELS

public static final java.lang.String HINT_SLIDER_FIELDS_TICKS_LABELS
Flag constant to be passed to facet factory methods; may be concatenated with others.


HINT_MENU_NO_MNEMONICS

public static final java.lang.String HINT_MENU_NO_MNEMONICS
Flag constant to be passed to facet factory methods; may be concatenated with others.


HINT_MENU_PRELOAD

public static final java.lang.String HINT_MENU_PRELOAD
Flag constant to be passed to facet factory methods; may be concatenated with others.


HINT_INDEXING_SELECT

public static final java.lang.String HINT_INDEXING_SELECT
Flag constant to be passed to facet factory methods; may be concatenated with others.


HINT_TOOLTIPS

public static final java.lang.String HINT_TOOLTIPS
Flag constant to be passed to facet factory methods; may be concatenated with others.


kit

protected final facets.facet.toolkit.Kit kit
Constructor Detail

FacetFactory

public FacetFactory(FacetFactory src)
Constructor for use by subclasses to be passed as AppHost.LayoutFeatures.

Parameters:
src - the instance whose members will be shared
Method Detail

fillFontSizes

public static void fillFontSizes(int kitMidSize)

fontFactor

public static double fontFactor()

newDesktopCore

public static FacetFactory newDesktopCore(FacetAppSpecifier spec)
Creates a basic FacetFactory for use in a desktop application.

Widgets will be constructed using a toolkit of the type specified by spec; applications can use the builder returned as the core of a custom builder.

Parameters:
spec - define the widget toolkit/look-and-feel

newAppletCore

public static FacetFactory newAppletCore(FacetAppSpecifier spec,
                                         FacetFactory.SurfaceStyle style,
                                         Shade panelShade)
Creates a basic FacetFactory for use in an applet.

Widgets will be constructed using the Swing toolkit in a suitable look-and-feel.

Parameters:
spec - for use with FacetAppSurface
style - sets L&F
panelShade - sets panel shade for browser contentStyle

appletHostWrap

public final FacetFactory.AppletHost appletHostWrap(javax.swing.JMenuBar menuBar)
Creates a Swing host for an applet-based application surface.

The SHost returned is guaranteed to wrap a Component.

Parameters:
menuBar - should be passed from the hosting applet.

newDesktopHost

public final AppHost newDesktopHost(FacetAppSurface app)
Supplies the AppHost for a desktop app.

Parameters:
app - will return the host in SSurface.host()
Returns:
a WindowAppHost supplied by the toolkit specified in FacetAppSpecifier.toolkitType()

areas

public final AreaFacets areas()
Returns a sub-factory for viewer, area and surface facets.


menus

public SFacet[] menus()
Implements interface method.

Specified by:
menus in interface AppHost.LayoutFeatures
Returns:
null by default

toolbar

public SFacet toolbar()
Implements interface method.

Specified by:
toolbar in interface AppHost.LayoutFeatures
Returns:
null by default

sidebar

public SFacet sidebar()
Implements interface method.

Specified by:
sidebar in interface AppHost.LayoutFeatures
Returns:
null by default

status

public SFacet status()
Implements interface method.

Specified by:
status in interface AppHost.LayoutFeatures
Returns:
null by default

extras

public SFacet extras()
Implements interface method.

Specified by:
extras in interface AppHost.LayoutFeatures
Returns:
null by default

services

public SurfaceServices services()
/** Implements interface method.

Specified by:
services in interface AppHost.LayoutFeatures
Returns:
null by default

newAdjustedMenus

protected final SFacet[] newAdjustedMenus(FacetAppSurface app,
                                          SContentRootTargeter root)
Creates standard menus to match an AppSpecifier.

Returns:
menus possibly modified by adjustMenuRoots(MenuFacets[])

findPaneTargeter

protected STargeter findPaneTargeter(SContentRootTargeter root)
Retrieve a STargeter targeting the return of AreaFacets.panesGetTargets(SAreaTarget).

Returns:
the appropriate STargeter or null

adjustMenuRoots

protected MenuFacets[] adjustMenuRoots(MenuFacets[] menus)
Enables modification of standard menus.

Parameters:
menus - created in newAdjustedMenus(FacetAppSurface, SContentRootTargeter)
Returns:
by default menus

windowMenuFacets

public final MenuFacets windowMenuFacets(SContentRootTargeter rootTargeter,
                                         boolean withLayout)
Creates facets for an application window menu.

The MenuFacets created by this method returns a menu facet retargeted on the indexing of the surface root, optionally appended to facets retargeted on elements defined in AppActions.

Parameters:
rootTargeter - is passed to the MenuFacets created
withLayout - include layout sub-menu?

helpMenuFacets

public final MenuFacets helpMenuFacets(SContentRootTargeter rootTargeter)
Creates facets for an application help menu.

The MenuFacets created by this method returns menu facets retargeted on elements defined in AppActions.

Parameters:
rootTargeter - is passed to the MenuFacets created.

editTools

public final SFacet[] editTools(SContentRootTargeter t)
Creates facets for an application edit toolbar.

Calls toolGroups(STargeter, String, SFacet...) with facets retargeted on elements provided by SContentRootTargeter.viewer() and indexed by ViewerTarget.ELEMENTS_VIEWABLE.


extras

public final SFacet extras(AreaTargeter targeter)

statefulClipperSource

public final StatefulViewable.ClipperSource statefulClipperSource(boolean useSystemClipboard)

warningCritical

public final void warningCritical(java.lang.String appTitle,
                                  java.lang.Exception e,
                                  boolean inOpen)
Specified by:
warningCritical in interface AppServices

setAppProvidingCache

public final void setAppProvidingCache(ProvidingCache cache)
Specified by:
setAppProvidingCache in interface AppServices

providingCache

public final ProvidingCache providingCache()

newCountsText

public static java.lang.String newCountsText()

coupleAppWatcher

public final AppWatcher coupleAppWatcher(AppWatcher.WatcherCoupler coupler)

colorChooser

public final SFacet colorChooser(STargeter rgb)
Creates a facet enabling the user to define an RGB shade.

Parameters:
rgb - must be retargeted on a SNumeric, whose value is interpreted as defining a Shade.

fill

public final SFacet fill()
Creates a facet defining an empty panel to fill spare space in a row panel.

Used after BREAK it fills the bottom of the panel.


indexingIteratorMenu

public final SFacet indexingIteratorMenu(STargeter t,
                                         java.lang.String hints)
Creates a facet defining a sub-menu containing either a single or a pair of iterating action menu items.

Parameters:
t - must be targeted on an SIndexing; its coupler defines the items
hints -

indexingIteratorButtons

public final SFacet indexingIteratorButtons(STargeter t,
                                            java.lang.String hints)
Creates a facet defining either a single or a pair of iterating pushbuttons.

Parameters:
t - must be targeted on an SIndexing; its coupler defines the items
hints - one or more FacetFactory HINT constants concatenated

indexingIteratorItems

public final SFacet indexingIteratorItems(STargeter t)
Creates a facet defining either a single or a pair of iterating action menu items.

Parameters:
t - must be targeted on an SIndexing; its coupler defines the items

indexingDropdownList

public final SFacet indexingDropdownList(STargeter t,
                                         java.lang.String hints)
Creates a facet defining a dropdown list.

Editable behaviour of the selected item can be defined by creating the indexing target with a Facets.ComboCoupler.

Parameters:
t - must be targeted on an SIndexing
hints - one or more FacetFactory HINT constants concatenated

indexingPaneSingle

public final SFacet indexingPaneSingle(STargeter t,
                                       int width,
                                       int rows,
                                       java.lang.String hints)
Creates a facet defining a single-selection list pane.

Parameters:
t - must be targeted on an SIndexing
width - pixel width
rows - visible items count
hints - one or more FacetFactory HINT constants concatenated

indexingPaneChecked

public final SFacet indexingPaneChecked(STargeter t,
                                        int width,
                                        int rows,
                                        java.lang.String hints)
Creates a facet defining a list pane of items selected by checkboxes.

Parameters:
t - must be targeted on an SIndexing
width - pixel width
rows - visible items count
hints - one or more FacetFactory HINT constants concatenated

indexingPaneMultiple

public final SFacet indexingPaneMultiple(STargeter t,
                                         int width,
                                         int rows,
                                         java.lang.String hints)
Creates a facet defining a multiple-selection list pane.

Parameters:
t - must be targeted on an SIndexing
width - pixel width
rows - visible items count
hints - one or more FacetFactory HINT constants concatenated

indexingRadioButtonMenu

public final SFacet indexingRadioButtonMenu(STargeter t,
                                            java.lang.String hints)
Creates a facet defining a radio-button sub-menu.

Parameters:
t - must be retargeted on an SIndexing; its indexables will appear in the menu

indexingRadioButtonMenuItems

public final SFacet indexingRadioButtonMenuItems(STargeter t,
                                                 java.lang.String hints)
Creates a facet defining a radio-button items group.

Parameters:
t - must be retargeted on an SIndexing; its indexables will appear as the items
hints - one or more FacetFactory HINT constants concatenated

indexingRadioButtons

public final SFacet indexingRadioButtons(STargeter t,
                                         java.lang.String hints)
Creates a facet defining a radio-button panel.

Parameters:
t - must be retargeted on an indexing
hints - one or more FacetFactory HINT constants concatenated

indexingRadioButtonSingle

public final SFacet indexingRadioButtonSingle(STargeter t,
                                              int index,
                                              java.lang.String hints)
Creates a facet defining a single radio-button from a panel.

Parameters:
t - must be retargeted on an SIndexing
index - the indexable to be exposed by the button
hints - one or more FacetFactory HINT constants concatenated

menuRoot

public final SFacet menuRoot(MenuFacets content)
Creates a facet defining a menu for attachment to a menu bar.

The menu will check MenuFacets.getFacets() on each retargeting and update its items accordingly.

Parameters:
content - content supplying menu members and title

menuRoot

public final SFacet menuRoot(STargeter t,
                             java.lang.String title,
                             SFacet... facets)
Creates a facet defining a menu for attachment to a menu bar.

Calls menuRoot(MenuFacets) with a trivial subclass constructed from the parameters.


numericFields

public final SFacet numericFields(STargeter t,
                                  java.lang.String hints)
Creates a facet defining one or more numeric text fields exposing the target of t or those of its elements.

Parameters:
t - must be retargeted on a numeric or a grouping of numerics
hints - one or more FacetFactory HINT constants concatenated

numericNudgeButtons

public final SFacet numericNudgeButtons(STargeter t,
                                        java.lang.String hints)
Creates a facet defining one or more pairs of nudge buttons exposing the target of t or those of its elements.

Parameters:
t - must be retargeted on a numeric or a grouping of numerics
hints - one or more FacetFactory HINT constants concatenated

numericNudgeMenu

public final SFacet numericNudgeMenu(STargeter t,
                                     java.lang.String hints)
Creates a facet attached to t defining a pair of action items.

Parameters:
t - must be retargeted on a numeric or a grouping of numerics
hints -

numericNudgeMenuItems

public final SFacet[] numericNudgeMenuItems(STargeter t,
                                            java.lang.String hints)
Creates nudge menu items exposing a numeric.

Facets attached to the elements of t each define a pair of action items.

Parameters:
t - must be retargeted on a numeric or a grouping of numerics
hints -

numericNudgeMenus

public final SFacet[] numericNudgeMenus(STargeter t,
                                        java.lang.String hints)
Creates nudge menus exposing a numeric.

Facets attached to the elements of t each define sub-menu containing a pair of action items.

Parameters:
t - must be retargeted on a numeric or a grouping of numerics
hints -

numericSliders

public final SFacet numericSliders(STargeter t,
                                   int width,
                                   java.lang.String hints)
Creates a facet defining one or more sliders exposing the target of t or those of its elements.

Parameters:
t - must be retargeted on a numeric or a grouping of numerics
width - the width of each slider
hints - one or more FacetFactory HINT constants concatenated

rowPanel

public final SFacet rowPanel(STargeter t,
                             int hgap,
                             int vgap,
                             java.lang.String hints,
                             SFacet... contents)
Creates an area facet defining a containing panel.

The panel uses a flow-type layout for each row, creating a new row for each occurrence in contents of class constant BREAK.

Parameters:
t - will usually be retargeted on a frame
hgap - horizontal gap between panels abstracted by contents
vgap - vertical gap between panels abstracted by contents
hints - one or more Facets HINT constants concatenated
contents - panel-type facet created using FacetFactory, with new rows denoted by BREAK

rowPanel

public final SFacet rowPanel(STargeter t,
                             SFacet... contents)
Creates an area facet defining a containing panel with special layout behaviour.

The panel uses a flow-type layout for each row, creating a new row for each occurrence in contents of class constant BREAK.

Panels abstracted by contents are aligned left, with zero horizontal and vertical separation.

Parameters:
t - will usually be retargeted on a frame
contents - panel-type facet created using FacetFactory, with new rows denoted by BREAK

rowPanels

public final SFacet[] rowPanels(SFacet[][] facets,
                                STargeter t,
                                java.lang.String hints)
Wraps facet arrays in row panels.

Parameters:
facets - the arrays to wrap
t - will control all panels
hints - can set alignment

spacerTall

public final SFacet spacerTall(int gap)
Creates a facet defining an empty panel for use as a vertical spacer.

Parameters:
gap - the vertical gap required

spacerWide

public final SFacet spacerWide(int gap)
Creates a facet defining an empty panel for use as a horizontal spacer.

Parameters:
gap - the horizontal gap required

switchMount

public final MountFacet switchMount(java.lang.String title)
Creates a facet mount that can switch its visible contents.

Set the contents with MountFacet.setFacets(SFacet...); and a coupler for the indexing with switchMountIndexing(SFacet, facets.core.superficial.SIndexing.Coupler).

Parameters:
title - will be used for the controlling indexing

switchMountIndexing

public static final SIndexing switchMountIndexing(SFacet mount,
                                                  SIndexing.Coupler coupler)
Creates an indexing setting the facet to be displayed by the facet passed.

Parameters:
mount - must have been created using switchMount.
coupler - is attached to the indexing

hideMount

public final SFacet hideMount(STargeter targeter,
                              SFacet contents,
                              java.lang.String hints)
Creates a facet that can hide its contents.


hideMountSetHidden

public final void hideMountSetHidden(SFacet mount,
                                     boolean hidden)

tabMount

public final SFacet tabMount(STargeter targeter,
                             SFacet[] facets,
                             java.lang.String[] titles)

textualField

public final SFacet textualField(STargeter t,
                                 int cols,
                                 java.lang.String hints)
Creates a facet defining a single-line text field.

Parameters:
t - must be retargeted on a textual
hints - one or more FacetFactory HINT constants concatenated

textualLabel

public final SFacet textualLabel(STargeter t,
                                 java.lang.String hints)
Creates a facet defining a single-line variable text label.

Parameters:
t - must be retargeted on a textual
hints - one or more FacetFactory HINT constants concatenated

togglingButtons

public final SFacet togglingButtons(STargeter t,
                                    java.lang.String hints)
Creates a facet defining a toggle button or button panel.

Parameters:
t - must be retargeted on a toggling or a grouping of togglings
hints - one or more FacetFactory HINT constants concatenated

triggerButtons

public final SFacet triggerButtons(STargeter t,
                                   java.lang.String hints)
Creates a facet defining one or more pushbuttons.

Parameters:
t - must be retargeted on a trigger or a grouping of triggers
hints - one or more FacetFactory HINT constants concatenated

togglingCheckboxes

public final SFacet togglingCheckboxes(STargeter t,
                                       java.lang.String hints)
Creates a facet defining a checkbox or checkbox panel.

Parameters:
t - must be retargeted on a toggling or a grouping of togglings
hints - one or more FacetFactory HINT constants concatenated

togglingCheckboxMenu

public final SFacet togglingCheckboxMenu(STargeter t,
                                         java.lang.String hints)
Creates a facet defining a checkbox sub-menu.

Parameters:
t - must be retargeted on a toggling or a grouping of togglings
hints -

triggerMenu

public final SFacet triggerMenu(STargeter t,
                                java.lang.String hints)
Creates a facet defining an action menu.

Parameters:
t - must be retargeted on a trigger or a grouping of triggers
hints -

togglingCheckboxMenuItems

public final SFacet togglingCheckboxMenuItems(STargeter t,
                                              java.lang.String hints)
Creates a facet defining one or more checkbox menu items.

Parameters:
t - must be retargeted on a toggling or a grouping of togglings
hints -

triggerMenuItems

public final SFacet triggerMenuItems(STargeter t,
                                     java.lang.String hints)
Creates a facet defining one or more action menu items.

Parameters:
t - must be retargeted on a trigger or a grouping of triggers
hints -

toolGroups

public final SFacet toolGroups(STargeter t,
                               java.lang.String hints,
                               SFacet... contents)
Creates an area facet defining groups of facets.

Parameters:
t - will usually be retargeted on a frame
contents - tool-type facets created using FacetFactory

toString

public final java.lang.String toString()
Overrides:
toString in class java.lang.Object

simpleMastered

public final SFacet simpleMastered(STargeter t,
                                   FacetMaster.Simple master)
Creates a simple facet with a custom panel.

The master passed is cast to an appropriate base class for the toolkit used by the FacetFactory.

Parameters:
t - must be retargeted on an appropriate target
master - must build a panel capable of exposing a target of t

newExtrasMount

protected final SFacet newExtrasMount(AreaTargeter targeter,
                                      ValueNode stateApp,
                                      SFacet graph,
                                      SFacet help)

version

public static java.lang.String version()

resetCounts

public static void resetCounts()

join

public static final SFacet[] join(SFacet[] front,
                                  SFacet[] back)
Joins two facet arrays.