Interface CatalogTree
- All Superinterfaces:
Comparable<NamedBean>,NamedBean,PropertyChangeProvider,TreeModel
- All Known Implementing Classes:
AbstractCatalogTree,CatalogTreeFS,CatalogTreeIndex
Specific implementations are in the jmri.jmrit.catalog package.
The states and names are Java Bean parameters, so that listeners can be registered to be notified of any changes.
Each CatalogTree object has a two names. The "user" name is entirely free
form, and can be used for any purpose. The "system" name is provided by the
purpose-specific implementations.
This file is part of JMRI.
JMRI is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. See the "COPYING" file for a copy of this license.
JMRI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-
Nested Class Summary
Nested classes/interfaces inherited from interface jmri.NamedBean
NamedBean.BadNameException, NamedBean.BadSystemNameException, NamedBean.BadUserNameException, NamedBean.DisplayOptions, NamedBean.DuplicateSystemNameException -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final charstatic final charstatic final charstatic final charstatic final charstatic final charFields inherited from interface jmri.NamedBean
DISPLAY_NAME_FORMAT, INCONSISTENT, PROPERTY_COMMENT, PROPERTY_ENABLED, PROPERTY_KNOWN_STATE, PROPERTY_STATE, PROPERTY_USERNAME, QUOTED_NAME_FORMAT, UNKNOWN -
Method Summary
Modifier and TypeMethodDescriptiongetRoot()Get the root element of the tree as a jmri.CatalogTreeNode object.voidinsertNodes(String pathToRoot) Starting point to recursively add nodes to the tree by scanning a file directoryvoidinsertNodes(String pName, String pPath, CatalogTreeNode pParent) Recursively add a representation of the resources below a particular resourceMethods inherited from interface jmri.NamedBean
addPropertyChangeListener, addPropertyChangeListener, compareSystemNameSuffix, compareTo, describeState, dispose, getBeanType, getComment, getDisplayName, getDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListenersByReference, getPropertyKeys, getRecommendedToolTip, getState, getSystemName, getUsageReport, getUserName, removeProperty, setComment, setProperty, setState, setUserName, toString, updateListenerRef, vetoableChangeMethods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListenerMethods inherited from interface javax.swing.tree.TreeModel
addTreeModelListener, getChild, getChildCount, getIndexOfChild, isLeaf, removeTreeModelListener, valueForPathChanged
-
Field Details
-
IMAGE
- See Also:
-
SOUND
- See Also:
-
SCRIPT
- See Also:
-
NOFILTER
- See Also:
-
FILESYS
- See Also:
-
XML
- See Also:
-
-
Method Details
-
insertNodes
Recursively add a representation of the resources below a particular resource- Parameters:
pName- Name of the resource to be scanned; this is only used for the human-readable treepPath- Path to this resource, including the pName partpParent- Node for the parent of the resource to be scanned, e.g. where in the tree to insert it.
-
insertNodes
Starting point to recursively add nodes to the tree by scanning a file directory- Parameters:
pathToRoot- Path to Directory to be scanned
-
getRoot
Get the root element of the tree as a jmri.CatalogTreeNode object. (Instead of Object, as parent swing.TreeModel provides)
-