All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface com.ibm.dnd.DDTarget

public interface DDTarget
The interface for objects that handle DnD events for a particular drop target component.


Method Index

 o dragEnter()
As the mouse enters the drop target component.
 o dragExit()
As the mouse exits the drop target component.
 o dragOver(DataFlavorRecognizer, Point)
As the mouse passes the drop target component.
 o drop(Transferable, Point)
As the user drops the object.
 o dropComplete()
As the drop operation completes.

Methods

 o dragEnter
 public abstract void dragEnter()
As the mouse enters the drop target component.

 o dragExit
 public abstract void dragExit()
As the mouse exits the drop target component.

 o dragOver
 public abstract boolean dragOver(DataFlavorRecognizer dataFlavorRecognizer,
                                  Point location)
As the mouse passes the drop target component. This method should return a boolean indicating if DDTarget can accept the drop. The dataFlavorRecognizer parameter allows finding out if the drag object can be accepted.

Parameters:
dataFlavorRecognizer - has the isDatatFlavorSupported method that allows finding out if the drag object is acceptable.
location - current mouse location (relative to the component)
See Also:
DataFlavorRecognizer
 o drop
 public abstract boolean drop(Transferable source,
                              Point point)
As the user drops the object. This method is not called if the dragOver method returns false (indicating the object is not acceptable).

Parameters:
source - java.awt.datatransfer.Transferable the object to drop
p - java.awt.Point the point in target coordinates
Returns:
true on success, false otherwise.
 o dropComplete
 public abstract void dropComplete()
As the drop operation completes.


All Packages  Class Hierarchy  This Package  Previous  Next  Index