dsto.dfc.swing.dnd
Interface DropComponent

All Known Subinterfaces:
DragDropComponent
All Known Implementing Classes:
DfcTable, DfcTree, EditListView, LogMessageTable, MapTableView, StyleSheetTableView

public interface DropComponent

Defines a component that supports drop actions. Implementing classes must also extend java.awt.Component. Classes that implement this interface generally use an instance of DropTargetAdapter to manage drop events via method calls to this interface.

Version:
$Revision$
See Also:
DropTargetAdapter, DragSourceAdapter

Method Summary
 void executeDrop(DropTargetDropEvent e)
          Execute a drop action.
 int getSupportedDropActions()
          Return a mask of actions supported by this component eg DnDConstants.ACTION_COPY_OR_MOVE.
 void hideDragUnderFeedback()
          Remove any drag under feedback displayed by showDragUnderFeedback ().
 boolean isDropOK(DropTargetDragEvent e)
          Return true if a drop in the context in a DropTargetDragEvent is possible.
 void showDragUnderFeedback(boolean dropOK, DropTargetDragEvent e)
          Display any drag under (ie displayed under the mouse in the component) feedback.
 

Method Detail

getSupportedDropActions

int getSupportedDropActions()
Return a mask of actions supported by this component eg DnDConstants.ACTION_COPY_OR_MOVE. Note that the component may veto any particular drop attempt from isDropOK(java.awt.dnd.DropTargetDragEvent).


isDropOK

boolean isDropOK(DropTargetDragEvent e)
Return true if a drop in the context in a DropTargetDragEvent is possible.

Parameters:
e - The drop context.

showDragUnderFeedback

void showDragUnderFeedback(boolean dropOK,
                           DropTargetDragEvent e)
Display any drag under (ie displayed under the mouse in the component) feedback.

Parameters:
dropOK - The value of isDropOK () when the mouse first entered the component.
e - The drop context.

hideDragUnderFeedback

void hideDragUnderFeedback()
Remove any drag under feedback displayed by showDragUnderFeedback ().


executeDrop

void executeDrop(DropTargetDropEvent e)
Execute a drop action.



Copyright © 2008 Commonwealth of Australia