Class ReadOnlyTreeModel

java.lang.Object
io.github.jmcleodfoss.pst.ReadOnlyTreeModel
All Implemented Interfaces:
TreeModel
Direct Known Subclasses:
BTreeOnHeap, Folder, PagedBTree, SubnodeBTree

public abstract class ReadOnlyTreeModel
extends Object
implements TreeModel
The ReadOnlyTreeModel abstract class implements trivial versions of functions irrelevant for read-only trees.
  • Constructor Details

  • Method Details

    • addTreeModelListener

      public void addTreeModelListener​(TreeModelListener listener)
      Add a TreeModelListener to a read-only tree. Note that there is no book-keeping required for adding a TreeModelListener, as a read-only tree cannot change.
      Specified by:
      addTreeModelListener in interface TreeModel
      Parameters:
      listener - The listener to "add".
    • removeTreeModelListener

      public void removeTreeModelListener​(TreeModelListener listener)
      Remove a TreeModelListener from a read-only tree. Note that there is no book-keeping required for adding a TreeModelListener, as a read-only tree cannot change.
      Specified by:
      removeTreeModelListener in interface TreeModel
      Parameters:
      listener - The listener to "remove".
    • valueForPathChanged

      public void valueForPathChanged​(TreePath path, Object newValue)
      Indicate that the given path in the tree has changed. Note that since a read-only is immutable, this does nothing
      Specified by:
      valueForPathChanged in interface TreeModel
      Parameters:
      path - The path which changed.
      newValue - The value of the new path.