|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.swing.tree.DefaultMutableTreeNode
edu.northwestern.at.utils.swing.SortedTreeNode
public abstract class SortedTreeNode
Sorted tree node.
This class extends DefaultMutableTreeNode to support sorted tree nodes.
The class is abstract. You must subclass it and implement the compareTo method to compare nodes for sorting.
| Field Summary |
|---|
| Fields inherited from class javax.swing.tree.DefaultMutableTreeNode |
|---|
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject |
| Constructor Summary | |
|---|---|
SortedTreeNode()
|
|
| Method Summary | |
|---|---|
void |
add(javax.swing.tree.MutableTreeNode newChild)
Prohibits attempts to add nodes that aren't sortable. |
int |
add(SortedTreeNode newChild)
Adds a new child node, in the proper sorted position. |
abstract int |
compareTo(SortedTreeNode otherNode)
Compares this node to some other node. |
int |
getNodeCount()
Gets the node count. |
void |
insert(javax.swing.tree.MutableTreeNode newChild,
int childIndex)
Prohibits attempts to add children at specific locations. |
void |
remove(javax.swing.tree.MutableTreeNode aChild)
Prohibits attempts to remove nodes that aren't sortable. |
void |
remove(SortedTreeNode aChild)
Removes a child node. |
void |
setUserObject(java.lang.Object userObject)
Prohibits attempts to set a new user object. |
| Methods inherited from class javax.swing.tree.DefaultMutableTreeNode |
|---|
breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SortedTreeNode()
| Method Detail |
|---|
public abstract int compareTo(SortedTreeNode otherNode)
otherNode - The other node.
public int add(SortedTreeNode newChild)
newChild - The new child node.
public void remove(SortedTreeNode aChild)
aChild - The child node. public int getNodeCount()
public void add(javax.swing.tree.MutableTreeNode newChild)
add in class javax.swing.tree.DefaultMutableTreeNodeUnsupportedOperationException. public void remove(javax.swing.tree.MutableTreeNode aChild)
remove in interface javax.swing.tree.MutableTreeNoderemove in class javax.swing.tree.DefaultMutableTreeNodeUnsupportedOperationException.
public void insert(javax.swing.tree.MutableTreeNode newChild,
int childIndex)
insert in interface javax.swing.tree.MutableTreeNodeinsert in class javax.swing.tree.DefaultMutableTreeNodejava.lang.UnsupportedOperationException public void setUserObject(java.lang.Object userObject)
setUserObject in interface javax.swing.tree.MutableTreeNodesetUserObject in class javax.swing.tree.DefaultMutableTreeNodejava.lang.UnsupportedOperationException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||