public class FXResizeRelocateOnHandleDragPolicy extends AbstractFXOnDragPolicy
FXResizeRelocateOnHandleDragPolicy
is an
AbstractFXOnDragPolicy
that handles the resize and relocation of its
(selected) first anchorage when an AbstractFXSegmentHandlePart
of the
box selection of the first anchorage is dragged with the mouse.Constructor and Description |
---|
FXResizeRelocateOnHandleDragPolicy() |
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<? extends javafx.scene.Node> |
getHost()
|
protected FXResizeRelocatePolicy |
getResizeRelocatePolicy()
Returns the
FXResizeRelocatePolicy that is installed on the
getTargetPart() . |
protected IVisualPart<javafx.scene.Node,? extends javafx.scene.Node> |
getTargetPart()
Returns the target
IVisualPart for this policy. |
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.
|
protected void |
updateDeltas(javafx.scene.input.MouseEvent e)
Computes the resize and relocation deltas from the given
MouseEvent . |
commit, disableRefreshVisuals, enableRefreshVisuals, getAdaptable, init, setAdaptable
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).public AbstractFXSegmentHandlePart<? extends javafx.scene.Node> getHost()
IPolicy
getHost
in interface IPolicy<javafx.scene.Node>
getHost
in class AbstractPolicy<javafx.scene.Node>
IPolicy
.protected FXResizeRelocatePolicy getResizeRelocatePolicy()
FXResizeRelocatePolicy
that is installed on the
getTargetPart()
.FXResizeRelocatePolicy
that is installed on the
getTargetPart()
.protected IVisualPart<javafx.scene.Node,? extends javafx.scene.Node> getTargetPart()
IVisualPart
for this policy. Per default the
first anchorage is returned.IVisualPart
for this policy.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).protected void updateDeltas(javafx.scene.input.MouseEvent e)
MouseEvent
. The
AbstractFXSegmentHandlePart.getSegmentIndex()
of the host
determines the logical position of the handle:
e
- The drag MouseEvent
.Copyright (c) 2014 itemis AG and others. All rights reserved.