API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.awt.dnd. DragSourceContext View Source
Author(s)
Since
1.2
Version
1.53, 04/04/06
Serial
Hierarchy
 Object
      DragSourceContext
Implements
 DragSourceListener
 DragSourceMotionListener
 Serializable
Subclasses
Description
public class DragSourceContext
  The DragSourceContext class is responsible for managing the initiator side of the Drag and Drop protocol.
Constructors
public DragSourceContext (DragSourceContextPeer dscp, DragGestureEvent trigger, Cursor dragCursor, Image dragImage, Point offset, Transferable t, DragSourceListener dsl)
  Called from DragSource, this constructor creates a new DragSourceContext given the DragSourceContextPeer for this Drag, the DragGestureEvent that triggered the Drag, the initial Cursor to use for the Drag, an (optional) Image to display while the Drag is taking place, the offset of the Image origin from the hotspot at the instant of the triggering event, the Transferable subject data, and the DragSourceListener to use during the Drag and Drop operation.
Methods
Hide/Show inherited methods
publicsynchronized void addDragSourceListener (DragSourceListener dsl) throws TooManyListenersException
  Add a DragSourceListener to this DragSourceContext if one has not already been added.
public void dragDropEnd (DragSourceDropEvent dsde) [Specified in DragSourceListener]
  Calls dragDropEnd on the DragSourceListeners registered with this DragSourceContext and with the associated DragSource, and passes them the specified DragSourceDropEvent.
public void dragEnter (DragSourceDragEvent dsde) [Specified in DragSourceListener]
  Calls dragEnter on the DragSourceListeners registered with this DragSourceContext and with the associated DragSource, and passes them the specified DragSourceDragEvent.
public void dragExit (DragSourceEvent dse) [Specified in DragSourceListener]
  Calls dragExit on the DragSourceListeners registered with this DragSourceContext and with the associated DragSource, and passes them the specified DragSourceEvent.
public void dragMouseMoved (DragSourceDragEvent dsde) [Specified in DragSourceMotionListener]
  Calls dragMouseMoved on the DragSourceMotionListeners registered with the DragSource associated with this DragSourceContext, and them passes the specified DragSourceDragEvent.
public void dragOver (DragSourceDragEvent dsde) [Specified in DragSourceListener]
  Calls dragOver on the DragSourceListeners registered with this DragSourceContext and with the associated DragSource, and passes them the specified DragSourceDragEvent.
public void dropActionChanged (DragSourceDragEvent dsde) [Specified in DragSourceListener]
  Calls dropActionChanged on the DragSourceListeners registered with this DragSourceContext and with the associated DragSource, and passes them the specified DragSourceDragEvent.
public Component getComponent ()
  Returns the Component associated with this DragSourceContext.
public Cursor getCursor ()
  Returns the current drag Cursor.
public DragSource getDragSource ()
  Returns the DragSource that instantiated this DragSourceContext.
public int getSourceActions ()
  Returns a bitwise mask of DnDConstants that represent the set of drop actions supported by the drag source for the drag operation associated with this DragSourceContext.
public Transferable getTransferable ()
  Returns the Transferable associated with this DragSourceContext.
public DragGestureEvent getTrigger ()
  Returns the DragGestureEvent that initially triggered the drag.
publicsynchronized void removeDragSourceListener (DragSourceListener dsl)
  Removes the specified DragSourceListener from this DragSourceContext.
publicsynchronized void setCursor (Cursor c)
  Sets the cursor for this drag operation to the specified Cursor.
public void transferablesFlavorsChanged ()
Notifies the peer that the Transferable's DataFlavors have changed.
protectedsynchronized void updateCurrentCursor (int sourceAct, int targetAct, int status)
  If the default drag cursor behavior is active, this method sets the default drag cursor for the specified actions supported by the drag source, the drop target action, and status, otherwise this method does nothing.
Fields
Hide/Show inherited fields
protectedfinalstatic int CHANGED = "3"
An int used by updateCurrentCursor() indicating that the user operation has changed.
protectedfinalstatic int DEFAULT = "0"
An int used by updateCurrentCursor() indicating that the Cursor should change to the default (no drop) Cursor.
protectedfinalstatic int ENTER = "1"
An int used by updateCurrentCursor() indicating that the Cursor has entered a DropTarget.
protectedfinalstatic int OVER = "2"
An int used by updateCurrentCursor() indicating that the Cursor is over a DropTarget.
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar