org.embl.ebi.escience.baclava.factory
Class DataThingTreeNode

java.lang.Object
  extended by javax.swing.tree.DefaultMutableTreeNode
      extended by org.embl.ebi.escience.baclava.factory.DataThingTreeNode
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, javax.swing.tree.MutableTreeNode, javax.swing.tree.TreeNode

public class DataThingTreeNode
extends javax.swing.tree.DefaultMutableTreeNode

A subclass of the DefaultMutableTreeNode with a reference back to the DataThing that the node was created from. This allows lookup of, for example, the appropriate icons for the various MIME types.

The DataThing that is displayed in the tree can be retrieved using getDataThing(). The DataThing that is represented by this node can be retrieved using getNodeThing() and the object this node represents can be got by getUserObject().

Author:
Tom Oinn
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
EMPTY_ENUMERATION
 
Constructor Summary
DataThingTreeNode(DataThing dataThing)
           
DataThingTreeNode(DataThing dataThing, DataThing nodeThing)
           
 
Method Summary
 DataThing getDataThing()
           
 DataThing getNodeThing()
           
 java.lang.String toString()
           
 
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DataThingTreeNode

public DataThingTreeNode(DataThing dataThing)

DataThingTreeNode

public DataThingTreeNode(DataThing dataThing,
                         DataThing nodeThing)
Method Detail

getDataThing

public DataThing getDataThing()

getNodeThing

public DataThing getNodeThing()

toString

public java.lang.String toString()
Overrides:
toString in class javax.swing.tree.DefaultMutableTreeNode