All Packages Class Hierarchy This Package Previous Next Index
Class java.awt.dnd.DropTargetContext
java.lang.Object
|
+----java.awt.dnd.DropTargetContext
- public class DropTargetContext
- extends Object
A DropTargetContext is created whenever the logical cursor associated
with a Drag and Drop operation coincides with the visibel geometry of
a Component, with an associated DropTarget.
The DropTargetContext provides the mechanism for a potential receiver
of a Drop operation to both provide the end userr with the appropriate
drag under feedback, but also to effect the subsequent data transfer
if appropriate.
- Since:
- JDK1.2
DropTargetContext.TransferableProxy-
dropTarget-
dropTargetContextPeer-
transferable-
acceptDrag(int)
- accept the Drag
acceptDrop(int)
- called to signal that the drop is acceptable using the specified operation.
addNotify(DropTargetContextPeer)
- called when associated with the DropTargetContextPeer
createTransferableProxy(Transferable, boolean)
- subclasses may override this to supply their own Proxy
dropComplete(boolean)
- signal that the drop is completed and if it was successful or not
getComponent()
-
getCurrentDataFlavors()
- get the available DataFlavors of the Transferable operand of this operation
getDropTarget()
-
getTargetActions()
-
getTransferable()
- get the Transferable (proxy) operand of this operation
rejectDrag()
- reject the Drag
rejectDrop()
- called to signal that the drop is unacceptable.
removeNotify()
- called when disassociated with the DropTargetContextPeer
setTargetActions(int)
- set the current actions acceptable to this DropTarget
dropTarget
protected DropTarget dropTarget
dropTargetContextPeer
protected DropTargetContextPeer dropTargetContextPeer
transferable
protected Transferable transferable
getDropTarget
public DropTarget getDropTarget()
- Returns:
- the DropTarget associated with this Context
getComponent
public Component getComponent()
- Returns:
- the Component associated with this Context
addNotify
public void addNotify(DropTargetContextPeer dtcp)
- called when associated with the DropTargetContextPeer
removeNotify
public void removeNotify()
- called when disassociated with the DropTargetContextPeer
setTargetActions
protected void setTargetActions(int actions)
- set the current actions acceptable to this DropTarget
getTargetActions
protected int getTargetActions()
- Returns:
- the current actions acceptable to this DropTarget
dropComplete
public void dropComplete(boolean success) throws InvalidDnDOperationException
- signal that the drop is completed and if it was successful or not
acceptDrag
protected void acceptDrag(int dragOperation)
- accept the Drag
rejectDrag
protected void rejectDrag()
- reject the Drag
acceptDrop
protected void acceptDrop(int dropOperation)
- called to signal that the drop is acceptable using the specified operation.
must be called during DropTargetListener.drop method invocation.
rejectDrop
protected void rejectDrop()
- called to signal that the drop is unacceptable.
must be called during DropTargetListener.drop method invocation.
getCurrentDataFlavors
protected DataFlavor[] getCurrentDataFlavors()
- get the available DataFlavors of the Transferable operand of this operation
getTransferable
protected Transferable getTransferable() throws InvalidDnDOperationException
- get the Transferable (proxy) operand of this operation
createTransferableProxy
protected DropTargetContext.TransferableProxy createTransferableProxy(Transferable t,
boolean local)
- subclasses may override this to supply their own Proxy
All Packages Class Hierarchy This Package Previous Next Index
Submit a bug or feature