APIdia Launch Partner
Top Description Methods
java.awt.dnd.peer

public Interface DropTargetContextPeer

Known Direct Implementers
sun.awt.dnd.SunDropTargetContextPeer
Imports
java.awt.datatransfer.DataFlavor, .Transferable, java.awt.dnd.DropTarget, .InvalidDnDOperationException

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

Since
1.2

Method Summary

Modifier and TypeMethod and Description
public void
acceptDrag(int
the drag action
dragAction
)

accept the Drag

public void
acceptDrop(int
the drop action
dropAction
)

accept the Drop

public void
dropComplete(boolean
the signal
success
)

signal complete

public DropTarget

Returns:

the DropTarget associated with this peer
getDropTarget
()

get the DropTarget associated with this peer

public int

Returns:

the current Target actions
getTargetActions
()

get the current Target actions

public Transferable

Returns:

an input stream to the remote data
getTransferable
()

get an input stream to the remote data

public DataFlavor[]

Returns:

the (remote) DataFlavors from the peer
getTransferDataFlavors
()

get the (remote) DataFlavors from the peer

public boolean

Returns:

true if the DragSource Transferable is in the same JVM as the Target, otherwise false
isTransferableJVMLocal
()

Return whether or not the DragSource Transferable is in the same JVM as the Target.

public void
rejectDrag()

reject the Drag

public void
rejectDrop()

reject the Drop

public void
setTargetActions(int
the actions
actions
)

update the peer's notion of the Target's actions

Method Detail

acceptDragback to summary
public void acceptDrag(int dragAction)

accept the Drag

Parameters
dragAction:int

the drag action

acceptDropback to summary
public void acceptDrop(int dropAction)

accept the Drop

Parameters
dropAction:int

the drop action

dropCompleteback to summary
public void dropComplete(boolean success)

signal complete

Parameters
success:boolean

the signal

getDropTargetback to summary
public DropTarget getDropTarget()

get the DropTarget associated with this peer

Returns:DropTarget

the DropTarget associated with this peer

getTargetActionsback to summary
public int getTargetActions()

get the current Target actions

Returns:int

the current Target actions

getTransferableback to summary
public Transferable getTransferable() throws InvalidDnDOperationException

get an input stream to the remote data

Returns:Transferable

an input stream to the remote data

getTransferDataFlavorsback to summary
public DataFlavor[] getTransferDataFlavors()

get the (remote) DataFlavors from the peer

Returns:DataFlavor[]

the (remote) DataFlavors from the peer

isTransferableJVMLocalback to summary
public boolean isTransferableJVMLocal()

Return whether or not the DragSource Transferable is in the same JVM as the Target.

Returns:boolean

true if the DragSource Transferable is in the same JVM as the Target, otherwise false

rejectDragback to summary
public void rejectDrag()

reject the Drag

rejectDropback to summary
public void rejectDrop()

reject the Drop

setTargetActionsback to summary
public void setTargetActions(int actions)

update the peer's notion of the Target's actions

Parameters
actions:int

the actions