public class FXScaleRelocateOnHandleDragPolicy extends AbstractFXOnDragPolicy
FXScaleRelocateOnHandleDragPolicy is an
AbstractFXOnDragPolicy that relocates and scales the whole
selection when its host (a box selection handle,
AbstractFXSegmentHandlePart) is dragged.| Constructor and Description |
|---|
FXScaleRelocateOnHandleDragPolicy()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
drag(javafx.scene.input.MouseEvent e,
Dimension delta)
This callback method is invoked when the mouse is moved while a button is
pressed.
|
AbstractFXSegmentHandlePart<javafx.scene.Node> |
getHost()
|
protected FXScaleRelocatePolicy |
getScaleRelocatePolicy(IContentPart<javafx.scene.Node,? extends javafx.scene.Node> part)
Returns the
FXScaleRelocatePolicy that is installed on the given
IContentPart. |
java.util.List<IContentPart<javafx.scene.Node,? extends javafx.scene.Node>> |
getTargetParts()
Returns a
List containing all IContentParts that should
be scaled/relocated by this policy. |
protected Rectangle |
getVisualBounds(IContentPart<javafx.scene.Node,? extends javafx.scene.Node> contentPart)
Returns a
Rectangle representing the visual bounds of the given
IContentPart within the coordinate system of the Scene. |
void |
press(javafx.scene.input.MouseEvent e)
This callback method is invoked when a mouse button is pressed on the
host. |
void |
release(javafx.scene.input.MouseEvent e,
Dimension delta)
This callback method is invoked when the previously pressed mouse button
is released.
|
commit, disableRefreshVisuals, enableRefreshVisuals, getAdaptable, init, setAdaptablepublic FXScaleRelocateOnHandleDragPolicy()
public void drag(javafx.scene.input.MouseEvent e,
Dimension delta)
AbstractFXOnDragPolicydrag in class AbstractFXOnDragPolicye - The original MouseEvent.delta - The mouse offset since AbstractFXOnDragPolicy.press(MouseEvent) (in pixel).public AbstractFXSegmentHandlePart<javafx.scene.Node> getHost()
IPolicygetHost in interface IPolicy<javafx.scene.Node>getHost in class AbstractPolicy<javafx.scene.Node>IPolicy.protected FXScaleRelocatePolicy getScaleRelocatePolicy(IContentPart<javafx.scene.Node,? extends javafx.scene.Node> part)
FXScaleRelocatePolicy that is installed on the given
IContentPart.part - The IContentPart of which the
FXScaleRelocatePolicy is returned.FXScaleRelocatePolicy that is installed on the given
IContentPart.public java.util.List<IContentPart<javafx.scene.Node,? extends javafx.scene.Node>> getTargetParts()
List containing all IContentParts that should
be scaled/relocated by this policy. Per default, the whole
selection is returned.List containing all IContentParts that should
be scaled/relocated by this policy.protected Rectangle getVisualBounds(IContentPart<javafx.scene.Node,? extends javafx.scene.Node> contentPart)
Rectangle representing the visual bounds of the given
IContentPart within the coordinate system of the Scene.contentPart - The IContentPart of which the visual bounds are
computed.Rectangle representing the visual bounds of the given
IContentPart within the coordinate system of the
Scene.public void press(javafx.scene.input.MouseEvent e)
AbstractFXOnDragPolicyhost.press in class AbstractFXOnDragPolicye - The original MouseEventpublic void release(javafx.scene.input.MouseEvent e,
Dimension delta)
AbstractFXOnDragPolicyrelease in class AbstractFXOnDragPolicye - The original MouseEvent.delta - The mouse offset since AbstractFXOnDragPolicy.press(MouseEvent) (in pixel).Copyright (c) 2014 itemis AG and others. All rights reserved.