public class MouseControlUtil
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
addSelectionRectangleGesture(javafx.scene.Parent root,
javafx.scene.shape.Rectangle rect)
Adds a selection rectangle gesture to the specified parent node.
|
static void |
addSelectionRectangleGesture(javafx.scene.Parent root,
javafx.scene.shape.Rectangle rect,
javafx.event.EventHandler<javafx.scene.input.MouseEvent> dragHandler,
javafx.event.EventHandler<javafx.scene.input.MouseEvent> pressHandler,
javafx.event.EventHandler<javafx.scene.input.MouseEvent> releaseHandler)
Adds a selection rectangle gesture to the specified parent node.
|
static void |
makeDraggable(javafx.scene.Node n)
Makes a node draggable via mouse gesture.
|
static void |
makeDraggable(javafx.scene.Node n,
javafx.event.EventHandler<javafx.scene.input.MouseEvent> dragHandler,
javafx.event.EventHandler<javafx.scene.input.MouseEvent> pressHandler)
Makes a node draggable via mouse gesture.
|
public static void makeDraggable(javafx.scene.Node n)
Note: Existing handlers will be replaced!
n
- the node that shall be made draggablepublic static void addSelectionRectangleGesture(javafx.scene.Parent root, javafx.scene.shape.Rectangle rect)
Note:
To support selection a node must implement theSelectableNode
interface.root
- parent noderect
- selectionn rectangleClipboard
,
WindowUtil.getDefaultClipboard()
public static void addSelectionRectangleGesture(javafx.scene.Parent root, javafx.scene.shape.Rectangle rect, javafx.event.EventHandler<javafx.scene.input.MouseEvent> dragHandler, javafx.event.EventHandler<javafx.scene.input.MouseEvent> pressHandler, javafx.event.EventHandler<javafx.scene.input.MouseEvent> releaseHandler)
Note:
To support selection a node must implement theSelectableNode
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
)Clipboard
,
WindowUtil.getDefaultClipboard()
public static void makeDraggable(javafx.scene.Node n, javafx.event.EventHandler<javafx.scene.input.MouseEvent> dragHandler, javafx.event.EventHandler<javafx.scene.input.MouseEvent> pressHandler)
Note: Existing handlers will be replaced!
n
- the node that shall be made draggabledragHandler
- additional drag handlerpressHandler
- additional press handler