DropTargetDragEvent(DropTargetContext dtc,
Point cursorLocn,
int dropAction,
int srcActions)
Construct a DropTargetDragEvent given the
DropTargetContext for this operation,
the location of the "Drag" Cursor's hotspot
in the Component's coordinates, the
currently selected user drop action, and current
set of actions supported by the source.
Method Summary
void
acceptDrag(int dragOperation)
Accept the drag
This method should be called from a DropTargetListeners dragEnter(),
dragOver() and dragActionChanged() methods if the implementation
wishes to accept an operation from the srcActions other than the one
selected by the user as represented by the dropAction.
public DropTargetDragEvent(DropTargetContext dtc,
Point cursorLocn,
int dropAction,
int srcActions)
Construct a DropTargetDragEvent given the
DropTargetContext for this operation,
the location of the "Drag" Cursor's hotspot
in the Component's coordinates, the
currently selected user drop action, and current
set of actions supported by the source.
Parameters:
dtc - The DropTargetContext for this operation
cursorLocn - The location of the "Drag" Cursor's
hotspot in Component coordinates
dropAction - The currently selected user drop action
srcActions - The current set of actions supported by the source
This method returns the current DataFlavors
as a java.util.List
Returns:
a java.util.List of the Current DataFlavors
isDataFlavorSupported
public boolean isDataFlavorSupported(DataFlavor df)
This method returns a boolean indicating
if the specified DataFlavor is supported.
Parameters:
df - the DataFlavor to test
Returns:
if a particular DataFlavor is supported
getSourceActions
public int getSourceActions()
This method returns an int representing
set of actions supported by the source.
Returns:
source actions
getDropAction
public int getDropAction()
This method returns an int
representing the currently selected drop action.
Returns:
currently selected drop action
acceptDrag
public void acceptDrag(int dragOperation)
Accept the drag
This method should be called from a DropTargetListeners dragEnter(),
dragOver() and dragActionChanged() methods if the implementation
wishes to accept an operation from the srcActions other than the one
selected by the user as represented by the dropAction.
Parameters:
dragOperation - the operation accepted by the target
rejectDrag
public void rejectDrag()
Reject the drag as a result of examining either the dropAction or
the available DataFlavor types.
Submit a bug or feature For further API reference and developer documentation, see Java 2 SDK SE Developer Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries. Copyright 1993-2001 Sun Microsystems, Inc. 901 San Antonio Road Palo Alto, California, 94303, U.S.A. All Rights Reserved.