java.awt.dnd.peer

Interface DropTargetContextPeer

public interface DropTargetContextPeer

This interface is exposed by the underlying window system platform to enable control of platform DnD operations
Since:
1.2

Method Summary

void
acceptDrag(int dragAction)
accept the Drag
void
acceptDrop(int dropAction)
accept the Drop
void
dropComplete(boolean success)
signal complete
DropTarget
getDropTarget()
get the DropTarget associated with this peer
int
getTargetActions()
get the current Target actions
DataFlavor[]
getTransferDataFlavors()
get the (remote) DataFlavors from the peer
Transferable
getTransferable()
get an input stream to the remote data
boolean
isTransferableJVMLocal()
void
rejectDrag()
reject the Drag
void
rejectDrop()
reject the Drop
void
setTargetActions(int actions)
update the peer's notion of the Target's actions

Method Details

acceptDrag

public void acceptDrag(int dragAction)
accept the Drag

acceptDrop

public void acceptDrop(int dropAction)
accept the Drop

dropComplete

public void dropComplete(boolean success)
signal complete

getDropTarget

public DropTarget getDropTarget()
get the DropTarget associated with this peer

getTargetActions

public int getTargetActions()
get the current Target actions

getTransferDataFlavors

public DataFlavor[] getTransferDataFlavors()
get the (remote) DataFlavors from the peer

getTransferable

public Transferable getTransferable()
            throws InvalidDnDOperationException
get an input stream to the remote data

isTransferableJVMLocal

public boolean isTransferableJVMLocal()
Returns:
if the DragSource Transferable is in the same JVM as the Target

rejectDrag

public void rejectDrag()
reject the Drag

rejectDrop

public void rejectDrop()
reject the Drop

setTargetActions

public void setTargetActions(int actions)
update the peer's notion of the Target's actions