java.awt.dnd
Class DragSourceAdapter

java.lang.Object
  extended by java.awt.dnd.DragSourceAdapter
All Implemented Interfaces:
DragSourceListener, DragSourceMotionListener, EventListener

public abstract class DragSourceAdapter
extends Object
implements DragSourceListener, DragSourceMotionListener

This class implements DragSourceListener and DragSourceMotionListener, and implements all methods with empty bodies. This allows a listener interested in implementing only a subset of these interfaces to extend this class and override only the desired methods.

Since:
1.4
See Also:
DragSourceEvent, DragSourceListener, DragSourceMotionListener

Constructor Summary
DragSourceAdapter()
          Default constructor.
 
Method Summary
 void dragDropEnd(DragSourceDropEvent e)
          Called when the drag and drop operation is complete.
 void dragEnter(DragSourceDragEvent e)
          Called when the cursor hotspot enters a drop site which will accept the drag.
 void dragExit(DragSourceEvent e)
          Called when the cursor hotspot moves outside of a drop site which will accept the drag.
 void dragMouseMoved(DragSourceDragEvent e)
          Called whenever the mouse is moved during a drag-and-drop operation.
 void dragOver(DragSourceDragEvent e)
          Called when the cursor hotspot moves inside of a drop site which will accept the drag.
 void dropActionChanged(DragSourceDragEvent e)
          Called when the user modifies the drop gesture.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DragSourceAdapter

public DragSourceAdapter()
Default constructor.

Method Detail

dragEnter

public void dragEnter(DragSourceDragEvent e)
Called when the cursor hotspot enters a drop site which will accept the drag.

Specified by:
dragEnter in interface DragSourceListener
Parameters:
e - the event

dragOver

public void dragOver(DragSourceDragEvent e)
Called when the cursor hotspot moves inside of a drop site which will accept the drag.

Specified by:
dragOver in interface DragSourceListener
Parameters:
e - the event

dragMouseMoved

public void dragMouseMoved(DragSourceDragEvent e)
Called whenever the mouse is moved during a drag-and-drop operation.

Specified by:
dragMouseMoved in interface DragSourceMotionListener
Parameters:
e - the event

dropActionChanged

public void dropActionChanged(DragSourceDragEvent e)
Called when the user modifies the drop gesture. This is often the case when additional mouse or key events are received during the drag.

Specified by:
dropActionChanged in interface DragSourceListener
Parameters:
e - the event

dragExit

public void dragExit(DragSourceEvent e)
Called when the cursor hotspot moves outside of a drop site which will accept the drag. This could also happen if the drop site is no longer active, or no longer accepts the drag.

Specified by:
dragExit in interface DragSourceListener
Parameters:
e - the event

dragDropEnd

public void dragDropEnd(DragSourceDropEvent e)
Called when the drag and drop operation is complete. After this event, getDropSuccess of the event is valid, and getDropAction holds the action requested by the drop site. Furthermore, the DragSourceContext is invalidated.

Specified by:
dragDropEnd in interface DragSourceListener
Parameters:
e - the event