FreeHEP API
Version current

hep.io.root.util
Class RootObjectTreeModel

java.lang.Object
  extended byjavax.swing.tree.DefaultTreeModel
      extended byhep.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.10 2005/08/10 00:56:35 tonyj Exp $
Author:
Tony Johnson (tonyj@slac.stanford.edu)
See Also:
Serialized Form
Source Code:
RootObjectTreeModel.java

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 current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.