org.apache.pivot.wtk
Interface DropTarget


public interface DropTarget

Interface representing a drop target.


Method Summary
 DropAction dragEnter(Component component, Manifest dragContent, int supportedDropActions, DropAction userDropAction)
          Called when the mouse first enters a drop target during a drag operation.
 void dragExit(Component component)
          Called when the mouse leaves a drop target during a drag operation.
 DropAction dragMove(Component component, Manifest dragContent, int supportedDropActions, int x, int y, DropAction userDropAction)
          Called when the mouse is moved while positioned over a drop target during a drag operation.
 DropAction drop(Component component, Manifest dragContent, int supportedDropActions, int x, int y, DropAction userDropAction)
          Called to drop the drag content.
 DropAction userDropActionChange(Component component, Manifest dragContent, int supportedDropActions, int x, int y, DropAction userDropAction)
          Called when the user drop action changes while the mouse is positioned over a drop target during a drag operation.
 

Method Detail

dragEnter

DropAction dragEnter(Component component,
                     Manifest dragContent,
                     int supportedDropActions,
                     DropAction userDropAction)
Called when the mouse first enters a drop target during a drag operation.

Parameters:
component -
dragContent -
supportedDropActions -
userDropAction -
Returns:
The drop action that would result if the user dropped the item at this location, or null if the target cannot accept the drop.

dragExit

void dragExit(Component component)
Called when the mouse leaves a drop target during a drag operation.

Parameters:
component -

dragMove

DropAction dragMove(Component component,
                    Manifest dragContent,
                    int supportedDropActions,
                    int x,
                    int y,
                    DropAction userDropAction)
Called when the mouse is moved while positioned over a drop target during a drag operation.

Parameters:
component -
dragContent -
supportedDropActions -
x -
y -
userDropAction -
Returns:
The drop action that would result if the user dropped the item at this location, or null if the target cannot accept the drop.

userDropActionChange

DropAction userDropActionChange(Component component,
                                Manifest dragContent,
                                int supportedDropActions,
                                int x,
                                int y,
                                DropAction userDropAction)
Called when the user drop action changes while the mouse is positioned over a drop target during a drag operation.

Parameters:
component -
dragContent -
supportedDropActions -
x -
y -
userDropAction -
Returns:
The drop action that would result if the user dropped the item at this location, or null if the target cannot accept the drop.

drop

DropAction drop(Component component,
                Manifest dragContent,
                int supportedDropActions,
                int x,
                int y,
                DropAction userDropAction)
Called to drop the drag content.

Parameters:
component -
dragContent -
supportedDropActions -
x -
y -
userDropAction -
Returns:
The drop action used to perform the drop, or null if the target rejected the drop.