Module platform

Class DragEvent

All Implemented Interfaces:
Context, Serializable, Cloneable
Direct Known Subclasses:
DragEvent2D, DragEvent3D

public class DragEvent extends MouseEditEvent
A DragEvent represents a mouse-drag event. It contains state information about the dragging process.
Author:
Ole Kniemeyer
See Also:
  • Field Details

  • Constructor Details

    • DragEvent

      public DragEvent()
  • Method Details

    • setDragData

      public DragEvent setDragData(int dragState, int deltaX, int deltaY)
    • draggingStarted

      public final boolean draggingStarted()
      Returns true iff this event is the first drag event in a sequence of drag events.
      Returns:
      true iff draggging has just been started
    • draggingContinued

      public final boolean draggingContinued()
      Returns true iff this event is an intermediate drag event in a sequence of drag events.
      Returns:
      true iff dragging has been continued and not yet finished
    • draggingFinished

      public final boolean draggingFinished()
      Returns true iff this event is the last drag event in a sequence of drag events.
      Returns:
      true iff dragging has been finished
    • getEventType

      public final int getEventType()
      Overrides:
      getEventType in class MouseEditEvent
    • getDeltaX

      public final int getDeltaX()
      Returns the x-difference of the mouse pointer in pixels between the previous drag event and this drag event.
      Returns:
      the x-movement of the mouse
    • getDeltaY

      public final int getDeltaY()
      Returns the y-difference of the mouse pointer in pixels between the previous drag event and this drag event.
      Returns:
      the y-movement of the mouse
    • paramString

      protected String paramString()
      Overrides:
      paramString in class MouseEditEvent