java.lang.Object
java.awt.dnd.DragSource
- All Implemented Interfaces:
- Serializable
- See Also:
- Top Examples, Source Code
public void addDragSourceListener(DragSourceListener dsl)
- See Also:
getDragSourceListeners()
, removeDragSourceListener(java.awt.dnd.DragSourceListener)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
[526]Drag Drop Data Transfer Example (Drag)
By Anonymous on 2004/01/22 16:18:27 Rate
//Data Transfer Example ( Drag )
import java.awt.dnd.*;
import java.awt.datatransfer.*;
public class DragEx implements
DragGestureListener, DragSourceListener {
DragSource ds = new DragSource ( ) ;
ds.createDefaultDragGestureRecognizer ( this,DnDConstants.ACTION_MOVE, this ) ;
public void dragGestureRecognized ( DragGestureEvent dge ) {
StringSelection strSel = new StringSelection ( someText ) ;
ds.startDrag ( dge, DragSource.DeafultMoveDrop, strSel, this ) ;
}
}
//addDragSourceListener
public void addDragSourceMotionListener(DragSourceMotionListener dsml)
- See Also:
getDragSourceMotionListeners()
, removeDragSourceMotionListener(java.awt.dnd.DragSourceMotionListener)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public DragGestureRecognizer createDefaultDragGestureRecognizer(Component c,
int actions,
DragGestureListener dgl)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public <T extends DragGestureRecognizer> T createDragGestureRecognizer(Class<T> recognizerAbstractClass,
Component c,
int actions,
DragGestureListener dgl)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
protected DragSourceContext createDragSourceContext(java.awt.dnd.peer.DragSourceContextPeer dscp,
DragGestureEvent dgl,
Cursor dragCursor,
Image dragImage,
Point imageOffset,
Transferable t,
DragSourceListener dsl)
- See Also:
- IllegalArgumentException, NullPointerException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public static final Cursor DefaultCopyDrop
- See Also:
GraphicsEnvironment.isHeadless()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public static final Cursor DefaultCopyNoDrop
- See Also:
GraphicsEnvironment.isHeadless()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public static final Cursor DefaultLinkDrop
- See Also:
GraphicsEnvironment.isHeadless()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public static final Cursor DefaultLinkNoDrop
- See Also:
GraphicsEnvironment.isHeadless()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public static final Cursor DefaultMoveDrop
- See Also:
GraphicsEnvironment.isHeadless()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public static final Cursor DefaultMoveNoDrop
- See Also:
GraphicsEnvironment.isHeadless()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public DragSource()
throws HeadlessException
- See Also:
GraphicsEnvironment.isHeadless()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public static DragSource getDefaultDragSource()
- See Also:
GraphicsEnvironment.isHeadless()
, HeadlessException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public DragSourceListener[] getDragSourceListeners()
- See Also:
removeDragSourceListener(java.awt.dnd.DragSourceListener)
, addDragSourceListener(java.awt.dnd.DragSourceListener)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public DragSourceMotionListener[] getDragSourceMotionListeners()
- See Also:
removeDragSourceMotionListener(java.awt.dnd.DragSourceMotionListener)
, addDragSourceMotionListener(java.awt.dnd.DragSourceMotionListener)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public static int getDragThreshold()
- See Also:
MouseDragGestureRecognizer
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public FlavorMap getFlavorMap()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public <T extends EventListener> T[] getListeners(Class<T> listenerType)
- See Also:
getDragSourceMotionListeners()
, getDragSourceListeners()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public static boolean isDragImageSupported()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void removeDragSourceListener(DragSourceListener dsl)
- See Also:
getDragSourceListeners()
, addDragSourceListener(java.awt.dnd.DragSourceListener)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void removeDragSourceMotionListener(DragSourceMotionListener dsml)
- See Also:
getDragSourceMotionListeners()
, addDragSourceMotionListener(java.awt.dnd.DragSourceMotionListener)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void startDrag(DragGestureEvent trigger,
Cursor dragCursor,
Transferable transferable,
DragSourceListener dsl)
throws InvalidDnDOperationException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void startDrag(DragGestureEvent trigger,
Cursor dragCursor,
Transferable transferable,
DragSourceListener dsl,
FlavorMap flavorMap)
throws InvalidDnDOperationException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void startDrag(DragGestureEvent trigger,
Cursor dragCursor,
Image dragImage,
Point dragOffset,
Transferable transferable,
DragSourceListener dsl)
throws InvalidDnDOperationException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void startDrag(DragGestureEvent trigger,
Cursor dragCursor,
Image dragImage,
Point imageOffset,
Transferable transferable,
DragSourceListener dsl,
FlavorMap flavorMap)
throws InvalidDnDOperationException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples