|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.dnd.DropTargetContext
Safe: A DropTargetContext
is created
whenever the logical cursor associated
with a Drag and Drop operation coincides with the visible geometry of
a Component
associated with a DropTarget
.
The DropTargetContext
provides
the mechanism for a potential receiver
of a drop operation to both provide the end user with the appropriate
drag under feedback, but also to effect the subsequent data transfer
if appropriate.
Field Summary | |
private DropTarget |
dropTarget
The DropTarget associated with this DropTargetContext. |
private java.awt.dnd.peer.DropTargetContextPeer |
dropTargetContextPeer
|
private static long |
serialVersionUID
|
private Transferable |
transferable
|
Constructor Summary | |
(package private) |
DropTargetContext(DropTarget dt)
Construct a DropTargetContext
given a specified DropTarget . |
Method Summary | |
protected void |
acceptDrag(int dragOperation)
accept the Drag. |
protected void |
acceptDrop(int dropOperation)
called to signal that the drop is acceptable using the specified operation. |
void |
addNotify(java.awt.dnd.peer.DropTargetContextPeer dtcp)
Suppressed: Called when associated with the DropTargetContextPeer . |
protected Transferable |
createTransferableProxy(Transferable t,
boolean local)
Creates a TransferableProxy to proxy for the specified Transferable. |
void |
dropComplete(boolean success)
Enabled: This method signals that the drop is completed and if it was successful or not. |
Component |
getComponent()
Suppressed: This method returns the Component associated with
this DropTargetContext . |
protected DataFlavor[] |
getCurrentDataFlavors()
get the available DataFlavors of the Transferable operand of this operation. |
protected List |
getCurrentDataFlavorsAsList()
This method returns a the currently available DataFlavors of the Transferable operand
as a java.util.List . |
DropTarget |
getDropTarget()
Enabled: This method returns the DropTarget associated with this
DropTargetContext . |
(package private) java.awt.dnd.peer.DropTargetContextPeer |
getDropTargetContextPeer()
Get the DropTargetContextPeer
|
protected int |
getTargetActions()
This method returns an int representing the
current actions this DropTarget will accept. |
protected Transferable |
getTransferable()
get the Transferable (proxy) operand of this operation |
protected boolean |
isDataFlavorSupported(DataFlavor df)
This method returns a boolean
indicating if the given DataFlavor is
supported by this DropTargetContext . |
protected void |
rejectDrag()
reject the Drag. |
protected void |
rejectDrop()
called to signal that the drop is unacceptable. |
void |
removeNotify()
Suppressed: Called when disassociated with the DropTargetContextPeer . |
protected void |
setTargetActions(int actions)
This method sets the current actions acceptable to this DropTarget . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final long serialVersionUID
private DropTarget dropTarget
private transient java.awt.dnd.peer.DropTargetContextPeer dropTargetContextPeer
private transient Transferable transferable
Constructor Detail |
DropTargetContext(DropTarget dt)
DropTargetContext
given a specified DropTarget
.
dt
- the DropTarget to associate withMethod Detail |
public DropTarget getDropTarget()
DropTarget
associated with this
DropTargetContext
.
DropTarget
associated with this DropTargetContext
public Component getComponent()
Component
associated with
this DropTargetContext
.
public void addNotify(java.awt.dnd.peer.DropTargetContextPeer dtcp)
DropTargetContextPeer
.
dtcp
- the DropTargetContextPeer
public void removeNotify()
DropTargetContextPeer
.
protected void setTargetActions(int actions)
DropTarget
.
actions
- an int
representing the supported action(s)protected int getTargetActions()
int
representing the
current actions this DropTarget
will accept.
DropTarget
public void dropComplete(boolean success) throws InvalidDnDOperationException
success
- true for success, false if not
InvalidDnDOperationException
- if a drop is not outstanding/extantprotected void acceptDrag(int dragOperation)
dragOperation
- the supported action(s)protected void rejectDrag()
protected void acceptDrop(int dropOperation)
dropOperation
- the supported action(s)protected void rejectDrop()
protected DataFlavor[] getCurrentDataFlavors()
Transferable
operand of this operation.
DataFlavor[]
containing the
supported DataFlavor
s of the
Transferable
operand.protected List getCurrentDataFlavorsAsList()
Transferable
operand
as a java.util.List
.
java.util.List
protected boolean isDataFlavorSupported(DataFlavor df)
boolean
indicating if the given DataFlavor
is
supported by this DropTargetContext
.
df
- the DataFlavor
DataFlavor
specified is supportedprotected Transferable getTransferable() throws InvalidDnDOperationException
Transferable
InvalidDnDOperationException
- if a drag is not outstanding/extant
java.awt.dnd.peer.DropTargetContextPeer getDropTargetContextPeer()
DropTargetContextPeer
protected Transferable createTransferableProxy(Transferable t, boolean local)
t
- the Transferable to be proxiedlocal
- true if t represents
the result of a local drag-n-drop operation.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |