Class CatalogTreeIndex

All Implemented Interfaces:
Serializable, Comparable<NamedBean>, TreeModel, PropertyChangeProvider, CatalogTree, NamedBean

TreeModel used by CatalogPanel to create a tree of resources. This model is for trees that can be permanently stored to and reloaded from an XML file.

Source of the tree content is an XML file.

See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • insertNodes

      public void insertNodes(String pName, String pPath, CatalogTreeNode pParent)
      Recursively add nodes to the tree
      Specified by:
      insertNodes in interface CatalogTree
      Specified by:
      insertNodes in class AbstractCatalogTree
      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.
    • setProperty

      public void setProperty(String key, Object value)
      Description copied from interface: NamedBean
      Attach a key/value pair to the NamedBean, which can be retrieved later. These are not bound properties as yet, and don't throw events on modification. Key must not be null.

      The key is constrained to String to make these behave like normal Java Beans.

      Parameters:
      key - the property to set
      value - the value of the property
    • getProperty

      public Object getProperty(String key)
      Description copied from interface: NamedBean
      Retrieve the value associated with a key. If no value has been set for that key, returns null.
      Parameters:
      key - the property to get
      Returns:
      The value of the property or null.
    • getPropertyKeys

      Description copied from interface: NamedBean
      Retrieve the complete current set of keys.
      Returns:
      empty set if none
    • removeProperty

      public void removeProperty(String key)
      Description copied from interface: NamedBean
      Remove the key/value pair against the NamedBean.
      Parameters:
      key - the property to remove