java.awt.dnd
public class DragSource extends Object implements Serializable
Since: 1.2
Field Summary | |
---|---|
static Cursor | DefaultCopyDrop |
static Cursor | DefaultCopyNoDrop |
static Cursor | DefaultLinkDrop |
static Cursor | DefaultLinkNoDrop |
static Cursor | DefaultMoveDrop |
static Cursor | DefaultMoveNoDrop |
Constructor Summary | |
---|---|
DragSource()
Initializes the drag source.
|
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.
|
Throws: HeadlessException If GraphicsEnvironment.isHeadless() is true.
Since: 1.4
Since: 1.4
Throws: IllegalArgumentException NullPointerException If dscp, dgl, dragImage or t is null.
Throws: HeadlessException If GraphicsEnvironment.isHeadless() is true.
Since: 1.4
Since: 1.4
Returns: TODO
Since: 1.5
Since: 1.4
Since: 1.4
Since: 1.4
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.
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.
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.
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.