|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.tree.DefaultTreeModel edu.northwestern.at.utils.swing.SortedTreeModel
public class SortedTreeModel
Sorted tree model.
This class extends DefaultTreeModel to support sorted trees.
Field Summary |
---|
Fields inherited from class javax.swing.tree.DefaultTreeModel |
---|
asksAllowsChildren, listenerList, root |
Constructor Summary | |
---|---|
SortedTreeModel(SortedTreeNode root)
Creates a tree in which any node can have children. |
|
SortedTreeModel(SortedTreeNode root,
boolean asksAllowsChildren)
Creates a tree specifying whether any node can have children, or whether only certain nodes can have children. |
Method Summary | |
---|---|
int |
getNodeCount()
Gets the node count. |
void |
insertNodeInto(javax.swing.tree.MutableTreeNode newChild,
javax.swing.tree.MutableTreeNode parent,
int index)
Prohibits attempts to add children at specific locations. |
void |
insertNodeInto(SortedTreeNode newChild,
SortedTreeNode parent)
Adds a new child node, in the proper sorted position. |
void |
valueForPathChanged(javax.swing.tree.TreePath path,
java.lang.Object newValue)
Prohibits attempts to set a new node value. |
Methods inherited from class javax.swing.tree.DefaultTreeModel |
---|
addTreeModelListener, asksAllowsChildren, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, getChild, getChildCount, getIndexOfChild, getListeners, getPathToRoot, getPathToRoot, getRoot, getTreeModelListeners, isLeaf, nodeChanged, nodesChanged, nodeStructureChanged, nodesWereInserted, nodesWereRemoved, reload, reload, removeNodeFromParent, removeTreeModelListener, setAsksAllowsChildren, setRoot |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SortedTreeModel(SortedTreeNode root)
root
- The root of the tree. public SortedTreeModel(SortedTreeNode root, boolean asksAllowsChildren)
root
- The root of the tree.asksAllowsChildren
- See Sun's javadoc. Method Detail |
---|
public void insertNodeInto(SortedTreeNode newChild, SortedTreeNode parent)
newChild
- The new child node.parent
- The parent node. public int getNodeCount()
public void insertNodeInto(javax.swing.tree.MutableTreeNode newChild, javax.swing.tree.MutableTreeNode parent, int index)
insertNodeInto
in class javax.swing.tree.DefaultTreeModel
java.lang.UnsupportedOperationException
public void valueForPathChanged(javax.swing.tree.TreePath path, java.lang.Object newValue)
valueForPathChanged
in interface javax.swing.tree.TreeModel
valueForPathChanged
in class javax.swing.tree.DefaultTreeModel
java.lang.UnsupportedOperationException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |