Package io.guise.framework.component
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 Summary
Constructors Constructor Description TreeNodeTransferable(TreeControl source, TreeNodeModel<V> treeNode)
Source and tree node constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> T
transfer(java.lang.Class<T> objectClass)
Transfers data of the given class.-
Methods inherited from class io.guise.framework.component.transfer.AbstractObjectTransferable
canTransfer, getClass, getContentTypes, getSource, transfer
-
-
-
-
Constructor Detail
-
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:
java.lang.NullPointerException
- if the provided source and/or tree node isnull
.
-
-
Method Detail
-
transfer
public <T> T transfer(java.lang.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
.
-
-