public class FXRotateSelectedOnHandleDragPolicy extends AbstractFXOnDragPolicy
FXRotateSelectedOnHandleDragPolicy
is an
AbstractFXOnDragPolicy
that rotates the whole selection
when a selection handle is dragged.Constructor and Description |
---|
FXRotateSelectedOnHandleDragPolicy() |
Modifier and Type | Method and Description |
---|---|
protected Angle |
computeRotationAngleCW(javafx.scene.input.MouseEvent e,
IVisualPart<javafx.scene.Node,? extends javafx.scene.Node> part)
Computes the clock-wise rotation angle based on the initial mouse
position and the actual mouse position.
|
void |
drag(javafx.scene.input.MouseEvent e,
Dimension delta)
This callback method is invoked when the mouse is moved while a button is
pressed.
|
protected FXRotatePolicy |
getRotatePolicy(IVisualPart<javafx.scene.Node,? extends javafx.scene.Node> part)
Returns the
FXRotatePolicy that is installed on the given
IVisualPart . |
protected java.util.List<IContentPart<javafx.scene.Node,? extends javafx.scene.Node>> |
getTargetParts()
Returns a
List containing the whole selection . |
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, getHost, init, setAdaptable
protected Angle computeRotationAngleCW(javafx.scene.input.MouseEvent e, IVisualPart<javafx.scene.Node,? extends javafx.scene.Node> part)
e
- The latest MouseEvent
.part
- The IVisualPart
that is rotated.public void drag(javafx.scene.input.MouseEvent e, Dimension delta)
AbstractFXOnDragPolicy
drag
in class AbstractFXOnDragPolicy
e
- The original MouseEvent
.delta
- The mouse offset since AbstractFXOnDragPolicy.press(MouseEvent)
(in pixel).protected FXRotatePolicy getRotatePolicy(IVisualPart<javafx.scene.Node,? extends javafx.scene.Node> part)
FXRotatePolicy
that is installed on the given
IVisualPart
.part
- The IVisualPart
of which the FXRotatePolicy
is
returned.FXRotatePolicy
that is installed on the given
IVisualPart
.protected java.util.List<IContentPart<javafx.scene.Node,? extends javafx.scene.Node>> getTargetParts()
List
containing the whole selection
.List
containing the whole selection
.public void press(javafx.scene.input.MouseEvent e)
AbstractFXOnDragPolicy
host
.press
in class AbstractFXOnDragPolicy
e
- The original MouseEvent
public void release(javafx.scene.input.MouseEvent e, Dimension delta)
AbstractFXOnDragPolicy
release
in class AbstractFXOnDragPolicy
e
- The original MouseEvent
.delta
- The mouse offset since AbstractFXOnDragPolicy.press(MouseEvent)
(in pixel).Copyright (c) 2014 itemis AG and others. All rights reserved.