public class FXPinchSpreadTool extends AbstractTool<javafx.scene.Node>
FXPinchSpreadTool
is an AbstractTool
to handle
pinch/spread (zoom) interaction gestures.
The FXPinchSpreadTool
handles the opening and closing of an
transaction operation via the FXDomain
, to which it is adapted. It
controls that a single transaction operation is used for the complete
interaction, so all interaction results can be undone in a single undo step.
active
Modifier and Type | Field and Description |
---|---|
static java.lang.Class<IFXOnPinchSpreadPolicy> |
ON_PINCH_SPREAD_POLICY_KEY
The type of the policy that has to be supported by target parts.
|
ACTIVE_PROPERTY
Constructor and Description |
---|
FXPinchSpreadTool() |
Modifier and Type | Method and Description |
---|---|
java.util.List<? extends IFXOnPinchSpreadPolicy> |
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 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<IFXOnPinchSpreadPolicy> ON_PINCH_SPREAD_POLICY_KEY
public java.util.List<? extends IFXOnPinchSpreadPolicy> 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 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.