Package adams.gui.flow.tree
Class TreeModel
- java.lang.Object
-
- javax.swing.tree.DefaultTreeModel
-
- adams.gui.flow.tree.TreeModel
-
- All Implemented Interfaces:
Destroyable
,Serializable
,TreeModel
public class TreeModel extends DefaultTreeModel implements Destroyable
Specialized tree model for the flow editor.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class javax.swing.tree.DefaultTreeModel
asksAllowsChildren, listenerList, root
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
Frees up memory in a "destructive" non-reversible way.protected void
destroy(Node parent)
Recursively destroys all nodes (starting at the leaves).-
Methods inherited from class javax.swing.tree.DefaultTreeModel
addTreeModelListener, asksAllowsChildren, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, getChild, getChildCount, getIndexOfChild, getListeners, getPathToRoot, getPathToRoot, getRoot, getTreeModelListeners, insertNodeInto, isLeaf, nodeChanged, nodesChanged, nodeStructureChanged, nodesWereInserted, nodesWereRemoved, reload, reload, removeNodeFromParent, removeTreeModelListener, setAsksAllowsChildren, setRoot, valueForPathChanged
-
-
-
-
Constructor Detail
-
TreeModel
public TreeModel()
Initializes the model with no nodes.
-
TreeModel
public TreeModel(Node root)
Initializes the tree with the specified root node.- Parameters:
root
- the root node, can be null
-
-
Method Detail
-
destroy
protected void destroy(Node parent)
Recursively destroys all nodes (starting at the leaves).- Parameters:
parent
- the parent to go down from in the hierarchy
-
destroy
public void destroy()
Frees up memory in a "destructive" non-reversible way.- Specified by:
destroy
in interfaceDestroyable
-
-