
You can create a DragSource object by calling the constructor, but because the DragSource
object does not hold any state, you can continually reuse a single object. Call the static
getDefaultDragSource() method to obtain a refer ence to a shared default DragSource object.
Once you have obtained a DragSource object, call createDefaultDragGestureRecognizer() to
cr eate and register a DragGestureRecognizer object that detects user gestures that should
initiate drags. If you want to drag an image that repr esents the dragged data along with
the drag cursor, you may also call the isDragImageSuppor ted() method to find out whether
that option is supported on the native platform.
After you have called these two methods, you typically never need to use the Drag-
Source again. The star tDrag() method of the DragSource is responsible for initiating a drag
action, but it is easier to invoke it through the star tDrag() utility method of the DragGes-
tureEvent class instead.
public class DragSource {
// Public Constructors
public DragSource();
// Public Constants
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 Class Methods
public static DragSource getDefaultDragSource();
public static boolean ...