hep.io.root.util
Class RootDirectoryTreeModel
java.lang.Object
hep.io.root.util.RootDirectoryTreeModel
- All Implemented Interfaces:
- TreeModel
public class RootDirectoryTreeModel
- extends Object
- implements TreeModel
An adaptor that converts a root TDirectory into
a TreeModel, allowing any directory structure to
be dislayed by a Swing JTree.
This model will also drill down into TTree's, showing the branch and
leaf structure inside.
- Version:
- $Id: RootDirectoryTreeModel.java 13617 2009-04-09 22:48:46Z tonyj $
- Author:
- Tony Johnson (tonyj@slac.stanford.edu)
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RootDirectoryTreeModel
public RootDirectoryTreeModel(TDirectory topDir)
- Create the tree model
- Parameters:
topDir - The TDirectory that is to appear as the "root" of the tree
getChild
public Object getChild(Object parent,
int index)
- Specified by:
getChild in interface TreeModel
getChildCount
public int getChildCount(Object parent)
- Specified by:
getChildCount in interface TreeModel
getIndexOfChild
public int getIndexOfChild(Object parent,
Object child)
- Specified by:
getIndexOfChild in interface TreeModel
isLeaf
public boolean isLeaf(Object parent)
- Specified by:
isLeaf in interface TreeModel
getRoot
public Object getRoot()
- Specified by:
getRoot in interface TreeModel
addTreeModelListener
public void addTreeModelListener(TreeModelListener p1)
- Specified by:
addTreeModelListener in interface TreeModel
removeTreeModelListener
public void removeTreeModelListener(TreeModelListener p1)
- Specified by:
removeTreeModelListener in interface TreeModel
valueForPathChanged
public void valueForPathChanged(TreePath p1,
Object p2)
- Specified by:
valueForPathChanged in interface TreeModel
handleException
protected void handleException(IOException x)
- Handle IOExceptions when reading the root file.
Can be overriden in order to handle IOExceptions
encountered when reading objects from the root file.
The default implementation throws a RuntimeException
handleException
protected void handleException(RootClassNotFound x)
Copyright © 2000-2013 FreeHEP. All Rights Reserved.