public class DragSupport
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
javafx.event.EventHandler<javafx.scene.input.KeyEvent> |
keyboardEventHandler
The keyboard event handler.
|
javafx.event.EventHandler<javafx.scene.input.MouseEvent> |
mouseEventHandler
The mouse event handler.
|
| Constructor and Description |
|---|
DragSupport(javafx.scene.Scene target,
javafx.scene.input.KeyCode modifier,
javafx.scene.input.MouseButton mouseButton,
javafx.geometry.Orientation orientation,
javafx.beans.property.Property<java.lang.Number> property)
Instantiates a new drag support.
|
DragSupport(javafx.scene.Scene target,
javafx.scene.input.KeyCode modifier,
javafx.scene.input.MouseButton mouseButton,
javafx.geometry.Orientation orientation,
javafx.beans.property.Property<java.lang.Number> property,
double factor)
Instantiates a new drag support.
|
DragSupport(javafx.scene.Scene target,
javafx.scene.input.KeyCode modifier,
javafx.geometry.Orientation orientation,
javafx.beans.property.Property<java.lang.Number> property)
Creates DragSupport instance that attaches EventHandlers to the given scene
and responds to mouse and keyboard events in order to change given
property values according to mouse drag events of given orientation.
|
DragSupport(javafx.scene.Scene target,
javafx.scene.input.KeyCode modifier,
javafx.geometry.Orientation orientation,
javafx.beans.property.Property<java.lang.Number> property,
double factor)
Creates DragSupport instance that attaches EventHandlers to the given scene
and responds to mouse and keyboard events in order to change given
property values according to mouse drag events of given orientation.
|
| Modifier and Type | Method and Description |
|---|---|
void |
detach()
Removes event handlers of this DragSupport instance from the target scene.
|
public javafx.event.EventHandler<javafx.scene.input.KeyEvent> keyboardEventHandler
public javafx.event.EventHandler<javafx.scene.input.MouseEvent> mouseEventHandler
public DragSupport(javafx.scene.Scene target,
javafx.scene.input.KeyCode modifier,
javafx.geometry.Orientation orientation,
javafx.beans.property.Property<java.lang.Number> property)
target - scenemodifier - null if no modifier neededorientation - vertical or horizontalproperty - number property to controlDragSupport(javafx.scene.Scene, javafx.scene.input.KeyCode, javafx.geometry.Orientation, javafx.beans.property.Property, double)public DragSupport(javafx.scene.Scene target,
javafx.scene.input.KeyCode modifier,
javafx.scene.input.MouseButton mouseButton,
javafx.geometry.Orientation orientation,
javafx.beans.property.Property<java.lang.Number> property)
target - the targetmodifier - the modifiermouseButton - the mouse buttonorientation - the orientationproperty - the propertypublic DragSupport(javafx.scene.Scene target,
javafx.scene.input.KeyCode modifier,
javafx.geometry.Orientation orientation,
javafx.beans.property.Property<java.lang.Number> property,
double factor)
target - scenemodifier - null if no modifier neededorientation - vertical or horizontalproperty - number property to controlfactor - multiplier for mouse movement amountpublic DragSupport(javafx.scene.Scene target,
javafx.scene.input.KeyCode modifier,
javafx.scene.input.MouseButton mouseButton,
javafx.geometry.Orientation orientation,
javafx.beans.property.Property<java.lang.Number> property,
double factor)
target - the targetmodifier - the modifiermouseButton - the mouse buttonorientation - the orientationproperty - the propertyfactor - the factor