GeezerVison is showing docs.oracle.com — DropTargetDropEvent (Java Platform SE 8 )
Java™ Platform Standard Ed. 8
java.awt.dnd
Class DropTargetDropEvent
-
-
Constructor Summary
Constructors
| Constructor |
Description |
DropTargetDropEvent(DropTargetContext dtc,
Point cursorLocn,
int dropAction,
int srcActions) |
Construct a DropTargetDropEvent 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 the current set of
actions supported by the source.
|
DropTargetDropEvent(DropTargetContext dtc,
Point cursorLocn,
int dropAction,
int srcActions,
boolean isLocal) |
Construct a DropTargetEvent 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,
the current set of actions supported by the source,
and a boolean indicating if the source is in the same JVM
as the target.
|
-
Method Summary
All Methods Instance Methods Concrete Methods
| Modifier and Type |
Method |
Description |
void |
acceptDrop(int dropAction) |
accept the drop, using the specified action.
|
void |
dropComplete(boolean success) |
This method notifies the DragSource
that the drop transfer(s) are completed.
|
DataFlavor[] |
getCurrentDataFlavors() |
This method returns the current DataFlavors.
|
List<DataFlavor> |
getCurrentDataFlavorsAsList() |
This method returns the currently available
DataFlavors as a java.util.List.
|
int |
getDropAction() |
This method returns the user drop action.
|
Point |
getLocation() |
This method returns a Point
indicating the Cursor's current
location in the Component's coordinates.
|
int |
getSourceActions() |
This method returns the source drop actions.
|
Transferable |
getTransferable() |
This method returns the Transferable object
associated with the drop.
|
boolean |
isDataFlavorSupported(DataFlavor df) |
This method returns a boolean indicating if the
specified DataFlavor is available
from the source.
|
boolean |
isLocalTransfer() |
This method returns an int indicating if
the source is in the same JVM as the target.
|
void |
rejectDrop() |
reject the Drop.
|
-
-
Constructor Detail
-
DropTargetDropEvent
public DropTargetDropEvent(DropTargetContext dtc,
Point cursorLocn,
int dropAction,
int srcActions,
boolean isLocal)
Construct a DropTargetEvent 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,
the current set of actions supported by the source,
and a boolean indicating if the source is in the same JVM
as the target.
- Parameters:
dtc - The DropTargetContext for this operation
cursorLocn - The location of the "Drag" Cursor's
hotspot in Component's coordinates
dropAction - the user drop action.
srcActions - the source drop actions.
isLocal - True if the source is in the same JVM as the target
- Throws:
NullPointerException - if cursorLocn is null
IllegalArgumentException - if dropAction is not one of DnDConstants.
IllegalArgumentException - if srcActions is not a bitwise mask of DnDConstants.
IllegalArgumentException - if dtc is null.
-
Method Detail
-
rejectDrop
public void rejectDrop()
reject the Drop.
Java™ Platform Standard Ed. 8
Submit a bug or feature For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. Copyright © 1993, 2026, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
|