public class FXTypeTool extends AbstractTool<javafx.scene.Node>
FXTypeTool
is an AbstractTool
that handles keyboard
input.Modifier and Type | Field and Description |
---|---|
static java.lang.Class<AbstractFXOnTypePolicy> |
TOOL_POLICY_KEY
The type of the policy that has to be supported by target parts.
|
pcs
ACTIVE_PROPERTY
Constructor and Description |
---|
FXTypeTool() |
Modifier and Type | Method and Description |
---|---|
protected java.util.Set<? extends AbstractFXOnTypePolicy> |
getKeyPolicies(IVisualPart<javafx.scene.Node,? extends javafx.scene.Node> targetPart)
Returns a
Set containing all AbstractFXOnTypePolicy s that
are installed on the given target IVisualPart . |
protected java.util.Set<? extends AbstractFXOnTypePolicy> |
getTargetPolicies(javafx.scene.input.KeyEvent event)
Returns a
Set containing all AbstractFXOnTypePolicy s that
are installed on the target IVisualPart for the given
KeyEvent . |
protected java.util.Set<? extends AbstractFXOnTypePolicy> |
getTargetPolicies(javafx.scene.Scene scene)
Returns a
Set containing all AbstractFXOnTypePolicy 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, addPropertyChangeListener, deactivate, getAdaptable, getDomain, isActive, removePropertyChangeListener, setAdaptable
public static final java.lang.Class<AbstractFXOnTypePolicy> TOOL_POLICY_KEY
protected java.util.Set<? extends AbstractFXOnTypePolicy> getKeyPolicies(IVisualPart<javafx.scene.Node,? extends javafx.scene.Node> targetPart)
Set
containing all AbstractFXOnTypePolicy
s that
are installed on the given target IVisualPart
.targetPart
- The target IVisualPart
of which the
AbstractFXOnTypePolicy
s are returned.Set
containing all AbstractFXOnTypePolicy
s that
are installed on the given target IVisualPart
.protected java.util.Set<? extends AbstractFXOnTypePolicy> getTargetPolicies(javafx.scene.input.KeyEvent event)
Set
containing all AbstractFXOnTypePolicy
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 AbstractFXOnTypePolicy
s that
are installed on the target IVisualPart
for the given
KeyEvent
.protected java.util.Set<? extends AbstractFXOnTypePolicy> getTargetPolicies(javafx.scene.Scene scene)
Set
containing all AbstractFXOnTypePolicy
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
AbstractFXOnTypePolicy
s that are installed on the
target IVisualPart
.Set
containing all AbstractFXOnTypePolicy
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.