|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.TransferHandler
net.xoetrope.swing.docking.XDockableTransferHandler
public class XDockableTransferHandler
A transfer handler for a dockable component. The object handles the
application/x-xui-xdockable drop flavor. It is only intended
that the drag and drop operation occurs within a single application. This
transferrable object maintains a static reference to the dockable object and
therefore it is not suitable for use in other contexts or between JVM
instances.
Copyright: Xoetrope Ltd. (c) 2003-2006
License: see license.txt
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.TransferHandler |
|---|
javax.swing.TransferHandler.DropLocation, javax.swing.TransferHandler.TransferSupport |
| Field Summary |
|---|
| Fields inherited from class javax.swing.TransferHandler |
|---|
COPY, COPY_OR_MOVE, LINK, MOVE, NONE |
| Constructor Summary | |
|---|---|
XDockableTransferHandler(java.lang.Object target)
Creates a new instance of XDockableTransferHandler |
|
| Method Summary | |
|---|---|
boolean |
canImport(javax.swing.JComponent c,
java.awt.datatransfer.DataFlavor[] flavors)
Indicates whether a component would accept an import of the given set of data flavors prior to actually attempting to import it. |
protected java.awt.datatransfer.Transferable |
createTransferable(javax.swing.JComponent c)
Creates a Transferable to use as the source for
a data transfer. |
protected void |
exportDone(javax.swing.JComponent c,
java.awt.datatransfer.Transferable data,
int action)
Invoked after data has been exported. |
int |
getSourceActions(javax.swing.JComponent c)
Returns the type of transfer actions supported by the source. |
boolean |
importData(javax.swing.JComponent c,
java.awt.datatransfer.Transferable t)
Causes a transfer to a component from a clipboard or a DND drop operation. |
| Methods inherited from class javax.swing.TransferHandler |
|---|
canImport, exportAsDrag, exportToClipboard, getCopyAction, getCutAction, getPasteAction, getVisualRepresentation, importData |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XDockableTransferHandler(java.lang.Object target)
| Method Detail |
|---|
public boolean importData(javax.swing.JComponent c,
java.awt.datatransfer.Transferable t)
Transferable represents
the data to be imported into the component.
importData in class javax.swing.TransferHandlercomp - the component to receive the transfer; this
argument is provided to enable sharing of TransferHandlers
by multiple componentst - the data to import
protected java.awt.datatransfer.Transferable createTransferable(javax.swing.JComponent c)
Transferable to use as the source for
a data transfer. Returns the representation of the data to
be transferred, or null if the component's
property is null
createTransferable in class javax.swing.TransferHandlerc - the component holding the data to be transferred; this
argument is provided to enable sharing of TransferHandlers
by multiple components
null if the property associated with c
is nullpublic int getSourceActions(javax.swing.JComponent c)
COPY
only should be advertised in that case. In this case only the MOVE
operation is supported.
getSourceActions in class javax.swing.TransferHandlerc - the component holding the data to be transferred; this
argument is provided to enable sharing of TransferHandlers
by multiple components.
COPY if the transfer property can be found,
otherwise returns NONE; a return value of
of NONE disables any transfers out of the component
protected void exportDone(javax.swing.JComponent c,
java.awt.datatransfer.Transferable data,
int action)
MOVE.
This method is implemented to do nothing since MOVE
is not a supported action of this implementation
(getSourceActions does not include MOVE).
exportDone in class javax.swing.TransferHandlersource - the component that was the source of the datadata - The data that was transferred or possibly null
if the action is NONE.action - the actual action that was performed
public boolean canImport(javax.swing.JComponent c,
java.awt.datatransfer.DataFlavor[] flavors)
canImport in class javax.swing.TransferHandlercomp - the component to receive the transfer; this
argument is provided to enable sharing of TransferHandlers
by multiple componentstransferFlavors - the data formats available
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||