de.grogra.pf.ui.event
Class DragEvent

java.lang.Object
  extended by java.util.EventObject
      extended by de.grogra.pf.ui.event.EditEvent
          extended by de.grogra.pf.ui.event.InputEditEvent
              extended by de.grogra.pf.ui.event.MouseEditEvent
                  extended by de.grogra.pf.ui.event.DragEvent
All Implemented Interfaces:
Context, java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
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:
Serialized Form

Field Summary
static int DRAGGING_CONTINUED
           
static int DRAGGING_FINISHED
           
static int DRAGGING_STARTED
           
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
DragEvent()
           
 
Method Summary
 boolean draggingContinued()
          Returns true iff this event is an intermediate drag event in a sequence of drag events.
 boolean draggingFinished()
          Returns true iff this event is the last drag event in a sequence of drag events.
 boolean draggingStarted()
          Returns true iff this event is the first drag event in a sequence of drag events.
 int getDeltaX()
          Returns the x-difference of the mouse pointer in pixels between the previous drag event and this drag event.
 int getDeltaY()
          Returns the y-difference of the mouse pointer in pixels between the previous drag event and this drag event.
 int getEventType()
           
protected  java.lang.String paramString()
           
 DragEvent setDragData(int dragState, int deltaX, int deltaY)
           
 
Methods inherited from class de.grogra.pf.ui.event.MouseEditEvent
getClickCount, getModifiers, getX, getY, isAltDown, isControlDown, isMetaDown, isShiftDown, set, set
 
Methods inherited from class de.grogra.pf.ui.event.InputEditEvent
consume, isConsumed
 
Methods inherited from class de.grogra.pf.ui.event.EditEvent
clone, getComponent, getPanel, getWindow, getWorkbench, set, set, set, toString
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DRAGGING_CONTINUED

public static final int DRAGGING_CONTINUED
See Also:
Constant Field Values

DRAGGING_FINISHED

public static final int DRAGGING_FINISHED
See Also:
Constant Field Values

DRAGGING_STARTED

public static final int DRAGGING_STARTED
See Also:
Constant Field Values
Constructor Detail

DragEvent

public DragEvent()
Method Detail

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

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

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

getEventType

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

paramString

protected java.lang.String paramString()
Overrides:
paramString in class MouseEditEvent

setDragData

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