public class DragComponentEvent
extends java.util.EventObject
Modifier and Type | Field and Description |
---|---|
static int |
DRAGGEDID_CANCEL
Event ID used when the user cancels the drag
|
static int |
DRAGGEDID_END
Event ID used when the component is dropped
|
static int |
DRAGGEDID_MOVE
Event ID used when the component is being dragged to new place.
|
static int |
DRAGGEDID_START
Event ID used when dragging starts.
|
Constructor and Description |
---|
DragComponentEvent()
This event is reusable because we do not want to overload the GC when
the mouse is moved around.
|
DragComponentEvent(java.awt.Component src,
java.awt.Point ptMouse,
int nID,
int nModifiers)
The canonical form of the constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
consume()
consume the event
|
int |
getModifiers() |
java.awt.Point |
getPoint() |
boolean |
isConsumed() |
void |
set(java.awt.Component src,
java.awt.Point ptMouse,
int nID,
int nModifiers)
Sets new value on the object.
|
public static final int DRAGGEDID_START
public static final int DRAGGEDID_MOVE
public static final int DRAGGEDID_END
public static final int DRAGGEDID_CANCEL
public DragComponentEvent(java.awt.Component src, java.awt.Point ptMouse, int nID, int nModifiers)
public DragComponentEvent()
public void set(java.awt.Component src, java.awt.Point ptMouse, int nID, int nModifiers)
src
- The component being draggedptMouse
- the point where the component was taken in screen
coordinatesnID
- The event ID. Takes values from DRAGGEDID_xxxnModifiers
- See InputEvent.getModifiers()public java.awt.Point getPoint()
public int getModifiers()
public boolean isConsumed()
public void consume()