public class DropTargetDropEvent extends DropTargetEvent
context
source
Constructor and Description |
---|
DropTargetDropEvent(DropTargetContext dtc,
Point location,
int dropAction,
int actions)
Initializes a
DropTargetDropEvent . |
DropTargetDropEvent(DropTargetContext dtc,
Point location,
int dropAction,
int actions,
boolean isLocalTx)
Initializes a
DropTargetDropEvent . |
Modifier and Type | Method and Description |
---|---|
void |
acceptDrop(int dropAction) |
void |
dropComplete(boolean success) |
DataFlavor[] |
getCurrentDataFlavors() |
List<DataFlavor> |
getCurrentDataFlavorsAsList() |
int |
getDropAction() |
Point |
getLocation() |
int |
getSourceActions() |
Transferable |
getTransferable() |
boolean |
isDataFlavorSupported(DataFlavor flavor) |
boolean |
isLocalTransfer() |
void |
rejectDrop() |
getDropTargetContext
getSource, toString
public DropTargetDropEvent(DropTargetContext dtc, Point location, int dropAction, int actions)
DropTargetDropEvent
. By default this constructor
assumes that the target is not int same JVM.IllegalArgumentException
- If dropAction is not one of DnDConstants,
actions is not a bitwise mask of DnDConstants, or dtc is null.NullPointerException
- If location is null.public DropTargetDropEvent(DropTargetContext dtc, Point location, int dropAction, int actions, boolean isLocalTx)
DropTargetDropEvent
.IllegalArgumentException
- If dropAction is not one of DnDConstants,
actions is not a bitwise mask of DnDConstants, or dtc is null.NullPointerException
- If location is null.public Point getLocation()
public DataFlavor[] getCurrentDataFlavors()
public List<DataFlavor> getCurrentDataFlavorsAsList()
public boolean isDataFlavorSupported(DataFlavor flavor)
public int getSourceActions()
public int getDropAction()
public Transferable getTransferable()
public void acceptDrop(int dropAction)
public void rejectDrop()
public void dropComplete(boolean success)
public boolean isLocalTransfer()