| java.lang.Object java.util.EventObject java.awt.dnd.DragGestureEvent
Constructor Summary | |
public | DragGestureEvent(DragGestureRecognizer dgr, int act, Point ori, List<? extends InputEvent> evs) Constructs 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 | |
public Component | getComponent() Returns the Component associated
with this DragGestureEvent . | public int | getDragAction() Returns an int representing the
action selected by the user. | public Point | getDragOrigin() Returns a Point in the coordinates
of the Component over which the drag originated. | public DragSource | getDragSource() Returns the DragSource . | public DragGestureRecognizer | getSourceAsDragGestureRecognizer() Returns the source as a DragGestureRecognizer . | public InputEvent | getTriggerEvent() Returns the initial event that triggered the gesture. | public Iterator<InputEvent> | iterator() Returns an Iterator for the events
comprising the gesture. | public 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.
If a null Cursor is specified no exception will
be thrown and default drag cursors will be used instead.
If a null Transferable is specified
NullPointerException will be thrown.
Parameters: dragCursor - The initial Cursor for this drag operationor null for the default cursor handling;see DragSourceContextfor more details on the cursor handling mechanismduring drag and drop Parameters: transferable - The Transferable representing the sourcedata for this drag operation. throws: InvalidDnDOperationException - if the Drag and Dropsystem is unable to initiate a drag operation, or if the user attempts to start a drag while an existing drag operation isstill executing. | public 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. | public 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. | public Object[] | toArray() Returns an Object array of the
events comprising the drag gesture. | public Object[] | toArray(Object[] array) Returns an array of the events comprising the drag gesture. |
DragGestureEvent | public DragGestureEvent(DragGestureRecognizer dgr, int act, Point ori, List<? extends InputEvent> evs)(Code) | | Constructs 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.
Parameters: dgr - The DragGestureRecognizer firing this event Parameters: act - The the user's preferred action Parameters: ori - The origin of the drag Parameters: evs - The List of events that comprise the gesture throws: IllegalArgumentException - if input parameters are null
|
getComponent | public Component getComponent()(Code) | | Returns the Component associated
with this DragGestureEvent .
the Component |
getDragAction | public int getDragAction()(Code) | | Returns an int representing the
action selected by the user.
the action selected by the user |
getDragOrigin | public Point getDragOrigin()(Code) | | Returns a Point in the coordinates
of the Component over which the drag originated.
the Point where the drag originated in Component coords. |
getDragSource | public DragSource getDragSource()(Code) | | Returns the DragSource .
the DragSource |
getSourceAsDragGestureRecognizer | public DragGestureRecognizer getSourceAsDragGestureRecognizer()(Code) | | Returns the source as a DragGestureRecognizer .
the source as a DragGestureRecognizer |
getTriggerEvent | public InputEvent getTriggerEvent()(Code) | | Returns the initial event that triggered the gesture.
the first "triggering" event in the sequence of the gesture |
iterator | public Iterator<InputEvent> iterator()(Code) | | Returns an Iterator for the events
comprising the gesture.
an Iterator for the events comprising the gesture |
startDrag | public void startDrag(Cursor dragCursor, Transferable transferable) throws InvalidDnDOperationException(Code) | | Starts the drag operation given the Cursor for this drag
operation and the Transferable representing the source data
for this drag operation.
If a null Cursor is specified no exception will
be thrown and default drag cursors will be used instead.
If a null Transferable is specified
NullPointerException will be thrown.
Parameters: dragCursor - The initial Cursor for this drag operationor null for the default cursor handling;see DragSourceContextfor more details on the cursor handling mechanismduring drag and drop Parameters: transferable - The Transferable representing the sourcedata for this drag operation. throws: InvalidDnDOperationException - if the Drag and Dropsystem is unable to initiate a drag operation, or if the user attempts to start a drag while an existing drag operation isstill executing. throws: NullPointerException - if the Transferable is null since: 1.4 |
startDrag | public void startDrag(Cursor dragCursor, Transferable transferable, DragSourceListener dsl) throws InvalidDnDOperationException(Code) | | Starts the drag given the initial Cursor to display,
the Transferable object,
and the DragSourceListener to use.
Parameters: dragCursor - The initial Cursor for this drag operationor null for the default cursor handling;seeDragSourceContextfor more details on the cursor handling mechanismduring drag and drop Parameters: transferable - The source's Transferable Parameters: dsl - The source's DragSourceListener throws: InvalidDnDOperationException - if the Drag and Drop system is unable toinitiate a drag operation, or if the user attempts to start a drag while an existingdrag operation is still executing.
|
startDrag | public void startDrag(Cursor dragCursor, Image dragImage, Point imageOffset, Transferable transferable, DragSourceListener dsl) throws InvalidDnDOperationException(Code) | | 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.
Parameters: dragCursor - The initial Cursor for this drag operationor null for the default cursor handling;seeDragSourceContextfor more details on the cursor handling mechanismduring drag and drop Parameters: dragImage - The source's dragImage Parameters: imageOffset - The dragImage's offset Parameters: transferable - The source's Transferable Parameters: dsl - The source's DragSourceListener throws: InvalidDnDOperationException - if the Drag and Drop system is unable toinitiate a drag operation, or if the user attempts to start a drag while an existingdrag operation is still executing.
|
toArray | public Object[] toArray()(Code) | | Returns an Object array of the
events comprising the drag gesture.
an array of the events comprising the gesture |
toArray | public Object[] toArray(Object[] array)(Code) | | Returns an array of the events comprising the drag gesture.
Parameters: array - the array of EventObject sub(types) an array of the events comprising the gesture |
|
|