java.awt.dnd
Class DragGestureEvent
java.lang.Object
|
+--java.util.EventObject
|
+--java.awt.dnd.DragGestureEvent
- public class DragGestureEvent
- extends EventObject
A DragGestureEvent is passed to a DragGestureListener via its gestureRecognized() method
when a particular DragGestureRecognizer detects a platform dependent Drag and
Drop action initiating gesture has occurred on the Component it is tracking.
- See Also:
DragGestureRecognizer,
DragGestureListener,
DragSource, Serialized Form
DragGestureEvent
public DragGestureEvent(DragGestureRecognizer dgr,
int act,
Point ori,
List evs)
- construct a DragGestureEvent
- Parameters:
dgr - The DragSourceRecognizer firing this eventori - The origin of the dragact - The the user's preferred actionevs - The List of events that comprise the gesture
getSourceAsDragGestureRecognizer
public DragGestureRecognizer getSourceAsDragGestureRecognizer()
- Returns:
- the source as a DragGestureRecognizer
getComponent
public Component getComponent()
- Returns:
- the Component
getDragSource
public DragSource getDragSource()
- Returns:
- the DragSource
getDragOrigin
public Point getDragOrigin()
- Returns:
- the Point where the drag originated in Component coords.
iterator
public Iterator iterator()
- Returns:
- an Iterator for the events comprising the gesture
toArray
public Object[] toArray()
- Returns:
- an array of the events comprising the gesture
toArray
public Object[] toArray(Object[] array)
- Returns:
- an array of the events comprising the gesture
getDragAction
public int getDragAction()
- Returns:
- the action selected by the user
getTriggerEvent
public InputEvent getTriggerEvent()
startDrag
public void startDrag(Cursor dragCursor,
Transferable transferable,
DragSourceListener dsl)
throws InvalidDnDOperationException
- start the drag
- Parameters:
dragCursor - The initial drag Cursortransferable - The source's Transferabledsl - The source's DragSourceListener
startDrag
public void startDrag(Cursor dragCursor,
Image dragImage,
Point imageOffset,
Transferable transferable,
DragSourceListener dsl)
throws InvalidDnDOperationException
- start the drag
- Parameters:
dragCursor - The initial drag CursordragImage - The source's dragImageimageOffset - The dragImage's offsettransferable - The source's Transferabledsl - The source's DragSourceListener
Submit a bug or feature Version 1.2 of Java Platform API Specification
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.