Package docking.dnd
Class DragDropTreeTransferable
java.lang.Object
docking.dnd.DragDropTreeTransferable
- All Implemented Interfaces:
ClipboardOwner
,Transferable
Defines data that is available for drag/drop and clipboard transfers.
The data is an ArrayList of DragDropNode objects.
-
Field Summary
Modifier and TypeFieldDescriptionstatic DataFlavor
A static instance of the local tree node flavor that is an ArrayList of DragDropNode objects. -
Constructor Summary
ConstructorDescriptionDragDropTreeTransferable
(DragDropNode[] nodes) Constructs a new Transferable from the array of DragDropNodes -
Method Summary
Modifier and TypeMethodDescriptionReturn the transfer data with the given data flavor.Return all data flavors that this class supports.boolean
Return whether the specifed data flavor is supported.void
lostOwnership
(Clipboard clipboard, Transferable contents) Notification we have lost ownership of the clipboard because something else was put on the clipboard.toString()
Get the string representation for this transferable.
-
Field Details
-
localTreeNodeFlavor
A static instance of the local tree node flavor that is an ArrayList of DragDropNode objects.
-
-
Constructor Details
-
DragDropTreeTransferable
Constructs a new Transferable from the array of DragDropNodes- Parameters:
nodes
- the array of DragDropNodes being transfered.
-
-
Method Details
-
getTransferDataFlavors
Return all data flavors that this class supports.- Specified by:
getTransferDataFlavors
in interfaceTransferable
-
isDataFlavorSupported
Return whether the specifed data flavor is supported.- Specified by:
isDataFlavorSupported
in interfaceTransferable
- Parameters:
f
- the DataFlavor to check if supported.
-
getTransferData
Return the transfer data with the given data flavor.- Specified by:
getTransferData
in interfaceTransferable
- Parameters:
f
- the DataFlavor for which to get a Transferable.- Throws:
UnsupportedFlavorException
IOException
-
toString
Get the string representation for this transferable. -
lostOwnership
Notification we have lost ownership of the clipboard because something else was put on the clipboard.- Specified by:
lostOwnership
in interfaceClipboardOwner
- Parameters:
clipboard
- the system clipboard.contents
- the Transferable lost in the clipboard.
-