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
Methods inherited from class java.lang.Object
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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(java.awt.dnd.peer.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 Transferable createTransferableProxy(Transferable t,
boolean local)
- subclasses may override this to supply their own Proxy
Submit a bug or feature
Submit comments/suggestions about new javadoc look.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.