All Packages  Class Hierarchy  This Package  Previous  Next  Index  

Class java.awt.dnd.DragSource

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

public class DragSource
extends Object

The DragSource class is a small class responsible for originating a Drag and Drop operation.

Since:
JDK1.2

Variable Index

 o DefaultCopyDrop
Default Cursor Constants
 o DefaultCopyNoDrop
 o DefaultLinkDrop
 o DefaultLinkNoDrop
 o DefaultMoveDrop
 o DefaultMoveNoDrop

Constructor Index

 o DragSource()
construct a DragSource

Method Index

 o createDragSourceContext(DragSourceContextPeer, Component, int, Cursor, Image, Point, Transferable, DragSourceListener)
Create the DragSourceContext to handle this Drag.
 o getDefaultDragSource()
 o getFlavorMap()
 o startDrag(Component, AWTEvent, int, Cursor, Image, Point, Transferable, DragSourceListener)
start a Drag operation.

Variables

 o DefaultCopyDrop
public static final Cursor DefaultCopyDrop
Default Cursor Constants

 o DefaultMoveDrop
public static final Cursor DefaultMoveDrop
 o DefaultLinkDrop
public static final Cursor DefaultLinkDrop
 o DefaultCopyNoDrop
public static final Cursor DefaultCopyNoDrop
 o DefaultMoveNoDrop
public static final Cursor DefaultMoveNoDrop
 o DefaultLinkNoDrop
public static final Cursor DefaultLinkNoDrop

Constructors

 o DragSource
public DragSource()
construct a DragSource

Methods

 o getDefaultDragSource
public static DragSource getDefaultDragSource()
Returns:
the platform DragSource
 o startDrag
public void startDrag(Component c,
                      AWTEvent trigger,
                      int actions,
                      Cursor dragCursor,
                      Image dragImage,
                      Point imageOffset,
                      Transferable transferable,
                      DragSourceListener dsl) throws InvalidDnDOperationException, SecurityException
start a Drag operation.

Parameters:
c - The Component the Drag trigger occurred in
trigger - The AWTEvent that initiated the operation
actions - The drag "verbs" appropriate
dragCursor - The initial cursor or null for defaults
dragImage - The image to drag or null
imageOffset - The offset of the image origin from the hotspot of the cursor at the instant of the trigger
transferable - The subject data of the operation
dsl - The DragSourceListener Caller must have AWTPermission startDrag to succeed.
 o createDragSourceContext
protected DragSourceContext createDragSourceContext(DragSourceContextPeer dscp,
                                                    Component c,
                                                    int actions,
                                                    Cursor dragCursor,
                                                    Image dragImage,
                                                    Point imageOffset,
                                                    Transferable t,
                                                    DragSourceListener dsl)
Create the DragSourceContext to handle this Drag. To incorporate a new DragSourceContext subclass, subclass DragSource and override this method.

Parameters:
dscp - The DragSourceContextPeer for this operation
c - The Component the drag started in
actions - The drag "verbs" appropriate
dragCursor - The initial cursor
dragImage - The image to drag or null
imageOffset - The offset of the image origin from the hotspot of the cursor at the instant of the trigger
transferable - The subject data of the operation
dsl - The DragSourceListener
 o getFlavorMap
public FlavorMap getFlavorMap()
Returns:
the FlavorMap for this DragSource

All Packages  Class Hierarchy  This Package  Previous  Next  Index  

Submit a bug or feature