| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public class DragGestureEvent extends EventObject
A DragGestureEvent
is passed
to DragGestureListener
's
dragGestureRecognized() method
when a particular DragGestureRecognizer
detects that a
platform dependent drag initiating gesture has occurred
on the Component
that it is tracking.
Field Summary |
---|
Fields inherited from class java.util.EventObject |
---|
source |
Constructor Summary | |
---|---|
DragGestureEvent(DragGestureRecognizer dgr, int act, Point ori, List evs) Construct a DragGestureEvent given the
DragGestureRecognizer firing this event,
an int representing
the user's preferred action, a Point
indicating the origin of the drag, and a List
of events that comprise the gesture.
|
Method Summary | |
---|---|
Component |
Returns the Component associated
with this DragGestureEvent .
|
int |
Returns an int representing the
action selected by the user.
|
Point |
Returns a Point in the coordinates
of the Component over which the drag originated.
|
DragSource |
Returns the DragSource .
|
DragGestureRecognizer |
Returns the source as a DragGestureRecognizer .
|
InputEvent |
Returns the initial event that triggered the gesture. |
Iterator |
iterator() Returns an Iterator for the events
comprising the gesture.
|
void |
startDrag(Cursor dragCursor, Image dragImage, Point imageOffset, Transferable transferable, DragSourceListener dsl) Start the drag given the initial Cursor to display,
a drag Image , the offset of
the Image ,
the Transferable object, and
the DragSourceListener to use.
|
void |
startDrag(Cursor dragCursor, Transferable transferable) Starts the drag operation given the Cursor for this drag
operation and the Transferable representing the source data
for this drag operation.
|
void |
startDrag(Cursor dragCursor, Transferable transferable, DragSourceListener dsl) Starts the drag given the initial Cursor to display,
the Transferable object,
and the DragSourceListener to use.
|
Object[] |
toArray() Returns an Object array of the
events comprising the drag gesture.
|
Object[] |
Returns an array of the events comprising the drag gesture. |
Methods inherited from class java.util.EventObject |
---|
getSource, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DragGestureEvent(DragGestureRecognizer dgr, int act, Point ori, List evs)
DragGestureEvent
given the
DragGestureRecognizer
firing this event,
an int
representing
the user's preferred action, a Point
indicating the origin of the drag, and a List
of events that comprise the gesture.
dgr
- The DragGestureRecognizer
firing this eventact
- The the user's preferred actionori
- The origin of the dragevs
- The List
of events that comprise the gesture
Method Detail |
---|
public Component getComponent()
Component
associated
with this DragGestureEvent
.
public int getDragAction()
int
representing the
action selected by the user.
public Point getDragOrigin()
Point
in the coordinates
of the Component
over which the drag originated.
public DragSource getDragSource()
DragSource
.
DragSource
public DragGestureRecognizer getSourceAsDragGestureRecognizer()
DragGestureRecognizer
.
DragGestureRecognizer
public InputEvent getTriggerEvent()
public Iterator iterator()
Iterator
for the events
comprising the gesture.
public void startDrag(Cursor dragCursor, Image dragImage, Point imageOffset, Transferable transferable, DragSourceListener dsl) throws InvalidDnDOperationException
Cursor
to display,
a drag Image
, the offset of
the Image
,
the Transferable
object, and
the DragSourceListener
to use.
dragCursor
- The initial drag CursordragImage
- The source's dragImageimageOffset
- The dragImage's offsettransferable
- The source's Transferabledsl
- The source's DragSourceListener
InvalidDnDOperationException
public void startDrag(Cursor dragCursor, Transferable transferable) throws InvalidDnDOperationException
Cursor
for this drag
operation and the Transferable
representing the source data
for this drag operation.
null
Cursor
is specified no exception will
be thrown and default drag cursors will be used instead.
null
Transferable
is specified
NullPointerException
will be thrown.
dragCursor
- The Cursor
for this drag operationtransferable
- The Transferable
representing the source
data for this drag operation.InvalidDnDOperationException
public void startDrag(Cursor dragCursor, Transferable transferable, DragSourceListener dsl) throws InvalidDnDOperationException
Cursor
to display,
the Transferable
object,
and the DragSourceListener
to use.
dragCursor
- The initial drag Cursortransferable
- The source's Transferabledsl
- The source's DragSourceListener
InvalidDnDOperationException
public Object[] toArray()
Object
array of the
events comprising the drag gesture.
public Object[] toArray(Object[] array)
array
- the array of EventObject
sub(types)
| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |