Class GTreeNodeTransferable

java.lang.Object
docking.widgets.tree.support.GTreeNodeTransferable
All Implemented Interfaces:
Transferable

public class GTreeNodeTransferable extends Object implements Transferable
A transferable for sharing data via drag/drop and clipboard operations for GTrees
  • Constructor Details

    • GTreeNodeTransferable

      public GTreeNodeTransferable(GTreeTransferHandler handler, List<GTreeNode> selectedData)
      Creates this transferable based upon the selected data and uses the given transfer handler to perform Transferable operations
      Parameters:
      handler - the handler used to perform transfer operations
      selectedData - The selected tree nodes
  • Method Details

    • getAllData

      public 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 Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException
      Gets the transfer data from the selection based upon the given flavor
      Specified by:
      getTransferData in interface 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:
      UnsupportedFlavorException - if the given flavor is not one of the supported flavors returned by getTransferDataFlavors()
      IOException
    • getTransferDataFlavors

      public DataFlavor[] getTransferDataFlavors()
      Returns the DataFlavors for the types of data that this transferable supports, based upon the given selection
      Specified by:
      getTransferDataFlavors in interface Transferable
      Returns:
      the DataFlavors for the types of data that this transferable supports, based upon the given selection
    • isDataFlavorSupported

      public boolean isDataFlavorSupported(DataFlavor flavor)
      A convenience method to determine if this transferable supports the given flavor
      Specified by:
      isDataFlavorSupported in interface Transferable
      Returns:
      true if this transferable supports the given flavor