Package io.github.jmcleodfoss.pst
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 Summary
Constructors Constructor Description ReadOnlyTreeModel()
-
Method Summary
Modifier and Type Method Description void
addTreeModelListener(TreeModelListener listener)
Add a TreeModelListener to a read-only tree.void
removeTreeModelListener(TreeModelListener listener)
Remove a TreeModelListener from a read-only tree.void
valueForPathChanged(TreePath path, Object newValue)
Indicate that the given path in the tree has changed.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface javax.swing.tree.TreeModel
getChild, getChildCount, getIndexOfChild, getRoot, isLeaf
-
Constructor Details
-
ReadOnlyTreeModel
public ReadOnlyTreeModel()
-
-
Method Details
-
addTreeModelListener
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 interfaceTreeModel
- Parameters:
listener
- The listener to "add".
-
removeTreeModelListener
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 interfaceTreeModel
- Parameters:
listener
- The listener to "remove".
-
valueForPathChanged
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 interfaceTreeModel
- Parameters:
path
- The path which changed.newValue
- The value of the new path.
-