Package docking.widgets.tree.support
Class GTreeNodeTransferable
- java.lang.Object
-
- docking.widgets.tree.support.GTreeNodeTransferable
-
- All Implemented Interfaces:
java.awt.datatransfer.Transferable
public class GTreeNodeTransferable extends java.lang.Object implements java.awt.datatransfer.Transferable
A transferable for sharing data via drag/drop and clipboard operations for GTrees
-
-
Constructor Summary
Constructors Constructor Description GTreeNodeTransferable(GTreeTransferHandler handler, java.util.List<GTreeNode> selectedData)
Creates this transferable based upon the selected data and uses the given transfer handler to performTransferable
operations
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<GTreeNode>
getAllData()
Returns all of the original selected data contained by this transferable.java.lang.Object
getTransferData(java.awt.datatransfer.DataFlavor flavor)
Gets the transfer data from the selection based upon the given flavorjava.awt.datatransfer.DataFlavor[]
getTransferDataFlavors()
Returns the DataFlavors for the types of data that this transferable supports, based upon the given selectionboolean
isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavor)
A convenience method to determine if this transferable supports the given flavor
-
-
-
Constructor Detail
-
GTreeNodeTransferable
public GTreeNodeTransferable(GTreeTransferHandler handler, java.util.List<GTreeNode> selectedData)
Creates this transferable based upon the selected data and uses the given transfer handler to performTransferable
operations- Parameters:
handler
- the handler used to perform transfer operationsselectedData
- The selected tree nodes
-
-
Method Detail
-
getAllData
public java.util.List<GTreeNode> getAllData()
Returns all of the original selected data contained by this transferable.- Returns:
- all of the original selected data contained by this transferable
-
getTransferData
public java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor flavor) throws java.awt.datatransfer.UnsupportedFlavorException, java.io.IOException
Gets the transfer data from the selection based upon the given flavor- Specified by:
getTransferData
in interfacejava.awt.datatransfer.Transferable
- Parameters:
flavor
- The flavor of data to retrieve from the given selection.- Returns:
- the transfer data from the selection based upon the given flavor.
- Throws:
java.awt.datatransfer.UnsupportedFlavorException
- if the given flavor is not one of the supported flavors returned bygetTransferDataFlavors()
java.io.IOException
-
getTransferDataFlavors
public java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
Returns the DataFlavors for the types of data that this transferable supports, based upon the given selection- Specified by:
getTransferDataFlavors
in interfacejava.awt.datatransfer.Transferable
- Returns:
- the DataFlavors for the types of data that this transferable supports, based upon the given selection
-
isDataFlavorSupported
public boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavor)
A convenience method to determine if this transferable supports the given flavor- Specified by:
isDataFlavorSupported
in interfacejava.awt.datatransfer.Transferable
- Returns:
- true if this transferable supports the given flavor
-
-