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

Class Index

 o DropTargetContext.TransferableProxy

Variable Index

 o dropTarget
 o dropTargetContextPeer
 o transferable

Method Index

 o acceptDrag(int)
accept the Drag
 o acceptDrop(int)
called to signal that the drop is acceptable using the specified operation.
 o addNotify(DropTargetContextPeer)
called when associated with the DropTargetContextPeer
 o createTransferableProxy(Transferable, boolean)
subclasses may override this to supply their own Proxy
 o dropComplete(boolean)
signal that the drop is completed and if it was successful or not
 o getComponent()
 o getCurrentDataFlavors()
get the available DataFlavors of the Transferable operand of this operation
 o getDropTarget()
 o getTargetActions()
 o getTransferable()
get the Transferable (proxy) operand of this operation
 o rejectDrag()
reject the Drag
 o rejectDrop()
called to signal that the drop is unacceptable.
 o removeNotify()
called when disassociated with the DropTargetContextPeer
 o setTargetActions(int)
set the current actions acceptable to this DropTarget

Variables

 o dropTarget
protected DropTarget dropTarget
 o dropTargetContextPeer
protected DropTargetContextPeer dropTargetContextPeer
 o transferable
protected Transferable transferable

Methods

 o getDropTarget
public DropTarget getDropTarget()
Returns:
the DropTarget associated with this Context
 o getComponent
public Component getComponent()
Returns:
the Component associated with this Context
 o addNotify
public void addNotify(DropTargetContextPeer dtcp)
called when associated with the DropTargetContextPeer

 o removeNotify
public void removeNotify()
called when disassociated with the DropTargetContextPeer

 o setTargetActions
protected void setTargetActions(int actions)
set the current actions acceptable to this DropTarget

 o getTargetActions
protected int getTargetActions()
Returns:
the current actions acceptable to this DropTarget
 o dropComplete
public void dropComplete(boolean success) throws InvalidDnDOperationException
signal that the drop is completed and if it was successful or not

 o acceptDrag
protected void acceptDrag(int dragOperation)
accept the Drag

 o rejectDrag
protected void rejectDrag()
reject the Drag

 o 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.

 o rejectDrop
protected void rejectDrop()
called to signal that the drop is unacceptable. must be called during DropTargetListener.drop method invocation.

 o getCurrentDataFlavors
protected DataFlavor[] getCurrentDataFlavors()
get the available DataFlavors of the Transferable operand of this operation

 o getTransferable
protected Transferable getTransferable() throws InvalidDnDOperationException
get the Transferable (proxy) operand of this operation

 o 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