public class FXTypeTool extends AbstractTool<javafx.scene.Node>
FXTypeTool
is an AbstractTool
that handles keyboard
input.active
Modifier and Type | Field and Description |
---|---|
static java.lang.Class<IFXOnTypePolicy> |
ON_TYPE_POLICY_KEY
The type of the policy that has to be supported by target parts.
|
ACTIVE_PROPERTY
Constructor and Description |
---|
FXTypeTool() |
Modifier and Type | Method and Description |
---|---|
java.util.List<? extends IFXOnTypePolicy> |
getActivePolicies(IViewer<javafx.scene.Node> viewer)
Returns an (unmodifiable) list containing the
interaction
policies that are currently active within this tool for the given
IViewer , i.e. the target policies of this tool that get notified
about events within the given IViewer . |
protected java.util.List<? extends IFXOnTypePolicy> |
getTargetPolicies(javafx.scene.input.KeyEvent event)
Returns a
Set containing all IFXOnTypePolicy s that are
installed on the target IVisualPart for the given
KeyEvent . |
protected java.util.List<? extends IFXOnTypePolicy> |
getTargetPolicies(javafx.scene.Scene scene)
Returns a
Set containing all IFXOnTypePolicy s that are
installed on the target IVisualPart for the given Scene . |
protected void |
registerListeners()
This method is called when a valid
IDomain is attached to this
tool so that you can register event listeners for various inputs
(keyboard, mouse) or model changes (selection, scroll offset / viewport). |
protected void |
unregisterListeners()
This method is called when the attached
IDomain is reset to
null so that you can unregister previously registered event
listeners. |
activate, activeProperty, clearActivePolicies, deactivate, getAdaptable, getDomain, isActive, setActivePolicies, setAdaptable
public static final java.lang.Class<IFXOnTypePolicy> ON_TYPE_POLICY_KEY
public java.util.List<? extends IFXOnTypePolicy> getActivePolicies(IViewer<javafx.scene.Node> viewer)
ITool
interaction
policies
that are currently active within this tool for the given
IViewer
, i.e. the target policies of this tool that get notified
about events within the given IViewer
.getActivePolicies
in interface ITool<javafx.scene.Node>
getActivePolicies
in class AbstractTool<javafx.scene.Node>
viewer
- The IViewer
for which to return the active policies.interaction
policies
that are currently active within this tool.protected java.util.List<? extends IFXOnTypePolicy> getTargetPolicies(javafx.scene.input.KeyEvent event)
Set
containing all IFXOnTypePolicy
s that are
installed on the target IVisualPart
for the given
KeyEvent
. The target IVisualPart
is determined by using
getTargetPolicies(Scene)
.event
- The KeyEvent
to transfer.Set
containing all IFXOnTypePolicy
s that are
installed on the target IVisualPart
for the given
KeyEvent
.protected java.util.List<? extends IFXOnTypePolicy> getTargetPolicies(javafx.scene.Scene scene)
Set
containing all IFXOnTypePolicy
s that are
installed on the target IVisualPart
for the given Scene
.
If an IVisualPart
within the given Scene
has keyboard
focus, that part is used as the target part. Otherwise, the root part of
the IViewer
that is rendered in the given Scene
is used
as the target part.scene
- The Scene
for which to determine the
IFXOnTypePolicy
s that are installed on the target
IVisualPart
.List
containing all IFXOnTypePolicy
s that are
installed on the target IVisualPart
for the given
Scene
.protected void registerListeners()
AbstractTool
IDomain
is attached to this
tool so that you can register event listeners for various inputs
(keyboard, mouse) or model changes (selection, scroll offset / viewport).registerListeners
in class AbstractTool<javafx.scene.Node>
protected void unregisterListeners()
AbstractTool
IDomain
is reset to
null
so that you can unregister previously registered event
listeners.unregisterListeners
in class AbstractTool<javafx.scene.Node>
Copyright (c) 2014 itemis AG and others. All rights reserved.