Class CatalogTreeModel

java.lang.Object
javax.swing.tree.DefaultTreeModel
jmri.jmrit.catalog.CatalogTreeModel
All Implemented Interfaces:
Serializable, TreeModel, InstanceManagerAutoDefault

TreeModel used by CatalogPane to create a tree of resources.

Accessed via the instance() member, as we expect to have only one of these models.

The tree has two top-level visible nodes. One, "icons", represents the contents of the icons directory in the resources tree in the .jar file. The other, "files", is all files found in the "resources" filetree in the preferences directory. Note that this means that files in the distribution directory are _not_ included.

As a special case "simplification", the catalog tree will not contain CVS directories, or files whose name starts with a "."

See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • insertResourceNodes

      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 tree
      pPath - Path to this resource, including the pName part
      pParent - Node for the parent of the resource to be scanned, e.g. where in the tree to insert it.
    • insertFileNodes

      Recursively add a representation of the files below a particular file
      Parameters:
      name - Name of the file to be scanned
      path - the path to the file
      parent - Node for the parent of the file to be scanned