Class DragEvent

  • All Implemented Interfaces:
    java.lang.Cloneable

    public class DragEvent
    extends PenEvent
    An event that represents a pen drag.
    • Field Detail

      • RIGHT

        public static final int RIGHT
        The direction constant for a drag or flick right.
        See Also:
        Constant Field Values
      • LEFT

        public static final int LEFT
        The direction constant for a drag or flick left.
        See Also:
        Constant Field Values
      • UP

        public static final int UP
        The direction constant for a drag or flick up.
        See Also:
        Constant Field Values
      • DOWN

        public static final int DOWN
        The direction constant for a drag or flick down.
        See Also:
        Constant Field Values
      • DIRECTIONS

        public static final java.lang.String[] DIRECTIONS
      • xDelta

        public int xDelta
      • yDelta

        public int yDelta
      • xTotal

        public int xTotal
      • yTotal

        public int yTotal
      • direction

        public int direction
      • dragId

        public int dragId
        Unique id for the entire physical drag.
    • Constructor Detail

      • DragEvent

        public DragEvent()
        Constructs an empty DragEvent.
      • DragEvent

        public DragEvent​(PenEvent evt)
        Constructs a new DragEvent from a PenEvent, setting a new timestamp and setting consumed to false.
    • Method Detail

      • update

        public DragEvent update​(PenEvent evt)
        Updates this DragEvent from a PenEvent, setting a new timestamp and setting consumed to false.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class PenEvent
      • getInverseDirection

        public static int getInverseDirection​(int direction)