All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class vnr.util.SortedTreeModel

java.lang.Object
   |
   +----com.sun.java.swing.tree.DefaultTreeModel
           |
           +----vnr.util.SortedTreeModel

public class SortedTreeModel
extends DefaultTreeModel
A SortedTreeModel is one that when told to insert a node into a parent it's inserted in sorted order, doing a toString on the userObject to work out which object should go first

This model also has the ability to map userObjects to nodes


Constructor Index

 o SortedTreeModel(TreeNode)
mirror of super class constructor - create model from a node
 o SortedTreeModel(TreeNode, boolean)
mirror of superclass constructor - create model from a node and boolean

Method Index

 o getNodeForUserObject(Object)
 o insertNodeInto(MutableTreeNode, MutableTreeNode)
insert a node into its parent - in sorted order

Constructors

 o SortedTreeModel
 public SortedTreeModel(TreeNode tNode)
mirror of super class constructor - create model from a node

 o SortedTreeModel
 public SortedTreeModel(TreeNode tNode,
                        boolean b)
mirror of superclass constructor - create model from a node and boolean

Methods

 o insertNodeInto
 public void insertNodeInto(MutableTreeNode newNode,
                            MutableTreeNode parentNode)
insert a node into its parent - in sorted order

 o getNodeForUserObject
 public DefaultMutableTreeNode getNodeForUserObject(Object o)
Returns:
The first TreeNode that cantains the specified object as its userObject

All Packages  Class Hierarchy  This Package  Previous  Next  Index