java.lang.Object
java.awt.dnd.DragSource
DragSource()
DragGestureRecognizer
createDefaultDragGestureRecognizer(Component c, int actions, DragGestureListener dgl)
protected DragSourceContext
createDragSourceContext(DragSourceContextPeer peer, DragGestureEvent dge, Cursor cursor, Image image, Point offset, Transferable t, DragSourceListener dsl)
extends DragGestureRecognizer> T
createDragGestureRecognizer(Class recognizer, Component c, int actions, DragGestureListener dgl)
extends EventListener> T[] getListeners(Class listenerType)
static DragSource
getDefaultDragSource()
static int
getDragThreshold()
static boolean
void
startDrag(DragGestureEvent trigger, Cursor dragCursor, Image dragImage, Point imageOffset, Transferable trans, DragSourceListener dsl)
void
startDrag(DragGestureEvent trigger, Cursor dragCursor, Image dragImage, Point imageOffset, Transferable trans, DragSourceListener dsl, FlavorMap map)
void
startDrag(DragGestureEvent trigger, Cursor dragCursor, Transferable trans, DragSourceListener dsl)
void
startDrag(DragGestureEvent trigger, Cursor dragCursor, Transferable trans, DragSourceListener dsl, FlavorMap map)
public static final Cursor DefaultCopyDrop
public static final Cursor DefaultCopyNoDrop
public static final Cursor DefaultLinkDrop
public static final Cursor DefaultLinkNoDrop
public static final Cursor DefaultMoveDrop
public static final Cursor DefaultMoveNoDrop
public DragSource()
Initializes the drag source.
- Throws:
HeadlessException
- If GraphicsEnvironment.isHeadless() is true.
public void addDragSourceMotionListener(DragSourceMotionListener l)
- Since:
- 1.4
public DragGestureRecognizer createDefaultDragGestureRecognizer(Component c, int actions, DragGestureListener dgl)
protected DragSourceContext createDragSourceContext(DragSourceContextPeer peer, DragGestureEvent dge, Cursor cursor, Image image, Point offset, Transferable t, DragSourceListener dsl)
Creates the DragSourceContext to handle this drag.
- Throws:
IllegalArgumentException
-NullPointerException
- If dscp, dgl, dragImage or t is null.
publicextends DragGestureRecognizer> T createDragGestureRecognizer(Class recognizer, Component c, int actions, DragGestureListener dgl)
publicextends EventListener> T[] getListeners(Class listenerType)
- Since:
- 1.4
public static DragSource getDefaultDragSource()
Gets the default drag source.
- Throws:
HeadlessException
- If GraphicsEnvironment.isHeadless() is true.
public DragSourceMotionListener[] getDragSourceMotionListeners()
- Since:
- 1.4
public static int getDragThreshold() throws gnu.classpath.NotImplementedException
TODO
- Returns:
- TODO
- Since:
- 1.5
public FlavorMap getFlavorMap()
public static boolean isDragImageSupported()
public void removeDragSourceMotionListener(DragSourceMotionListener l)
- Since:
- 1.4
public void startDrag(DragGestureEvent trigger, Cursor dragCursor, Image dragImage, Point imageOffset, Transferable trans, DragSourceListener dsl)
Start a drag, given the DragGestureEvent that initiated the drag.
- Throws:
InvalidDnDOperationException
- If the Drag and Drop system is unable to initiate a drag operation, or if the user attempts to start a drag while an existing drag operation is still executing.
public void startDrag(DragGestureEvent trigger, Cursor dragCursor, Image dragImage, Point imageOffset, Transferable trans, DragSourceListener dsl, FlavorMap map)
Start a drag, given the DragGestureEvent that initiated the drag.
- Throws:
InvalidDnDOperationException
- If the Drag and Drop system is unable to initiate a drag operation, or if the user attempts to start a drag while an existing drag operation is still executing.
public void startDrag(DragGestureEvent trigger, Cursor dragCursor, Transferable trans, DragSourceListener dsl)
Start a drag, given the DragGestureEvent that initiated the drag.
- Throws:
InvalidDnDOperationException
- If the Drag and Drop system is unable to initiate a drag operation, or if the user attempts to start a drag while an existing drag operation is still executing.
public void startDrag(DragGestureEvent trigger, Cursor dragCursor, Transferable trans, DragSourceListener dsl, FlavorMap map)
Start a drag, given the DragGestureEvent that initiated the drag.
- Throws:
InvalidDnDOperationException
- If the Drag and Drop system is unable to initiate a drag operation, or if the user attempts to start a drag while an existing drag operation is still executing.