|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfacets.util.Tracer
facets.core.app.AppActions
public abstract class AppActions
Can launch dialogs and create root target elements on behalf of a
ActionAppSurface.
AppActions defines a range
of commonly required top-level application actions, together with
STargets to represent them in the surface (typically as menu items).
| Nested Class Summary | |
|---|---|
static interface |
AppActions.StatePreferences
Supplier of DialogSurface.Contenters and matching DialogSurface for
launchPreferences(). |
| Field Summary | |
|---|---|
protected ActionAppSurface |
app
|
static int |
BLOCKING_RUBRIC_1
|
static int |
BLOCKING_TITLE_0
|
static int |
CANCEL_RUBRIC_3
|
static int |
CANCEL_TITLE_2
|
static java.lang.String |
KEY_EXTRAS_SPLIT
|
static java.lang.String |
KEY_SHOW_EXTRAS
|
static java.lang.String |
KEY_SHOW_PREFERENCES
|
static int |
TARGETS_CORE
|
static int |
TARGETS_HELP
|
static int |
TARGETS_LAST
|
static int |
TARGETS_NEW
|
static int |
TARGETS_WINDOW
|
static java.lang.String |
TITLE_CLOSE_CONTENT
|
| Constructor Summary | |
|---|---|
AppActions(ActionAppSurface app)
|
|
| Method Summary | |
|---|---|
protected abstract void |
attemptClose()
Called by the STrigger with title AppConstants.TITLE_APP_CLOSE
created by the default implementation of newSurfaceRootElements(). |
protected Dialogs.Response |
contentIsRemovable(java.lang.String dialogTitle,
AppSurface.Contenter content)
|
java.io.File |
getOpeningContentSourceFile()
May return source file on behalf of surface. |
protected boolean |
handleWatchCall(java.util.List<WatchableOperation> ops,
java.lang.Exception e,
boolean firstRetry,
boolean inOpen)
Called by the private AppWatcher.WatcherCoupler in FacetAppSurface. |
void |
launchAbout()
Launch an 'about' pane. |
void |
launchPreferences()
Launches a preferences dialog exposing session state values. |
protected abstract AppActions.StatePreferences |
lazyPreferences()
Supply a AppActions.StatePreferences for used by launchPreferences(). |
protected STarget[] |
newSurfaceRootElements()
Create targets representing the actions defined by the instance type. |
protected STarget[] |
newWindowTargets()
Called from default implementation of newSurfaceRootElements(). |
void |
revertContent()
Encapsulates reverting the current content. |
protected void |
setWindowCloseLiveState()
|
protected boolean |
showPreferences()
Show preferences in core menu? |
protected void |
surfaceRetargeted()
Called from ActionAppSurface.surfaceRetargeted(). |
void |
updateLayout()
Convenience method calling SHost.updateLayout(SSurface). |
boolean |
windowTryClose()
Cover for AppSurface.removeActiveRoot(). |
| 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 java.lang.String TITLE_CLOSE_CONTENT
public static final java.lang.String KEY_EXTRAS_SPLIT
public static final java.lang.String KEY_SHOW_EXTRAS
public static final java.lang.String KEY_SHOW_PREFERENCES
public static final int BLOCKING_TITLE_0
public static final int BLOCKING_RUBRIC_1
public static final int CANCEL_TITLE_2
public static final int CANCEL_RUBRIC_3
public static final int TARGETS_CORE
public static final int TARGETS_WINDOW
public static final int TARGETS_NEW
public static final int TARGETS_HELP
public static final int TARGETS_LAST
protected final ActionAppSurface app
| Constructor Detail |
|---|
public AppActions(ActionAppSurface app)
| Method Detail |
|---|
protected boolean handleWatchCall(java.util.List<WatchableOperation> ops,
java.lang.Exception e,
boolean firstRetry,
boolean inOpen)
AppWatcher.WatcherCoupler in FacetAppSurface.
public final boolean windowTryClose()
AppSurface.removeActiveRoot().
protected final void setWindowCloseLiveState()
public final void revertContent()
protected Dialogs.Response contentIsRemovable(java.lang.String dialogTitle,
AppSurface.Contenter content)
protected STarget[] newSurfaceRootElements()
Called from ActionAppSurface.lazySurfaceRootElements() when creating
the SAreaTarget which in turn creates AppSurface.surfaceRootTargeter().
Default returns triggers grouped as they are likely to be
required for application menus; some expose member methods.
Targeter elements can be accessed
using the following indexes into elements:
protected final STarget[] newWindowTargets()
newSurfaceRootElements().
public final void updateLayout()
SHost.updateLayout(SSurface).
Called by the STrigger with title AppConstants.TITLE_APP_HELP
created by the default implementation of newSurfaceRootElements()
and other framework elements.
protected abstract void attemptClose()
STrigger with title AppConstants.TITLE_APP_CLOSE
created by the default implementation of newSurfaceRootElements().
protected final boolean showPreferences()
false unless KEY_SHOW_PREFERENCES
has been set in AppValues.nature(boolean)public final void launchPreferences()
Calls Dialogs.launchSurfaced(Surfacer, String, DialogSurface.DialogActions,DialogSurface.Contenter...)
with parameters returned by the AppActions.StatePreferences created with
lazyPreferences().
Typically called by one of newSurfaceRootElements();
declared public to enable calls from client code.
protected abstract AppActions.StatePreferences lazyPreferences()
AppActions.StatePreferences for used by launchPreferences().
public void launchAbout()
Called by one of newSurfaceRootElements(); declared public to enable
calls from client code.
public java.io.File getOpeningContentSourceFile()
Called by ActionAppSurface.getOpeningContentSources();
default returns null.
protected void surfaceRetargeted()
ActionAppSurface.surfaceRetargeted().
Default is empty stub.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||