totalcross.ui.event
Class DragEvent

totalcross.lang.Object
  extended by totalcross.ui.event.Event
      extended by totalcross.ui.event.PenEvent
          extended by totalcross.ui.event.DragEvent

public class DragEvent
extends PenEvent

An event that represents a pen drag.


Field Summary
 int direction
           
static int DOWN
          The direction constant for a drag or flick down.
static int LEFT
          The direction constant for a drag or flick left.
static int RIGHT
          The direction constant for a drag or flick right.
static int UP
          The direction constant for a drag or flick up.
 int xDelt
           
 int xTotal
           
 int yDelt
           
 int yTotal
           
 
Fields inherited from class totalcross.ui.event.PenEvent
EVENT_NAME, modifiers, PEN_DOWN, PEN_DRAG, PEN_DRAG_END, PEN_DRAG_START, PEN_UP, x, y
 
Fields inherited from class totalcross.ui.event.Event
consumed, target, timeStamp, type
 
Constructor Summary
DragEvent()
          Constructs an empty DragEvent.
DragEvent(PenEvent evt)
          Constructs a new DragEvent from a PenEvent, setting a new timestamp and setting consumed to false.
 
Method Summary
 String toString()
           
 DragEvent update(PenEvent evt)
          Updates this DragEvent from a PenEvent, setting a new timestamp and setting consumed to false.
 
Methods inherited from class totalcross.ui.event.PenEvent
update
 
Methods inherited from class totalcross.ui.event.Event
clearQueue, getNextAvailableEventId, isAvailable, touch
 
Methods inherited from class totalcross.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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

xDelt

public int xDelt

yDelt

public int yDelt

xTotal

public int xTotal

yTotal

public int yTotal

direction

public int direction
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 String toString()
Overrides:
toString in class PenEvent