java.awt.dnd
Class DragSourceContext

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.awt.dnd.DragSourceContext
All Implemented Interfaces:
DragSourceListener sample code for java.awt.dnd.DragSourceListener definition code for java.awt.dnd.DragSourceListener , DragSourceMotionListener sample code for java.awt.dnd.DragSourceMotionListener definition code for java.awt.dnd.DragSourceMotionListener , Serializable sample code for java.io.Serializable definition code for java.io.Serializable , EventListener sample code for java.util.EventListener definition code for java.util.EventListener

public class DragSourceContext
extends Object sample code for java.lang.Object definition code for java.lang.Object
implements DragSourceListener sample code for java.awt.dnd.DragSourceListener definition code for java.awt.dnd.DragSourceListener , DragSourceMotionListener sample code for java.awt.dnd.DragSourceMotionListener definition code for java.awt.dnd.DragSourceMotionListener , Serializable sample code for java.io.Serializable definition code for java.io.Serializable

The DragSourceContext class is responsible for managing the initiator side of the Drag and Drop protocol. In particular, it is responsible for managing drag event notifications to the DragSourceListeners and DragSourceMotionListeners, and providing the Transferable representing the source data for the drag operation.

Note that the DragSourceContext itself implements the DragSourceListener and DragSourceMotionListener interfaces. This is to allow the platform peer (the DragSourceContextPeer instance) created by the DragSource to notify the DragSourceContext of state changes in the ongoing operation. This allows the DragSourceContext to interpose itself between the platform and the listeners provided by the initiator of the drag operation.

Since:
1.2
See Also:
DragSourceListener sample code for java.awt.dnd.DragSourceListener definition code for java.awt.dnd.DragSourceListener , DragSourceMotionListener sample code for java.awt.dnd.DragSourceMotionListener definition code for java.awt.dnd.DragSourceMotionListener , Serialized Form

Field Summary
protected static int CHANGED sample code for java.awt.dnd.DragSourceContext.CHANGED definition code for java.awt.dnd.DragSourceContext.CHANGED
          An int used by updateCurrentCursor() indicating that the user operation has changed.
protected static int DEFAULT sample code for java.awt.dnd.DragSourceContext.DEFAULT definition code for java.awt.dnd.DragSourceContext.DEFAULT
          An int used by updateCurrentCursor() indicating that the Cursor should change to the default (no drop) Cursor.
protected static int ENTER sample code for java.awt.dnd.DragSourceContext.ENTER definition code for java.awt.dnd.DragSourceContext.ENTER
          An int used by updateCurrentCursor() indicating that the Cursor has entered a DropTarget.
protected static int OVER sample code for java.awt.dnd.DragSourceContext.OVER definition code for java.awt.dnd.DragSourceContext.OVER
          An int used by updateCurrentCursor() indicating that the Cursor is over a DropTarget.
 
