public class FXResizeTransformSelectedOnHandleDragPolicy extends AbstractFXInteractionPolicy implements IFXOnDragPolicy
FXResizeTransformSelectedOnHandleDragPolicy is an
IFXOnDragPolicy that relocates and scales the whole
selection when its host (a box selection handle,
AbstractFXSegmentHandlePart) is dragged.adaptableadaptableIAdaptable.Bound.Impl<T extends IAdaptable>| Constructor and Description |
|---|
FXResizeTransformSelectedOnHandleDragPolicy()
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.
|
void |
dragAborted()
This callback method is invoked when the mouse drag gesture is aborted,
i.e. the gesture ends unexpectedly, without a mouse release event being
fired.
|
protected CursorSupport |
getCursorSupport()
Returns the
CursorSupport of this policy. |
AbstractFXSegmentHandlePart<javafx.scene.Node> |
getHost()
|
protected FXResizePolicy |
getResizePolicy(IContentPart<javafx.scene.Node,? extends javafx.scene.Node> part)
Returns the
FXResizePolicy that is installed on the given
IContentPart. |
protected double |
getSnapToGridGranularityX()
Returns the horizontal granularity for "snap-to-grid" where
1 means it will snap to integer grid positions. |
protected double |
getSnapToGridGranularityY()
Returns the vertical granularity for "snap-to-grid" where
1
means it will snap to integer grid positions. |
protected 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 FXTransformPolicy |
getTransformPolicy(IContentPart<javafx.scene.Node,? extends javafx.scene.Node> part)
Returns the
FXTransformPolicy that is installed on the given
IContentPart. |
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 |
hideIndicationCursor()
Restores the original mouse cursor when it was previously changed by a
call to
IFXOnDragPolicy.showIndicationCursor(KeyEvent) or
IFXOnDragPolicy.showIndicationCursor(MouseEvent). |
protected boolean |
isResizeTransform(javafx.scene.input.MouseEvent event)
Returns
true if the given MouseEvent should trigger
resize and transform of the selected parts. |
void |
press(javafx.scene.input.MouseEvent e)
This callback method is invoked when a mouse button is pressed on the
host, which starts a mouse drag gesture.
|
void |
release(javafx.scene.input.MouseEvent e,
Dimension delta)
This callback method is invoked when the initially pressed mouse button
is released, which ends the gesture.
|
boolean |
showIndicationCursor(javafx.scene.input.KeyEvent event)
Changes the mouse cursor depending on the given
KeyEvent to
indicate the action that is performed by this policy. |
boolean |
showIndicationCursor(javafx.scene.input.MouseEvent event)
Changes the mouse cursor depending on the given
MouseEvent to
indicate the action that is performed by this policy. |
isRegistered, isRegisteredForHostcommit, init, restoreRefreshVisuals, rollback, storeAndDisableRefreshVisualsadaptableProperty, getAdaptable, setAdaptableclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitadaptableProperty, getAdaptable, setAdaptablepublic FXResizeTransformSelectedOnHandleDragPolicy()
public void drag(javafx.scene.input.MouseEvent e,
Dimension delta)
IFXOnDragPolicydrag in interface IFXOnDragPolicye - The original MouseEvent.delta - The mouse offset since IFXOnDragPolicy.press(MouseEvent) (in pixel).public void dragAborted()
IFXOnDragPolicydragAborted in interface IFXOnDragPolicyprotected CursorSupport getCursorSupport()
CursorSupport of this policy.CursorSupport of this policy.public AbstractFXSegmentHandlePart<javafx.scene.Node> getHost()
IPolicygetHost in interface IPolicy<javafx.scene.Node>getHost in class AbstractPolicy<javafx.scene.Node>IPolicy.protected FXResizePolicy getResizePolicy(IContentPart<javafx.scene.Node,? extends javafx.scene.Node> part)
FXResizePolicy that is installed on the given
IContentPart.part - The IContentPart of which the FXResizePolicy
is returned.FXResizePolicy that is installed on the given
IContentPart.protected double getSnapToGridGranularityX()
1 means it will snap to integer grid positions.protected double getSnapToGridGranularityY()
1
means it will snap to integer grid positions.protected 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 FXTransformPolicy getTransformPolicy(IContentPart<javafx.scene.Node,? extends javafx.scene.Node> part)
FXTransformPolicy that is installed on the given
IContentPart.part - The IContentPart of which the
FXTransformPolicy is returned.FXTransformPolicy that is installed on the given
IContentPart.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 hideIndicationCursor()
IFXOnDragPolicyIFXOnDragPolicy.showIndicationCursor(KeyEvent) or
IFXOnDragPolicy.showIndicationCursor(MouseEvent).hideIndicationCursor in interface IFXOnDragPolicyprotected boolean isResizeTransform(javafx.scene.input.MouseEvent event)
true if the given MouseEvent should trigger
resize and transform of the selected parts. Otherwise returns
false. Per default, returns true if
<Control> is not pressed and at least two target parts
are present.event - The ScrollEvent in question.true to indicate that the given ScrollEvent
should trigger panning, otherwise false.public void press(javafx.scene.input.MouseEvent e)
IFXOnDragPolicypress in interface IFXOnDragPolicye - The original MouseEventpublic void release(javafx.scene.input.MouseEvent e,
Dimension delta)
IFXOnDragPolicyrelease in interface IFXOnDragPolicye - The original MouseEvent.delta - The mouse offset since IFXOnDragPolicy.press(MouseEvent) (in pixel).public boolean showIndicationCursor(javafx.scene.input.KeyEvent event)
IFXOnDragPolicyKeyEvent to
indicate the action that is performed by this policy. The return value
indicates if the mouse cursor was changed or not.showIndicationCursor in interface IFXOnDragPolicyevent - The KeyEvent that initiated the determination of an
indication cursor.true if the mouse cursor was changed, otherwise
false.public boolean showIndicationCursor(javafx.scene.input.MouseEvent event)
IFXOnDragPolicyMouseEvent to
indicate the action that is performed by this policy. The return value
indicates if the mouse cursor was changed or not.showIndicationCursor in interface IFXOnDragPolicyevent - The MouseEvent that initiated the determination of an
indication cursor.true if the mouse cursor was changed, otherwise
false.Copyright (c) 2014 itemis AG and others. All rights reserved.