public class MouseControlUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
addSelectionRectangleGesture(Parent root,
Rectangle rect)
Adds a selection rectangle gesture to the specified parent node.
|
static void |
addSelectionRectangleGesture(Parent root,
Rectangle rect,
EventHandler<MouseEvent> dragHandler,
EventHandler<MouseEvent> pressHandler,
EventHandler<MouseEvent> releaseHandler)
Adds a selection rectangle gesture to the specified parent node.
|
static void |
makeDraggable(Node n)
Makes a node draggable via mouse gesture.
|
static void |
makeDraggable(Node n,
boolean centerNode)
Makes a node draggable via mouse gesture.
|
static void |
makeDraggable(Node n,
EventHandler<MouseEvent> dragHandler,
EventHandler<MouseEvent> pressHandler)
Makes a node draggable via mouse gesture.
|
static void |
makeDraggable(Node n,
EventHandler<MouseEvent> dragHandler,
EventHandler<MouseEvent> pressHandler,
boolean centerNode)
Makes a node draggable via mouse gesture.
|
public static void makeDraggable(Node n)
Note: Existing handlers will be replaced!
n - the node that shall be made draggablepublic static void makeDraggable(Node n, boolean centerNode)
Note: Existing handlers will be replaced!
n - the node that shall be made draggablepublic static void addSelectionRectangleGesture(Parent root, Rectangle rect)
Note:
To support selection a node must implement thejfxtras.labs.scene.control.window.SelectableNode interface.root - parent noderect - selectionn rectanglejfxtras.labs.scene.control.window.Clipboard,
jfxtras.labs.util.WindowUtil#getDefaultClipboard()public static void addSelectionRectangleGesture(Parent root, Rectangle rect, EventHandler<MouseEvent> dragHandler, EventHandler<MouseEvent> pressHandler, EventHandler<MouseEvent> releaseHandler)
Note:
To support selection a node must implement thejfxtras.labs.scene.control.window.SelectableNode interface.root - parent noderect - selectionn rectangledragHandler - additional drag handler (optional, may be
null)pressHandler - additional press handler (optional, may be
null)releaseHandler - additional release handler (optional, may be
null)jfxtras.labs.scene.control.window.Clipboard,
jfxtras.labs.util.WindowUtil#getDefaultClipboard()public static void makeDraggable(Node n, EventHandler<MouseEvent> dragHandler, EventHandler<MouseEvent> pressHandler)
Note: Existing handlers will be replaced!
n - the node that shall be made draggabledragHandler - additional drag handlerpressHandler - additional press handlerpublic static void makeDraggable(Node n, EventHandler<MouseEvent> dragHandler, EventHandler<MouseEvent> pressHandler, boolean centerNode)
Note: Existing handlers will be replaced!
n - the node that shall be made draggabledragHandler - additional drag handlerpressHandler - additional press handler