java.awt.dnd
Class DragSource
public
class
DragSource
extends Object
implements Serializable
Method Summary |
void | addDragSourceListener(DragSourceListener l) |
void | addDragSourceMotionListener(DragSourceMotionListener l) |
DragGestureRecognizer | createDefaultDragGestureRecognizer(Component c, int actions, DragGestureListener dgl) |
<T extends DragGestureRecognizer> T | createDragGestureRecognizer(Class<T> recognizer, 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.
|
static DragSource | getDefaultDragSource()
Gets the default drag source.
|
DragSourceListener[] | getDragSourceListeners() |
DragSourceMotionListener[] | getDragSourceMotionListeners() |
static int | getDragThreshold()
TODO |
FlavorMap | getFlavorMap() |
<T extends EventListener> T[] | getListeners(Class<T> listenerType) |
static boolean | isDragImageSupported() |
void | removeDragSourceListener(DragSourceListener l) |
void | removeDragSourceMotionListener(DragSourceMotionListener l) |
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.
|
void | startDrag(DragGestureEvent trigger, Cursor dragCursor, Transferable trans, DragSourceListener dsl, FlavorMap map)
Start a drag, given the DragGestureEvent that initiated the drag.
|
void | startDrag(DragGestureEvent trigger, Cursor dragCursor, Image dragImage, Point imageOffset, Transferable trans, DragSourceListener dsl)
Start a drag, given the DragGestureEvent that initiated the drag.
|
void | startDrag(DragGestureEvent trigger, Cursor dragCursor, Transferable trans, DragSourceListener dsl)
Start a drag, given the DragGestureEvent that initiated the drag.
|
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.
Creates the DragSourceContext to handle this drag.
Throws: IllegalArgumentException NullPointerException If dscp, dgl, dragImage or t is null.
Gets the default drag source.
Throws: HeadlessException If GraphicsEnvironment.isHeadless() is true.
public static int getDragThreshold()
TODO
Returns: TODO
Since: 1.5
public static boolean isDragImageSupported()
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.
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.
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.
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.