jmri.jmrit.catalog
Class CatalogTreeNode

java.lang.Object
  extended by javax.swing.tree.DefaultMutableTreeNode
      extended by jmri.jmrit.catalog.CatalogTreeNode
All Implemented Interfaces:
Serializable, Cloneable, MutableTreeNode, TreeNode

public class CatalogTreeNode
extends DefaultMutableTreeNode

Node of a CatalogTree.

Name for the node Path is info needed for leaves.

Author:
Pete Cressman Copyright 2009
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
CatalogTreeNode(String name)
           
 
Method Summary
 void addLeaf(CatalogTreeLeaf leaf)
          Append leaf to the end of the leaves list
 void addLeaf(String name, String path)
          Insert leaf according to height.
 void deleteLeaf(String name, String path)
           
 CatalogTreeLeaf getLeaf(String name, String path)
           
 ArrayList<CatalogTreeLeaf> getLeaves()
           
 int getNumLeaves()
           
 void setLeaves(ArrayList<CatalogTreeLeaf> leaves)
           
 
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, getPathToRoot, 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, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CatalogTreeNode

public CatalogTreeNode(String name)
Method Detail

addLeaf

public void addLeaf(CatalogTreeLeaf leaf)
Append leaf to the end of the leaves list


addLeaf

public void addLeaf(String name,
                    String path)
Insert leaf according to height.


deleteLeaf

public void deleteLeaf(String name,
                       String path)

getLeaf

public CatalogTreeLeaf getLeaf(String name,
                               String path)

getLeaves

public ArrayList<CatalogTreeLeaf> getLeaves()

getNumLeaves

public int getNumLeaves()

setLeaves

public void setLeaves(ArrayList<CatalogTreeLeaf> leaves)


Copyright © 1997 - 2011 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.

Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads