API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.awt.dnd. DragSource View Source
Author(s)
Since
1.2
Version
1.46, 11/17/05
Serial
Hierarchy
 Object
      DragSource
Implements
 Serializable
Subclasses
Description
public class DragSource
  The DragSource is the entity responsible for the initiation of the Drag and Drop operation, and may be used in a number of scenarios: 1 default instance per JVM for the lifetime of that JVM.
See also:   
Constructors
public DragSource () throws HeadlessException
  Creates a new DragSource.
Methods
Hide/Show inherited methods
public void addDragSourceListener (DragSourceListener dsl)
  Adds the specified DragSourceListener to this DragSource to receive drag source events during drag operations intiated with this DragSource.
public void addDragSourceMotionListener (DragSourceMotionListener dsml)
  Adds the specified DragSourceMotionListener to this DragSource to receive drag motion events during drag operations intiated with this DragSource.
public DragGestureRecognizer createDefaultDragGestureRecognizer (Component c, int actions, DragGestureListener dgl)
  Creates a new DragGestureRecognizer that implements the default abstract subclass of DragGestureRecognizer for this DragSource, and sets the specified Component and DragGestureListener on the newly created object.
public T createDragGestureRecognizer (Class< T> recognizerAbstractClass, Component c, int actions, DragGestureListener dgl)
  Creates a new DragGestureRecognizer that implements the specified abstract subclass of DragGestureRecognizer, and sets the specified Component and DragGestureListener on the newly created object.
protected DragSourceContext createDragSourceContext (DragSourceContextPeer dscp, DragGestureEvent dgl, Cursor dragCursor, Image dragImage, Point imageOffset, Transferable t, DragSourceListener dsl)
  Creates the DragSourceContext to handle this drag.
publicstatic DragSource getDefaultDragSource ()
  Gets the DragSource object associated with the underlying platform.
public DragSourceListener getDragSourceListeners ()
  Gets all the DragSourceListeners registered with this DragSource.
public DragSourceMotionListener getDragSourceMotionListeners ()
  Gets all of the DragSourceMotionListeners registered with this DragSource.
publicstatic int getDragThreshold ()
  Returns the drag gesture motion threshold.
public FlavorMap getFlavorMap ()
  This method returns the FlavorMap for this DragSource.
public T getListeners (Class< T> listenerType)
  Gets all the objects currently registered as FooListeners upon this DragSource.
publicstatic boolean isDragImageSupported ()
  Reports whether or not drag Image support is available on the underlying platform.
pack-private void processDragDropEnd (DragSourceDropEvent dsde)
  This method calls dragDropEnd on the DragSourceListeners registered with this DragSource, and passes them the specified DragSourceDropEvent.
pack-private void processDragEnter (DragSourceDragEvent dsde)
  This method calls dragEnter on the DragSourceListeners registered with this DragSource, and passes them the specified DragSourceDragEvent.
pack-private void processDragExit (DragSourceEvent dse)
  This method calls dragExit on the DragSourceListeners registered with this DragSource, and passes them the specified DragSourceEvent.
pack-private void processDragMouseMoved (DragSourceDragEvent dsde)
  This method calls dragMouseMoved on the DragSourceMotionListeners registered with this DragSource, and passes them the specified DragSourceDragEvent.
pack-private void processDragOver (DragSourceDragEvent dsde)
  This method calls dragOver on the DragSourceListeners registered with this DragSource, and passes them the specified DragSourceDragEvent.
pack-private void processDropActionChanged (DragSourceDragEvent dsde)
  This method calls dropActionChanged on the DragSourceListeners registered with this DragSource, and passes them the specified DragSourceDragEvent.
public void removeDragSourceListener (DragSourceListener dsl)
  Removes the specified DragSourceListener from this DragSource.
public void removeDragSourceMotionListener (DragSourceMotionListener dsml)
  Removes the specified DragSourceMotionListener from this DragSource.
public void startDrag (DragGestureEvent trigger, Cursor dragCursor, Image dragImage, Point dragOffset, Transferable transferable, DragSourceListener dsl) throws InvalidDnDOperationException
  Start a drag, given the DragGestureEvent that initiated the drag, the initial Cursor to use, the Image to drag, the offset of the Image origin from the hotspot of the Cursor at the instant of the trigger, the subject data of the drag, and the DragSourceListener.
public void startDrag (DragGestureEvent trigger, Cursor dragCursor, Image dragImage, Point imageOffset, Transferable transferable, DragSourceListener dsl, FlavorMap flavorMap) throws InvalidDnDOperationException
  Start a drag, given the DragGestureEvent that initiated the drag, the initial Cursor to use, the Image to drag, the offset of the Image origin from the hotspot of the Cursor at the instant of the trigger, the Transferable subject data of the drag, the DragSourceListener, and the FlavorMap.
public void startDrag (DragGestureEvent trigger, Cursor dragCursor, Transferable transferable, DragSourceListener dsl) throws InvalidDnDOperationException
  Start a drag, given the DragGestureEvent that initiated the drag, the initial Cursor to use, the Transferable subject data of the drag, and the DragSourceListener.
public void startDrag (DragGestureEvent trigger, Cursor dragCursor, Transferable transferable, DragSourceListener dsl, FlavorMap flavorMap) throws InvalidDnDOperationException
  Start a drag, given the DragGestureEvent that initiated the drag, the initial Cursor to use, the Transferable subject data of the drag, the DragSourceListener, and the FlavorMap.
Fields
Hide/Show inherited fields
publicfinalstatic Cursor DefaultCopyDrop
  The default Cursor to use with a copy operation indicating that a drop is currently allowed.
publicfinalstatic Cursor DefaultCopyNoDrop
  The default Cursor to use with a copy operation indicating that a drop is currently not allowed.
publicfinalstatic Cursor DefaultLinkDrop
  The default Cursor to use with a link operation indicating that a drop is currently allowed.
publicfinalstatic Cursor DefaultLinkNoDrop
  The default Cursor to use with a link operation indicating that a drop is currently not allowed.
publicfinalstatic Cursor DefaultMoveDrop
  The default Cursor to use with a move operation indicating that a drop is currently allowed.
publicfinalstatic Cursor DefaultMoveNoDrop
  The default Cursor to use with a move operation indicating that a drop is currently not allowed.
pack-privatefinalstatic String dragSourceListenerK = "dragSourceL"
Internal constants for serialization.
pack-privatefinalstatic String dragSourceMotionListenerK = "dragSourceMotionL"
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar