Class DragStartEvent

java.lang.Object
limn.scene.event.DragStartEvent

public final class DragStartEvent extends Object
The question a widget is asked when a drag may begin on it: a press that travelled a few points, or the drag key on a focused widget. The widget answers with a Drag, or with null to leave the gesture alone.
  • Constructor Details

    • DragStartEvent

      public DragStartEvent(float x, float y, int modifiers, boolean keyboard)
      Parameters:
      x - where the press began, in scene coordinates
      y - where the press began, in scene coordinates
      modifiers - the modifier keys held
      keyboard - whether the drag key asked, and not a pointer
  • Method Details

    • x

      public float x()
      Returns:
      where the press began, in scene coordinates; the widget's centre for a keyboard drag
    • y

      public float y()
      Returns:
      where the press began, in scene coordinates; the widget's centre for a keyboard drag
    • modifiers

      public int modifiers()
      Returns:
      the modifier keys held, as Keys.MOD_* bits
    • isKeyboard

      public boolean isKeyboard()
      Returns:
      whether the keyboard asked. The point is then not where anything is: a widget drags what is selected or focused in it