Java Platform 1.2

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

Fields inherited from class java.util.EventObject
source
 
Constructor Summary
DragGestureEvent(DragGestureRecognizer dgr, int act, Point ori, List evs)
          construct a DragGestureEvent
 
Method Summary
 Component getComponent()
           
 int getDragAction()
           
 Point getDragOrigin()
           
 DragSource getDragSource()
           
 DragGestureRecognizer getSourceAsDragGestureRecognizer()
           
 InputEvent getTriggerEvent()
           
 Iterator iterator()
           
 void startDrag(Cursor dragCursor, Image dragImage, Point imageOffset, Transferable transferable, DragSourceListener dsl)
          start the drag
 void startDrag(Cursor dragCursor, Transferable transferable, DragSourceListener dsl)
          start the drag
 Object[] toArray()
           
 Object[] toArray(Object[] array)
           
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DragGestureEvent

public DragGestureEvent(DragGestureRecognizer dgr,
                        int act,
                        Point ori,
                        List evs)
construct a DragGestureEvent
Parameters:
dgr - The DragSourceRecognizer firing this event
ori - The origin of the drag
act - The the user's preferred action
evs - The List of events that comprise the gesture
Method Detail

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 Cursor
transferable - The source's Transferable
dsl - 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 Cursor
dragImage - The source's dragImage
imageOffset - The dragImage's offset
transferable - The source's Transferable
dsl - The source's DragSourceListener

Java Platform 1.2

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.