Constructor Summary
DragSourceContext sample code for java.awt.dnd.DragSourceContext.DragSourceContext(java.awt.dnd.peer.DragSourceContextPeer, java.awt.dnd.DragGestureEvent, java.awt.Cursor, java.awt.Image, java.awt.Point, java.awt.datatransfer.Transferable, java.awt.dnd.DragSourceListener) definition code for java.awt.dnd.DragSourceContext.DragSourceContext(java.awt.dnd.peer.DragSourceContextPeer, java.awt.dnd.DragGestureEvent, java.awt.Cursor, java.awt.Image, java.awt.Point, java.awt.datatransfer.Transferable, java.awt.dnd.DragSourceListener) (DragSourceContextPeer sample code for java.awt.dnd.peer.DragSourceContextPeer definition code for java.awt.dnd.peer.DragSourceContextPeer  dscp, DragGestureEvent sample code for java.awt.dnd.DragGestureEvent definition code for java.awt.dnd.DragGestureEvent  trigger, Cursor sample code for java.awt.Cursor definition code for java.awt.Cursor  dragCursor, Image sample code for java.awt.Image definition code for java.awt.Image  dragImage, Point sample code for java.awt.Point definition code for java.awt.Point  offset, Transferable sample code for java.awt.datatransfer.Transferable definition code for java.awt.datatransfer.Transferable  t, DragSourceListener sample code for java.awt.dnd.DragSourceListener definition code for java.awt.dnd.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.
 
Method Summary
 void addDragSourceListener sample code for java.awt.dnd.DragSourceContext.addDragSourceListener(java.awt.dnd.DragSourceListener) definition code for java.awt.dnd.DragSourceContext.addDragSourceListener(java.awt.dnd.DragSourceListener) (DragSourceListener sample code for java.awt.dnd.DragSourceListener definition code for java.awt.dnd.DragSourceListener  dsl)
          Add a DragSourceListener to this DragSourceContext if one has not already been added.
 void dragDropEnd sample code for java.awt.dnd.DragSourceContext.dragDropEnd(java.awt.dnd.DragSourceDropEvent) definition code for java.awt.dnd.DragSourceContext.dragDropEnd(java.awt.dnd.DragSourceDropEvent) (DragSourceDropEvent sample code for java.awt.dnd.DragSourceDropEvent definition code for java.awt.dnd.DragSourceDropEvent  dsde)
          Calls dragDropEnd on the DragSourceListeners registered with this DragSourceContext and with the associated DragSource, and passes them the specified DragSourceDropEvent.
 void dragEnter sample code for java.awt.dnd.DragSourceContext.dragEnter(java.awt.dnd.DragSourceDragEvent) definition code for java.awt.dnd.DragSourceContext.dragEnter(java.awt.dnd.DragSourceDragEvent) (DragSourceDragEvent sample code for java.awt.dnd.DragSourceDragEvent definition code for java.awt.dnd.DragSourceDragEvent  dsde)
          Calls dragEnter on the DragSourceListeners registered with this DragSourceContext and with the associated DragSource, and passes them the specified DragSourceDragEvent.
 void dragExit sample code for java.awt.dnd.DragSourceContext.dragExit(java.awt.dnd.DragSourceEvent) definition code for java.awt.dnd.DragSourceContext.dragExit(java.awt.dnd.DragSourceEvent) (DragSourceEvent sample code for java.awt.dnd.DragSourceEvent definition code for java.awt.dnd.DragSourceEvent  dse)
          Calls dragExit on the DragSourceListeners registered with this DragSourceContext and with the associated DragSource, and passes them the specified DragSourceEvent.
 void dragMouseMoved sample code for java.awt.dnd.DragSourceContext.dragMouseMoved(java.awt.dnd.DragSourceDragEvent) definition code for java.awt.dnd.DragSourceContext.dragMouseMoved(java.awt.dnd.DragSourceDragEvent) (DragSourceDragEvent sample code for java.awt.dnd.DragSourceDragEvent definition code for java.awt.dnd.DragSourceDragEvent  dsde)
          Calls dragMouseMoved on the DragSourceMotionListeners registered with the DragSource associated with this DragSourceContext, and them passes the specified DragSourceDragEvent.
 void dragOver sample code for java.awt.dnd.DragSourceContext.dragOver(java.awt.dnd.DragSourceDragEvent) definition code for java.awt.dnd.DragSourceContext.dragOver(java.awt.dnd.DragSourceDragEvent) (DragSourceDragEvent sample code for java.awt.dnd.DragSourceDragEvent definition code for java.awt.dnd.DragSourceDragEvent  dsde)
          Calls dragOver on the DragSourceListeners registered with this DragSourceContext and with the associated DragSource, and passes them the specified DragSourceDragEvent.
 void dropActionChanged sample code for java.awt.dnd.DragSourceContext.dropActionChanged(java.awt.dnd.DragSourceDragEvent) definition code for java.awt.dnd.DragSourceContext.dropActionChanged(java.awt.dnd.DragSourceDragEvent) (DragSourceDragEvent sample code for java.awt.dnd.DragSourceDragEvent definition code for java.awt.dnd.DragSourceDragEvent  dsde)
          Calls dropActionChanged on the DragSourceListeners registered with this DragSourceContext and with the associated DragSource, and passes them the specified DragSourceDragEvent.
 Component sample code for java.awt.Component definition code for java.awt.Component getComponent sample code for java.awt.dnd.DragSourceContext.getComponent() definition code for java.awt.dnd.DragSourceContext.getComponent() ()
          Returns the Component associated with this DragSourceContext.
 Cursor sample code for java.awt.Cursor definition code for java.awt.Cursor getCursor sample code for java.awt.dnd.DragSourceContext.getCursor() definition code for java.awt.dnd.DragSourceContext.getCursor() ()
          Returns the current drag Cursor.
 DragSource sample code for java.awt.dnd.DragSource definition code for java.awt.dnd.DragSource getDragSource sample code for java.awt.dnd.DragSourceContext.getDragSource() definition code for java.awt.dnd.DragSourceContext.getDragSource() ()
          Returns the DragSource that instantiated this DragSourceContext.
 int getSourceActions sample code for java.awt.dnd.DragSourceContext.getSourceActions() definition code for java.awt.dnd.DragSourceContext.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.
 Transferable sample code for java.awt.datatransfer.Transferable definition code for java.awt.datatransfer.Transferable getTransferable sample code for java.awt.dnd.DragSourceContext.getTransferable() definition code for java.awt.dnd.DragSourceContext.getTransferable() ()
          Returns the Transferable associated with this DragSourceContext.
 DragGestureEvent sample code for java.awt.dnd.DragGestureEvent definition code for java.awt.dnd.DragGestureEvent getTrigger sample code for java.awt.dnd.DragSourceContext.getTrigger() definition code for java.awt.dnd.DragSourceContext.getTrigger() ()
          Returns the DragGestureEvent that initially triggered the drag.
 void removeDragSourceListener sample code for java.awt.dnd.DragSourceContext.removeDragSourceListener(java.awt.dnd.DragSourceListener) definition code for java.awt.dnd.DragSourceContext.removeDragSourceListener(java.awt.dnd.DragSourceListener) (DragSourceListener sample code for java.awt.dnd.DragSourceListener definition code for java.awt.dnd.DragSourceListener  dsl)
          Removes the specified DragSourceListener from this DragSourceContext.
 void setCursor sample code for java.awt.dnd.DragSourceContext.setCursor(java.awt.Cursor) definition code for java.awt.dnd.DragSourceContext.setCursor(java.awt.Cursor) (Cursor sample code for java.awt.Cursor definition code for java.awt.Cursor  c)
          Sets the cursor for this drag operation to the specified Cursor.
 void transferablesFlavorsChanged sample code for java.awt.dnd.DragSourceContext.transferablesFlavorsChanged() definition code for java.awt.dnd.DragSourceContext.transferablesFlavorsChanged() ()
          Notifies the peer that the Transferable's DataFlavors have changed.
protected  void updateCurrentCursor sample code for java.awt.dnd.DragSourceContext.updateCurrentCursor(int, int, int) definition code for java.awt.dnd.DragSourceContext.updateCurrentCursor(int, int, int) (int dropOp, int targetAct, int status)
          If the default drag cursor behavior is active, this method sets the default drag cursor for the specified selected operation, supported actions and status, otherwise this method does nothing.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Field Detail

DEFAULT sample code for java.awt.dnd.DragSourceContext.DEFAULT

protected static final int DEFAULT
An int used by updateCurrentCursor() indicating that the Cursor should change to the default (no drop) Cursor.

See Also:
Constant Field Values

ENTER sample code for java.awt.dnd.DragSourceContext.ENTER

protected static final int ENTER
An int used by updateCurrentCursor() indicating that the Cursor has entered a DropTarget.

See Also:
Constant Field Values

OVER sample code for java.awt.dnd.DragSourceContext.OVER

protected static final int OVER
An int used by updateCurrentCursor() indicating that the Cursor is over a DropTarget.

See Also:
Constant Field Values

CHANGED sample code for java.awt.dnd.DragSourceContext.CHANGED

protected static final int CHANGED
An int used by updateCurrentCursor() indicating that the user operation has changed.

See Also:
Constant Field Values
Constructor Detail

DragSourceContext sample code for java.awt.dnd.DragSourceContext(java.awt.dnd.peer.DragSourceContextPeer, java.awt.dnd.DragGestureEvent, java.awt.Cursor, java.awt.Image, java.awt.Point, java.awt.datatransfer.Transferable, java.awt.dnd.DragSourceListener) definition code for java.awt.dnd.DragSourceContext(java.awt.dnd.peer.DragSourceContextPeer, java.awt.dnd.DragGestureEvent, java.awt.Cursor, java.awt.Image, java.awt.Point, java.awt.datatransfer.Transferable, java.awt.dnd.DragSourceListener)

public DragSourceContext(DragSourceContextPeer sample code for java.awt.dnd.peer.DragSourceContextPeer definition code for java.awt.dnd.peer.DragSourceContextPeer  dscp,
                         DragGestureEvent sample code for java.awt.dnd.DragGestureEvent definition code for java.awt.dnd.DragGestureEvent  trigger,
                         Cursor sample code for java.awt.Cursor definition code for java.awt.Cursor  dragCursor,
                         Image sample code for java.awt.Image definition code for java.awt.Image  dragImage,
                         Point sample code for java.awt.Point definition code for java.awt.Point  offset,
                         Transferable sample code for java.awt.datatransfer.Transferable definition code for java.awt.datatransfer.Transferable  t,
                         DragSourceListener sample code for java.awt.dnd.DragSourceListener definition code for java.awt.dnd.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.
If DragSourceContextPeer is null NullPointerException is thrown.
If DragGestureEvent is null NullPointerException is thrown.
If Cursor is null no exception is thrown and the default drag cursor behavior is activated for this drag operation.
If Image is null no exception is thrown.
If Image is not null and the offset is null NullPointerException is thrown.
If Transferable is null NullPointerException is thrown.
If DragSourceListener is null no exception is thrown.

Parameters:
dscp - the DragSourceContextPeer for this drag
trigger - the triggering event
dragCursor - the initial Cursor
dragImage - the Image to drag (or null)
offset - the offset of the image origin from the hotspot at the instant of the triggering event
t - the Transferable
dsl - the DragSourceListener
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if the Component associated with the trigger event is null.
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if the DragSource for the trigger event is null.
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if the drag action for the trigger event is DnDConstants.ACTION_NONE.
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if the source actions for the DragGestureRecognizer associated with the trigger event are equal to DnDConstants.ACTION_NONE.
NullPointerException sample code for java.lang.NullPointerException definition code for java.lang.NullPointerException - if dscp, trigger, or t are null, or if dragImage is non-null and offset is null
Method Detail

getDragSource sample code for java.awt.dnd.DragSourceContext.getDragSource() definition code for java.awt.dnd.DragSourceContext.getDragSource()

public DragSource sample code for java.awt.dnd.DragSource definition code for java.awt.dnd.DragSource  getDragSource()
Returns the DragSource that instantiated this DragSourceContext.

Returns:
the DragSource that instantiated this DragSourceContext

getComponent sample code for java.awt.dnd.DragSourceContext.getComponent() definition code for java.awt.dnd.DragSourceContext.getComponent()

public Component sample code for java.awt.Component definition code for java.awt.Component  getComponent()
Returns the Component associated with this DragSourceContext.

Returns:
the Component that started the drag

getTrigger sample code for java.awt.dnd.DragSourceContext.getTrigger() definition code for java.awt.dnd.DragSourceContext.getTrigger()

public DragGestureEvent sample code for java.awt.dnd.DragGestureEvent definition code for java.awt.dnd.DragGestureEvent  getTrigger()
Returns the DragGestureEvent that initially triggered the drag.

Returns:
the Event that triggered the drag

getSourceActions sample code for java.awt.dnd.DragSourceContext.getSourceActions() definition code for java.awt.dnd.DragSourceContext.getSourceActions()

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.

Returns:
the drop actions supported by the drag source

setCursor sample code for java.awt.dnd.DragSourceContext.setCursor(java.awt.Cursor) definition code for java.awt.dnd.DragSourceContext.setCursor(java.awt.Cursor)

public void setCursor(Cursor sample code for java.awt.Cursor definition code for java.awt.Cursor  c)
Sets the cursor for this drag operation to the specified Cursor. If the specified Cursor is null, the default drag cursor behavior is activated for this drag operation, otherwise it is deactivated.

Parameters:
c - the Cursor to display, or null to activate the default drag cursor behavior

getCursor sample code for java.awt.dnd.DragSourceContext.getCursor() definition code for java.awt.dnd.DragSourceContext.getCursor()

public Cursor sample code for java.awt.Cursor definition code for java.awt.Cursor  getCursor()
Returns the current drag Cursor.

Returns:
the current drag Cursor

addDragSourceListener sample code for java.awt.dnd.DragSourceContext.addDragSourceListener(java.awt.dnd.DragSourceListener) definition code for java.awt.dnd.DragSourceContext.addDragSourceListener(java.awt.dnd.DragSourceListener)

public void addDragSourceListener(DragSourceListener sample code for java.awt.dnd.DragSourceListener definition code for java.awt.dnd.DragSourceListener  dsl)
                           throws TooManyListenersException sample code for java.util.TooManyListenersException definition code for java.util.TooManyListenersException 
Add a DragSourceListener to this DragSourceContext if one has not already been added. If a DragSourceListener already exists, this method throws a TooManyListenersException.

Parameters:
dsl - the DragSourceListener to add. Note that while null is not prohibited, it is not acceptable as a parameter.

Throws:
TooManyListenersException - if a DragSourceListener has already been added
TooManyListenersException sample code for java.util.TooManyListenersException definition code for java.util.TooManyListenersException

removeDragSourceListener sample code for java.awt.dnd.DragSourceContext.removeDragSourceListener(java.awt.dnd.DragSourceListener) definition code for java.awt.dnd.DragSourceContext.removeDragSourceListener(java.awt.dnd.DragSourceListener)

public void removeDragSourceListener(DragSourceListener sample code for java.awt.dnd.DragSourceListener definition code for java.awt.dnd.DragSourceListener  dsl)
Removes the specified DragSourceListener from this DragSourceContext.

Parameters:
dsl - the DragSourceListener to remove; note that while null is not prohibited, it is not acceptable as a parameter

transferablesFlavorsChanged sample code for java.awt.dnd.DragSourceContext.transferablesFlavorsChanged() definition code for java.awt.dnd.DragSourceContext.transferablesFlavorsChanged()

public void transferablesFlavorsChanged()
Notifies the peer that the Transferable's DataFlavors have changed.


dragEnter sample code for java.awt.dnd.DragSourceContext.dragEnter(java.awt.dnd.DragSourceDragEvent) definition code for java.awt.dnd.DragSourceContext.dragEnter(java.awt.dnd.DragSourceDragEvent)

public void dragEnter(DragSourceDragEvent sample code for java.awt.dnd.DragSourceDragEvent definition code for java.awt.dnd.DragSourceDragEvent  dsde)
Calls dragEnter on the DragSourceListeners registered with this DragSourceContext and with the associated DragSource, and passes them the specified DragSourceDragEvent.

Specified by:
dragEnter sample code for java.awt.dnd.DragSourceListener.dragEnter(java.awt.dnd.DragSourceDragEvent) definition code for java.awt.dnd.DragSourceListener.dragEnter(java.awt.dnd.DragSourceDragEvent) in interface DragSourceListener sample code for java.awt.dnd.DragSourceListener definition code for java.awt.dnd.DragSourceListener
Parameters:
dsde - the DragSourceDragEvent

dragOver sample code for java.awt.dnd.DragSourceContext.dragOver(java.awt.dnd.DragSourceDragEvent) definition code for java.awt.dnd.DragSourceContext.dragOver(java.awt.dnd.DragSourceDragEvent)

public void dragOver(DragSourceDragEvent sample code for java.awt.dnd.DragSourceDragEvent definition code for java.awt.dnd.DragSourceDragEvent  dsde)
Calls dragOver on the DragSourceListeners registered with this DragSourceContext and with the associated DragSource, and passes them the specified DragSourceDragEvent.

Specified by:
dragOver sample code for java.awt.dnd.DragSourceListener.dragOver(java.awt.dnd.DragSourceDragEvent) definition code for java.awt.dnd.DragSourceListener.dragOver(java.awt.dnd.DragSourceDragEvent) in interface DragSourceListener sample code for java.awt.dnd.DragSourceListener definition code for java.awt.dnd.DragSourceListener
Parameters:
dsde - the DragSourceDragEvent

dragExit sample code for java.awt.dnd.DragSourceContext.dragExit(java.awt.dnd.DragSourceEvent) definition code for java.awt.dnd.DragSourceContext.dragExit(java.awt.dnd.DragSourceEvent)

public void dragExit(DragSourceEvent sample code for java.awt.dnd.DragSourceEvent definition code for java.awt.dnd.DragSourceEvent  dse)
Calls dragExit on the DragSourceListeners registered with this DragSourceContext and with the associated DragSource, and passes them the specified DragSourceEvent.

Specified by:
dragExit sample code for java.awt.dnd.DragSourceListener.dragExit(java.awt.dnd.DragSourceEvent) definition code for java.awt.dnd.DragSourceListener.dragExit(java.awt.dnd.DragSourceEvent) in interface DragSourceListener sample code for java.awt.dnd.DragSourceListener definition code for java.awt.dnd.DragSourceListener
Parameters:
dse - the DragSourceEvent

dropActionChanged sample code for java.awt.dnd.DragSourceContext.dropActionChanged(java.awt.dnd.DragSourceDragEvent) definition code for java.awt.dnd.DragSourceContext.dropActionChanged(java.awt.dnd.DragSourceDragEvent)

public void dropActionChanged(DragSourceDragEvent sample code for java.awt.dnd.DragSourceDragEvent definition code for java.awt.dnd.DragSourceDragEvent  dsde)
Calls dropActionChanged on the DragSourceListeners registered with this DragSourceContext and with the associated DragSource, and passes them the specified DragSourceDragEvent.

Specified by:
dropActionChanged sample code for java.awt.dnd.DragSourceListener.dropActionChanged(java.awt.dnd.DragSourceDragEvent) definition code for java.awt.dnd.DragSourceListener.dropActionChanged(java.awt.dnd.DragSourceDragEvent) in interface DragSourceListener sample code for java.awt.dnd.DragSourceListener definition code for java.awt.dnd.DragSourceListener
Parameters:
dsde - the DragSourceDragEvent

dragDropEnd sample code for java.awt.dnd.DragSourceContext.dragDropEnd(java.awt.dnd.DragSourceDropEvent) definition code for java.awt.dnd.DragSourceContext.dragDropEnd(java.awt.dnd.DragSourceDropEvent)

public void dragDropEnd(DragSourceDropEvent sample code for java.awt.dnd.DragSourceDropEvent definition code for java.awt.dnd.DragSourceDropEvent  dsde)
Calls dragDropEnd on the DragSourceListeners registered with this DragSourceContext and with the associated DragSource, and passes them the specified DragSourceDropEvent.

Specified by:
dragDropEnd sample code for java.awt.dnd.DragSourceListener.dragDropEnd(java.awt.dnd.DragSourceDropEvent) definition code for java.awt.dnd.DragSourceListener.dragDropEnd(java.awt.dnd.DragSourceDropEvent) in interface DragSourceListener sample code for java.awt.dnd.DragSourceListener definition code for java.awt.dnd.DragSourceListener
Parameters:
dsde - the DragSourceDropEvent

dragMouseMoved sample code for java.awt.dnd.DragSourceContext.dragMouseMoved(java.awt.dnd.DragSourceDragEvent) definition code for java.awt.dnd.DragSourceContext.dragMouseMoved(java.awt.dnd.DragSourceDragEvent)

public void dragMouseMoved(DragSourceDragEvent sample code for java.awt.dnd.DragSourceDragEvent definition code for java.awt.dnd.DragSourceDragEvent  dsde)
Calls dragMouseMoved on the DragSourceMotionListeners registered with the DragSource associated with this DragSourceContext, and them passes the specified DragSourceDragEvent.

Specified by:
dragMouseMoved sample code for java.awt.dnd.DragSourceMotionListener.dragMouseMoved(java.awt.dnd.DragSourceDragEvent) definition code for java.awt.dnd.DragSourceMotionListener.dragMouseMoved(java.awt.dnd.DragSourceDragEvent) in interface DragSourceMotionListener sample code for java.awt.dnd.DragSourceMotionListener definition code for java.awt.dnd.DragSourceMotionListener
Parameters:
dsde - the DragSourceDragEvent
Since:
1.4

getTransferable sample code for java.awt.dnd.DragSourceContext.getTransferable() definition code for java.awt.dnd.DragSourceContext.getTransferable()

public Transferable sample code for java.awt.datatransfer.Transferable definition code for java.awt.datatransfer.Transferable  getTransferable()
Returns the Transferable associated with this DragSourceContext.

Returns:
the Transferable

updateCurrentCursor sample code for java.awt.dnd.DragSourceContext.updateCurrentCursor(int, int, int) definition code for java.awt.dnd.DragSourceContext.updateCurrentCursor(int, int, int)

protected void updateCurrentCursor(int dropOp,
                                   int targetAct,
                                   int status)
If the default drag cursor behavior is active, this method sets the default drag cursor for the specified selected operation, supported actions and status, otherwise this method does nothing.

Parameters:
dropOp - the user's currently selected operation
targetAct - the current target's supported actions
status - the constant