|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfacets.util.Tracer
facets.core.superficial.TargetCore
facets.core.superficial.app.ViewerTarget
facets.core.app.ActionViewerTarget
public abstract class ActionViewerTarget
ViewerTarget
that couples ViewableAction
s to STrigger
s.
ActionViewerTarget
extends its superclass by defining
ViewerTarget.newActionTriggers(facets.core.superficial.app.ViewableAction[])
and ViewerTarget.getTriggerAction(facets.core.superficial.STrigger)
newActionTriggerGroup(String, ViewableAction[])
which can
create trigger groups for applications to return from ViewerTarget.newActionTriggerGroups(ViewableAction[])
The ActionViewerTarget.Action
enumeration defines a range of ViewableAction
s.
ActionViewerTarget
is defined abstract
to ensure that
the static class of application instances marks
the dynamic type defined by the ViewerTarget.actionTriggers
created
during construction.
Nested Class Summary | |
---|---|
static class |
ActionViewerTarget.Action
Defines a range of ViewableAction s. |
Nested classes/interfaces inherited from interface facets.core.superficial.STarget |
---|
STarget.Targeted |
Nested classes/interfaces inherited from interface facets.core.superficial.Notifying |
---|
Notifying.Impact |
Field Summary | |
---|---|
ViewableFrame |
viewable
Frames content of which some portion is to be exposed by the viewer facet. |
STarget |
views
Either a SFrameTarget decorating a SView ,
or an SIndexing of several such. |
Fields inherited from class facets.core.superficial.app.ViewerTarget |
---|
actionTriggers, ELEMENTS_FACET, ELEMENTS_VIEWABLE |
Fields inherited from class facets.core.superficial.TargetCore |
---|
targets |
Fields inherited from interface facets.core.superficial.STarget |
---|
NONE |
Fields inherited from interface facets.core.superficial.app.SViewer |
---|
CURSOR_CROSSHAIR, CURSOR_DEFAULT, CURSOR_HAND, CURSOR_MOVE, CURSOR_NORTH, CURSOR_TEXT, CURSOR_WAIT, CURSOR_WEST |
Constructor Summary | |
---|---|
ActionViewerTarget(java.lang.String title,
ViewableFrame viewable,
STarget views)
Unique constructor. |
Method Summary | |
---|---|
SAreaTarget |
areaParent()
The parent in the area target tree. |
SFacet |
attachedFacet()
The SFacet attached with FacetedTarget.attachFacet(SFacet) . |
void |
attachFacet(SFacet facet)
Attach an immutable facet. |
protected boolean |
blockNotification()
Enables notification to be restricted to this member of the tree. |
void |
ensureActive(boolean notify)
Ensure that the targeter tree treats the faceted as having the GUI focus. |
protected ViewableAction |
getTriggerAction(STrigger trigger)
Implements abstract method. |
java.lang.Object |
identity()
Return an object that is as far as possible unique for the implementation. |
Notifying.Impact |
impact()
Allows this Notifying to specify a default Notifying.Impact . |
boolean |
isActive()
Should the targeter tree treat the facet as having the GUI focus? |
Notifiable |
monitor()
The current Notifiable in the notification tree,
as set with setMonitor . |
protected STarget |
newActionTriggerGroup(java.lang.String title,
ViewableAction[] actions)
Creates a target group containing action triggers. |
protected STrigger[] |
newActionTriggers(ViewableAction[] actions)
Implements abstract method. |
protected TypedNode[] |
newDebugChildren()
Create a TypedNode[] representation of this Notifying
for debug purposes. |
protected static TypedNode |
newDebugContentNode(java.lang.String title,
java.lang.Object source)
|
protected static TypedNode |
newDebugContentNode(java.lang.String title,
java.lang.Object[] source)
|
protected static TypedNode |
newDebugMonitorNode(Notifiable monitor)
|
TypedNode |
newGraphNode()
Returns a descriptive node for use in debug object graph. |
static SAreaTarget[] |
newViewerAreas(ViewableFrame viewable,
SFrameTarget[] views)
Convenience method for creating viewer arrangements. |
static SFrameTarget[] |
newViewFrames(SView[] views)
Convenenience method that wraps SView s in SFrameTarget s. |
protected boolean |
notifiesTargeter()
Used to construct the notification tree. |
void |
notify(Notice notice)
Respond to the Notice passed. |
void |
notifyMonitor(Notifying.Impact impact)
Call notify on the parent monitor in the notification tree,
typically with itself as parameter to the Notice passed. |
void |
retargetFacets(Notifying.Impact impact)
Implements interface method. |
SSelection |
selection()
Implements abstract method. |
void |
selectionChanged(SSelection selection)
Implements interface method. |
void |
selectionEdited(SSelection selection,
java.lang.Object edit,
boolean interim)
Implements interface method. |
void |
setAreaParent(SAreaTarget parent)
|
void |
setLive(boolean live)
Re-implementation that ensures the viewable is also set live. |
void |
setMonitor(Notifiable monitor)
Attach the Notifying to a Notifiable parent
in the notification tree. |
java.lang.String |
toString()
|
SView |
view()
Implements abstract method. |
SFrameTarget |
viewFrame()
Represents the SView currently returned by view() . |
Methods inherited from class facets.core.superficial.app.ViewerTarget |
---|
actionTriggerFired, lazyElements, newActionTriggerGroups, newTargeter |
Methods inherited from class facets.core.superficial.TargetCore |
---|
elements, findMonitorOfType, isLive, join, setElements, title, wantsFocus |
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.core.superficial.STarget |
---|
elements, isLive, wantsFocus |
Methods inherited from interface facets.util.Titled |
---|
title |
Methods inherited from interface facets.core.superficial.Notifying |
---|
impact, monitor, notifyMonitor, setMonitor |
Methods inherited from interface facets.core.superficial.Notifiable |
---|
notify |
Field Detail |
---|
public final STarget views
SFrameTarget
decorating a SView
,
or an SIndexing
of several such.
public final ViewableFrame viewable
Constructor Detail |
---|
public ActionViewerTarget(java.lang.String title, ViewableFrame viewable, STarget views)
All parameters are passed to the superclass.
Method Detail |
---|
protected final STrigger[] newActionTriggers(ViewableAction[] actions)
Returns triggers coupled via an internal subclass of
STrigger.Coupler
to actions
and suitable for passing to getTriggerAction(STrigger)
.
newActionTriggers
in class ViewerTarget
actions
- were passed to the constructor
STrigger
[] for storage as ViewerTarget.actionTriggers
protected final ViewableAction getTriggerAction(STrigger trigger)
Returns the ViewableAction
coupled to trigger
by
newActionTriggers(ViewableAction[])
getTriggerAction
in class ViewerTarget
trigger
- was coupled in ViewerTarget.newActionTriggers(ViewableAction[])
to the action to be checkedprotected final STarget newActionTriggerGroup(java.lang.String title, ViewableAction[] actions)
Groups created are suitable for return by ViewerTarget.newActionTriggerGroups(ViewableAction[])
.
title
- for the groupactions
- a subset of those passed to the constructor
ViewerTarget.actionTriggers
coupled to actions
in newActionTriggers(ViewableAction[])
public static SAreaTarget[] newViewerAreas(ViewableFrame viewable, SFrameTarget[] views)
Creates SAreaTarget
s each wrapping an instance of the same
trivial subclass of ActionViewerTarget
; this method cannot therefore be
used where the ViewableFrame
will define different ViewableAction
s
for the underlying SView
s.
viewable
- will be shared by all viewers createdviews
- each wrapping a SView
public final SView view()
view
in interface SViewer
SFrameTarget.framed
returned by viewFrame()
public final SSelection selection()
Returns a SSelection
for display in its viewer facet,
calling ViewableFrame.newViewerSelection(SViewer)
to obtain a suitable (sub-)selection within its content.
The SSelection
is memoed and returned at any subsequent invocation
until the next invocation of retargetFacets(Notifying.Impact)
, when it is destroyed
before SRetargetable.retarget(STarget,Notifying.Impact)
is called on attachedFacet()
.
selection
in interface SViewer
public final void selectionChanged(SSelection selection)
Calls ViewableFrame.viewerSelectionChanged(SViewer,SSelection)
followed by Notifying.notifyMonitor(Impact)
.
selectionChanged
in interface SViewer
selection
- defines the new selection.public final void selectionEdited(SSelection selection, java.lang.Object edit, boolean interim)
Calls ViewableFrame.viewerSelectionEdited(SViewer, Object, boolean)
followed by
Notifying.notifyMonitor(Impact)
.
selectionEdited
in interface SViewer
selection
- if null
implies edit should be applied to the
current selection; otherwise the selection should be changed to matchedit
- defines the change proposed to the selectioninterim
- if true
the edit forms part of a sequencepublic final void attachFacet(SFacet facet)
FacetedTarget
As a STarget
representing its FacetedTarget.attachedFacet()
,
FacetedTarget
can only attach a single viewer or area facet;
it should complain if any attempt is made to attach another.
attachFacet
in interface Facetable
attachFacet
in interface FacetedTarget
facet
- will be applied during each retargeting sequencepublic final SFacet attachedFacet()
FacetedTarget
SFacet
attached with FacetedTarget.attachFacet(SFacet)
.
Return the facet attached to this FacetedTarget
,
complaining if none yet attached.
attachedFacet
in interface FacetedTarget
public final void retargetFacets(Notifying.Impact impact)
Retargets any attached facet on this ViewerTarget
;
also destroys the currently memoed SSelection
.
retargetFacets
in interface Facetable
public boolean isActive()
FacetedTarget
isActive
in interface SViewer
isActive
in interface FacetedTarget
public final void ensureActive(boolean notify)
FacetedTarget
ensureActive
in interface FacetedTarget
notify
- if true
, also trigger a retargetingNotifying
public final SAreaTarget areaParent()
FacetedTarget
areaParent
in interface FacetedTarget
public final void setLive(boolean live)
setLive
in interface STarget
setLive
in class TargetCore
public final SFrameTarget viewFrame()
SView
currently returned by view()
.
(Encapsulates the logic for the implementation of view()
.)
SFrameTarget
or the indexed
of the SIndexing
set as views
.protected final boolean notifiesTargeter()
TargetCore
NOTE This method must NOT be overridden in application code.
notifiesTargeter
in class TargetCore
public java.lang.String toString()
toString
in class TargetCore
protected TypedNode[] newDebugChildren()
TypedNode[]
representation of this Notifying
for debug purposes.
newDebugChildren
in class TargetCore
public void setAreaParent(SAreaTarget parent)
public static final SFrameTarget[] newViewFrames(SView[] views)
SView
s in SFrameTarget
s.
views
- to be wrappedprotected static final TypedNode newDebugContentNode(java.lang.String title, java.lang.Object source)
protected static final TypedNode newDebugContentNode(java.lang.String title, java.lang.Object[] source)
protected static final TypedNode newDebugMonitorNode(Notifiable monitor)
public final TypedNode newGraphNode()
public Notifying.Impact impact()
Notifying
Notifying
to specify a default Notifying.Impact
.
impact
in interface Notifying
Notifying.Impact.DEFAULT
public java.lang.Object identity()
Identified
This will usually be a class instance counter.
identity
in interface Identified
public final Notifiable monitor()
Notifiable
in the notification tree,
as set with setMonitor
.
Complains if no parent has been set.
monitor
in interface Notifying
public void notify(Notice notice)
Notifiable
Notice
passed.
When this method is called, the Notifiable
should
respond based on
Notice
passed.
notify
in interface Notifiable
public final void notifyMonitor(Notifying.Impact impact)
Notifying
notify
on the parent monitor in the notification tree,
typically with itself as parameter to the Notice
passed.
Has no effect if no monitor has been set.
This is the usual means to trigger a surface retargeting, being called
by an exposing SFacet
on its target.
notifyMonitor
in interface Notifying
impact
- suggests the level of retargeting requiredprotected boolean blockNotification()
Checked by notify(Notice)
; default returns false
.
public final void setMonitor(Notifiable monitor)
Notifying
Notifying
to a Notifiable
parent
in the notification tree.
setMonitor
in interface Notifying
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |