FreeHEP API
Version v1.2.2

hep.io.root.util
Class RootObjectTreeModel

java.lang.Object
  |
  +--javax.swing.tree.DefaultTreeModel
        |
        +--hep.io.root.util.RootObjectTreeModel
All Implemented Interfaces:
Serializable, TreeModel

public class RootObjectTreeModel
extends DefaultTreeModel

An adaptor which converts a RootObject to a TreeModel. This allows the super classes and member variables of the RootObject to be viewed in a JTree. If member variables are themselves RootObjects, or arrays, they can be browsed in turn by "drilling down" in the tree.

Version:
$Id: RootObjectTreeModel.java,v 1.8 2003/05/23 20:59:15 duns Exp $
Author:
Tony Johnson (tonyj@slac.stanford.edu)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.tree.DefaultTreeModel
asksAllowsChildren, listenerList, root
 
Constructor Summary
  RootObjectTreeModel(Object top, String name)
          Create the RootObjectTreeModel
protected RootObjectTreeModel(TreeNode node)
           
 
Method Summary
protected static int getIndex(TreeNode child)
           
protected static TreeNode getNodeForChild(TreeNode parent, Object child, String name, int index)
           
 
Methods inherited from class javax.swing.tree.DefaultTreeModel
addTreeModelListener, asksAllowsChildren, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, getChild, getChildCount, getIndexOfChild, getListeners, getPathToRoot, getPathToRoot, getRoot, getTreeModelListeners, insertNodeInto, isLeaf, nodeChanged, nodesChanged, nodeStructureChanged, nodesWereInserted, nodesWereRemoved, reload, reload, removeNodeFromParent, removeTreeModelListener, setAsksAllowsChildren, setRoot, valueForPathChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RootObjectTreeModel

public RootObjectTreeModel(Object top,
                           String name)
Create the RootObjectTreeModel

Parameters:
top - The RootObject to appear at the "root" of the tree

RootObjectTreeModel

protected RootObjectTreeModel(TreeNode node)
Method Detail

getIndex

protected static int getIndex(TreeNode child)

getNodeForChild

protected static TreeNode getNodeForChild(TreeNode parent,
                                          Object child,
                                          String name,
                                          int index)

FreeHEP API
Version v1.2.2

Copyright © 2000-2003 FreeHEP, All Rights Reserved.