public class FXMarqueeOnDragPolicy extends AbstractFXInteractionPolicy implements IFXOnDragPolicy
FXMarqueeOnDragPolicy is an IFXOnDragPolicy that performs
marquee selection when the mouse is dragged. The start and end position of
the mouse span a marquee area. Everything within that area will be selected.adaptableadaptableIAdaptable.Bound.Impl<T extends IAdaptable>| Constructor and Description |
|---|
FXMarqueeOnDragPolicy() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addFeedback()
Adds a feedback rectangle to the root part of the
host
. |
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.
|
static java.util.List<javafx.scene.Node> |
findContainedNodes(javafx.scene.Node root,
double x0,
double y0,
double x1,
double y1)
Returns a
List of all Nodes that are descendants of the
given root Node and fully contained within the bounds specified
by [x0, y0, x1, y1]. |
protected CursorSupport |
getCursorSupport()
Returns the
CursorSupport of this policy. |
protected java.util.List<IContentPart<javafx.scene.Node,? extends javafx.scene.Node>> |
getParts(java.util.List<javafx.scene.Node> nodes)
|
protected javafx.scene.paint.Color |
getPrimarySelectionColor()
Returns the primary selection
Color. |
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 |
isMarquee(javafx.scene.input.MouseEvent event)
Returns
true if the given MouseEvent should trigger
marquee selection. |
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.
|
protected void |
removeFeedback()
Removes the feedback rectangle.
|
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. |
protected void |
updateFeedback()
Updates the feedback rectangle.
|
isRegistered, isRegisteredForHostcommit, init, restoreRefreshVisuals, rollback, storeAndDisableRefreshVisualsadaptableProperty, getAdaptable, getHost, setAdaptableclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitadaptableProperty, getAdaptable, setAdaptablepublic static java.util.List<javafx.scene.Node> findContainedNodes(javafx.scene.Node root,
double x0,
double y0,
double x1,
double y1)
List of all Nodes that are descendants of the
given root Node and fully contained within the bounds specified
by [x0, y0, x1, y1].root - The root Node.x0 - The minimum x-coordinate.y0 - The minimum y-coordinate.x1 - The maximum x-coordinate.y1 - The maximum y-coordinate.List containing all Nodes that are descendants
of the given root Node and fully contained within the
specified bounds.protected void addFeedback()
host
. The rectangle will show the marquee area.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.protected java.util.List<IContentPart<javafx.scene.Node,? extends javafx.scene.Node>> getParts(java.util.List<javafx.scene.Node> nodes)
nodes - The List of Nodes for which the corresponding
IContentParts are returned.List containing all IContentParts that are
corresponding to the given Nodes.protected javafx.scene.paint.Color getPrimarySelectionColor()
Color.Color.public void hideIndicationCursor()
IFXOnDragPolicyIFXOnDragPolicy.showIndicationCursor(KeyEvent) or
IFXOnDragPolicy.showIndicationCursor(MouseEvent).hideIndicationCursor in interface IFXOnDragPolicyprotected boolean isMarquee(javafx.scene.input.MouseEvent event)
true if the given MouseEvent should trigger
marquee selection. Otherwise returns false. Per default
returns true if the event target is not registered.event - The MouseEvent in question.true if the given KeyEvent should trigger
zooming, 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).protected void removeFeedback()
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.protected void updateFeedback()
Copyright (c) 2014 itemis AG and others. All rights reserved.