|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ToolActivationPolicy
The ToolActivationPolicy
is tasked by ToolManager
with the election of a
Tool
to be activated in a given situation.
Many Tools perform their purpose only if they are the currently active Tool, i.e. if (and only
if) the Tool is the one returned by ToolManager.getActiveTool()
. The active Tool may
either be determined by explicitly activating it (via ToolManager.activate(Class)
) or
automatically, based on the current state of the UI. Tool auto activation is performed by the
ToolManager if the following holds:
Tool.ActivationRequest
s (via
Tool.getActivationRequest(EditEvent)
.
Nested Class Summary | |
---|---|
static class |
ToolActivationPolicy.ActivationCandidate
The ActivationCandidate is used to communicate possible candidates for Tool auto activation along with their Tool.ActivationRequest s. |
Method Summary | |
---|---|
ToolActivationPolicy.ActivationCandidate |
electActiveTool(List<ToolActivationPolicy.ActivationCandidate> candidates,
EditEvent event,
ToolManager manager)
This method is queried by the given ToolManager instance with a list of candidate Tools
to be activated (wrapped as ToolActivationPolicy.ActivationCandidate s) in response to a given
EditEvent . |
ToolActivationPolicy.ActivationCandidate |
electFeedback(List<ToolActivationPolicy.ActivationCandidate> candidates,
EditEvent e,
ToolManager toolManager)
This method is queried by the given ToolManager instance with a list of candidate Tools
to be activated (wrapped as ToolActivationPolicy.ActivationCandidate s) in response to a given
EditEvent . |
Method Detail |
---|
ToolActivationPolicy.ActivationCandidate electActiveTool(List<ToolActivationPolicy.ActivationCandidate> candidates, EditEvent event, ToolManager manager)
ToolManager
instance with a list of candidate Tools
to be activated (wrapped as ToolActivationPolicy.ActivationCandidate
s) in response to a given
EditEvent
. If the activation policy determines that one of the candidate Tools shall be
auto-activated it must return the corresponding Tool.ActivationRequest
. If no Tool shall be
activated, it must return null
.
ToolActivationPolicy.ActivationCandidate electFeedback(List<ToolActivationPolicy.ActivationCandidate> candidates, EditEvent e, ToolManager toolManager)
ToolManager
instance with a list of candidate Tools
to be activated (wrapped as ToolActivationPolicy.ActivationCandidate
s) in response to a given
EditEvent
. In contrast to electActiveTool(List, EditEvent, ToolManager)
this
method is called during the feedback phase. If the activation policy determines that one of the
candidate tools may become activated upon a subsequent mouse pressed or dragged event, it must
return the corresponding Tool.ActivationRequest
. Otherwise it must return null
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |