Class DragSupport

java.lang.Object
eu.mihosoft.vrl.v3d.ext.openjfx.utils3d.DragSupport

public class DragSupport extends Object
Utility class that binds simple mouse gestures to number properties so that their values can be controlled with mouse drag events.
  • Field Summary Link icon

    Fields
    Modifier and Type
    Field
    Description
    javafx.event.EventHandler<javafx.scene.input.KeyEvent>
     
    javafx.event.EventHandler<javafx.scene.input.MouseEvent>
     
  • Constructor Summary Link icon

    Constructors
    Constructor
    Description
    DragSupport(javafx.scene.Scene target, javafx.scene.input.KeyCode modifier, javafx.geometry.Orientation orientation, javafx.beans.property.Property<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<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.
    DragSupport(javafx.scene.Scene target, javafx.scene.input.KeyCode modifier, javafx.scene.input.MouseButton mouseButton, javafx.geometry.Orientation orientation, javafx.beans.property.Property<Number> property)
     
    DragSupport(javafx.scene.Scene target, javafx.scene.input.KeyCode modifier, javafx.scene.input.MouseButton mouseButton, javafx.geometry.Orientation orientation, javafx.beans.property.Property<Number> property, double factor)
     
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    void
    Removes event handlers of this DragSupport instance from the target scene

    Methods inherited from class java.lang.Object Link icon

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details Link icon

    • keyboardEventHandler Link icon

      public javafx.event.EventHandler<javafx.scene.input.KeyEvent> keyboardEventHandler
    • mouseEventHandler Link icon

      public javafx.event.EventHandler<javafx.scene.input.MouseEvent> mouseEventHandler
  • Constructor Details Link icon

    • DragSupport Link icon

      public DragSupport(javafx.scene.Scene target, javafx.scene.input.KeyCode modifier, javafx.geometry.Orientation orientation, javafx.beans.property.Property<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
      Parameters:
      target - scene
      modifier - null if no modifier needed
      orientation - vertical or horizontal
      property - number property to control
      See Also:
    • DragSupport Link icon

      public DragSupport(javafx.scene.Scene target, javafx.scene.input.KeyCode modifier, javafx.scene.input.MouseButton mouseButton, javafx.geometry.Orientation orientation, javafx.beans.property.Property<Number> property)
    • DragSupport Link icon

      public DragSupport(javafx.scene.Scene target, javafx.scene.input.KeyCode modifier, javafx.geometry.Orientation orientation, javafx.beans.property.Property<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. Mouse movement amount is multiplied by given factor.
      Parameters:
      target - scene
      modifier - null if no modifier needed
      orientation - vertical or horizontal
      property - number property to control
      factor - multiplier for mouse movement amount
    • DragSupport Link icon

      public DragSupport(javafx.scene.Scene target, javafx.scene.input.KeyCode modifier, javafx.scene.input.MouseButton mouseButton, javafx.geometry.Orientation orientation, javafx.beans.property.Property<Number> property, double factor)
  • Method Details Link icon

    • detach Link icon

      public void detach()
      Removes event handlers of this DragSupport instance from the target scene