Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
java.awt.dnd

Class DragSource

java.lang.Object
|
+--java.awt.dnd.DragSource

All Implemented Interfaces:

Serializable


public class DragSource

extends Object

implements Serializable

Field Summary

static java.awt.CursorDefaultCopyDrop

static java.awt.CursorDefaultCopyNoDrop

static java.awt.CursorDefaultLinkDrop

static java.awt.CursorDefaultLinkNoDrop

static java.awt.CursorDefaultMoveDrop

static java.awt.CursorDefaultMoveNoDrop

Constructor Summary

DragSource()

Initializes the drag source.

Method Summary

voidaddDragSourceListener(java.awt.dnd.DragSourceListener l)

voidaddDragSourceMotionListener(java.awt.dnd.DragSourceMotionListener l)

java.awt.dnd.DragGestureRecognizercreateDefaultDragGestureRecognizer(java.awt.Component c, int actions, java.awt.dnd.DragGestureListener dgl)

java.awt.dnd.DragGestureRecognizercreateDragGestureRecognizer(java.lang.Class recognizer, java.awt.Component c, int actions, java.awt.dnd.DragGestureListener dgl)

java.awt.dnd.DragSourceContextcreateDragSourceContext(java.awt.dnd.peer.DragSourceContextPeer peer, java.awt.dnd.DragGestureEvent dge, java.awt.Cursor cursor, java.awt.Image image, java.awt.Point offset, java.awt.datatransfer.Transferable t, java.awt.dnd.DragSourceListener dsl)

Creates the DragSourceContext to handle this drag.
static java.awt.dnd.DragSourcegetDefaultDragSource()

java.awt.dnd.DragSourceListener[]getDragSourceListeners()

java.awt.dnd.DragSourceMotionListener[]getDragSourceMotionListeners()

java.awt.datatransfer.FlavorMapgetFlavorMap()

java.util.EventListener[]getListeners(java.lang.Class type)

static booleanisDragImageSupported()

voidremoveDragSourceListener(java.awt.dnd.DragSourceListener l)

voidremoveDragSourceMotionListener(java.awt.dnd.DragSourceMotionListener l)

voidstartDrag(java.awt.dnd.DragGestureEvent trigger, java.awt.Cursor dragCursor, java.awt.Image dragImage, java.awt.Point imageOffset, java.awt.datatransfer.Transferable trans, java.awt.dnd.DragSourceListener dsl, java.awt.datatransfer.FlavorMap map)

Start a drag, given the DragGestureEvent that initiated the drag.
voidstartDrag(java.awt.dnd.DragGestureEvent trigger, java.awt.Cursor dragCursor, java.awt.datatransfer.Transferable trans, java.awt.dnd.DragSourceListener dsl, java.awt.datatransfer.FlavorMap map)

Start a drag, given the DragGestureEvent that initiated the drag.
voidstartDrag(java.awt.dnd.DragGestureEvent trigger, java.awt.Cursor dragCursor, java.awt.Image dragImage, java.awt.Point imageOffset, java.awt.datatransfer.Transferable trans, java.awt.dnd.DragSourceListener dsl)

Start a drag, given the DragGestureEvent that initiated the drag.
voidstartDrag(java.awt.dnd.DragGestureEvent trigger, java.awt.Cursor dragCursor, java.awt.datatransfer.Transferable trans, java.awt.dnd.DragSourceListener dsl)

Start a drag, given the DragGestureEvent that initiated the drag.

Field Details

DefaultCopyDrop

public static final Cursor DefaultCopyDrop


DefaultCopyNoDrop

public static final Cursor DefaultCopyNoDrop


DefaultLinkDrop

public static final Cursor DefaultLinkDrop


DefaultLinkNoDrop

public static final Cursor DefaultLinkNoDrop


DefaultMoveDrop

public static final Cursor DefaultMoveDrop


DefaultMoveNoDrop

public static final Cursor DefaultMoveNoDrop


Constructor Details

DragSource

public DragSource()

Initializes the drag source.

Throws:


Method Details

addDragSourceListener

public void addDragSourceListener(java.awt.dnd.DragSourceListener l)

Parameters:


addDragSourceMotionListener

public void addDragSourceMotionListener(java.awt.dnd.DragSourceMotionListener l)

Parameters:


createDefaultDragGestureRecognizer

public DragGestureRecognizer createDefaultDragGestureRecognizer(java.awt.Component c, int actions, java.awt.dnd.DragGestureListener dgl)

Parameters:


createDragGestureRecognizer

public DragGestureRecognizer createDragGestureRecognizer(java.lang.Class recognizer, java.awt.Component c, int actions, java.awt.dnd.DragGestureListener dgl)

Parameters:


createDragSourceContext

protected DragSourceContext createDragSourceContext(java.awt.dnd.peer.DragSourceContextPeer peer, java.awt.dnd.DragGestureEvent dge, java.awt.Cursor cursor, java.awt.Image image, java.awt.Point offset, java.awt.datatransfer.Transferable t, java.awt.dnd.DragSourceListener dsl)

Creates the DragSourceContext to handle this drag.

Parameters:

Throws:


getDefaultDragSource

public static DragSource getDefaultDragSource()

Throws:


getDragSourceListeners

public DragSourceListener[] getDragSourceListeners()


getDragSourceMotionListeners

public DragSourceMotionListener[] getDragSourceMotionListeners()


getFlavorMap

public FlavorMap getFlavorMap()


getListeners

public EventListener[] getListeners(java.lang.Class type)

Parameters:


isDragImageSupported

public static boolean isDragImageSupported()


removeDragSourceListener

public void removeDragSourceListener(java.awt.dnd.DragSourceListener l)

Parameters:


removeDragSourceMotionListener

public void removeDragSourceMotionListener(java.awt.dnd.DragSourceMotionListener l)

Parameters:


startDrag

public void startDrag(java.awt.dnd.DragGestureEvent trigger, java.awt.Cursor dragCursor, java.awt.Image dragImage, java.awt.Point imageOffset, java.awt.datatransfer.Transferable trans, java.awt.dnd.DragSourceListener dsl)

Start a drag, given the DragGestureEvent that initiated the drag.

Parameters:

Throws:


startDrag

public void startDrag(java.awt.dnd.DragGestureEvent trigger, java.awt.Cursor dragCursor, java.awt.Image dragImage, java.awt.Point imageOffset, java.awt.datatransfer.Transferable trans, java.awt.dnd.DragSourceListener dsl, java.awt.datatransfer.FlavorMap map)

Start a drag, given the DragGestureEvent that initiated the drag.

Parameters:

Throws:


startDrag

public void startDrag(java.awt.dnd.DragGestureEvent trigger, java.awt.Cursor dragCursor, java.awt.datatransfer.Transferable trans, java.awt.dnd.DragSourceListener dsl)

Start a drag, given the DragGestureEvent that initiated the drag.

Parameters:

Throws:


startDrag

public void startDrag(java.awt.dnd.DragGestureEvent trigger, java.awt.Cursor dragCursor, java.awt.datatransfer.Transferable trans, java.awt.dnd.DragSourceListener dsl, java.awt.datatransfer.FlavorMap map)

Start a drag, given the DragGestureEvent that initiated the drag.

Parameters:

Throws: