Class TreeControl.TreeNodeTransferable<V>

java.lang.Object
io.guise.framework.component.transfer.AbstractObjectTransferable<Component>
io.guise.framework.component.TreeControl.TreeNodeTransferable<V>
Type Parameters:
V - The type of value contained in the tree node.
All Implemented Interfaces:
Transferable<Component>
Enclosing class:
TreeControl

protected static class TreeControl.TreeNodeTransferable<V> extends AbstractObjectTransferable<Component>
The transferable object for a tree node. This transferable is able to transfer either the tree node itself or the object stored in the tree node.
Author:
Garret Wilson
  • Constructor Details

    • TreeNodeTransferable

      public TreeNodeTransferable(TreeControl source, TreeNodeModel<V> treeNode)
      Source and tree node constructor.
      Parameters:
      source - The source of the transferable data.
      treeNode - The tree node representing the transferred data.
      Throws:
      NullPointerException - if the provided source and/or tree node is null.
  • Method Details

    • transfer

      public <T> T transfer(Class<T> objectClass)
      Transfers data of the given class.

      This implementation returns subclasses.

      Type Parameters:
      T - The type of object to be transferred.
      Parameters:
      objectClass - The class of object to return.
      Returns:
      The transferred data object, which may be null.