Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
java.awt.dnd

Class DragSourceAdapter

java.lang.Object
|
+--java.awt.dnd.DragSourceAdapter

All Implemented Interfaces:

DragSourceListener, DragSourceMotionListener


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:Author:See Also:

Constructor Summary

DragSourceAdapter()

Default constructor.

Method Summary

voiddragDropEnd(java.awt.dnd.DragSourceDropEvent e)

Called when the drag and drop operation is complete.
voiddragEnter(java.awt.dnd.DragSourceDragEvent e)

Called when the cursor hotspot enters a drop site which will accept the drag.
voiddragExit(java.awt.dnd.DragSourceEvent e)

Called when the cursor hotspot moves outside of a drop site which will accept the drag.
voiddragMouseMoved(java.awt.dnd.DragSourceDragEvent e)

Called whenever the mouse is moved during a drag-and-drop operation.
voiddragOver(java.awt.dnd.DragSourceDragEvent e)

Called when the cursor hotspot moves inside of a drop site which will accept the drag.
voiddropActionChanged(java.awt.dnd.DragSourceDragEvent e)

Called when the user modifies the drop gesture.

Constructor Details

DragSourceAdapter

public DragSourceAdapter()

Default constructor.


Method Details

dragDropEnd

public void dragDropEnd(java.awt.dnd.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.

Parameters:


dragEnter

public void dragEnter(java.awt.dnd.DragSourceDragEvent e)

Called when the cursor hotspot enters a drop site which will accept the drag.

Parameters:


dragExit

public void dragExit(java.awt.dnd.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.

Parameters:


dragMouseMoved

public void dragMouseMoved(java.awt.dnd.DragSourceDragEvent e)

Called whenever the mouse is moved during a drag-and-drop operation.

Parameters:


dragOver

public void dragOver(java.awt.dnd.DragSourceDragEvent e)

Called when the cursor hotspot moves inside of a drop site which will accept the drag.

Parameters:


dropActionChanged

public void dropActionChanged(java.awt.dnd.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.

Parameters: