com.guiseframework.component
Class TreeControl.TreeNodeTransferable<V>

java.lang.Object
  extended by com.guiseframework.component.transfer.AbstractObjectTransferable<Component>
      extended by com.guiseframework.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
TreeControl.TreeNodeTransferable(TreeControl source, TreeNodeModel<V> treeNode)
          Source and tree node constructor.
 
Method Summary
<T> T
transfer(java.lang.Class<T> objectClass)
          Transfers data of the given class.
 
Methods inherited from class com.guiseframework.component.transfer.AbstractObjectTransferable
canTransfer, getClass, getContentTypes, getSource, transfer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeControl.TreeNodeTransferable

public TreeControl.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 is null.
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.
Throws:
java.lang.IllegalArgumentException - if the given class is not supported.


Copyright © 2005-2010 GlobalMentor, Inc. All Rights Reserved.