|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.swing.tree.DefaultTreeModel
com.fullspan.pwkeep.model.PwkTreeModel
public class PwkTreeModel
The tree model that holds the hierarchy of PWKeep categories and items.
| Field Summary |
|---|
| Fields inherited from class javax.swing.tree.DefaultTreeModel |
|---|
asksAllowsChildren, listenerList, root |
| Constructor Summary | |
|---|---|
PwkTreeModel(javax.swing.tree.TreeNode root)
|
|
| Method Summary | |
|---|---|
PwkTreeNode |
getRootNode()
|
boolean |
isCategoryNameUnique(PwkTreeNode currentNode,
java.lang.String categoryName)
Checks if the category name is unique. |
boolean |
isItemNameUnique(PwkTreeNode catNode,
PwkTreeNode itemNode,
java.lang.String itemName)
Checks if the item name is unique within its category. |
static boolean |
isNameUnique(java.util.Enumeration nodes,
PwkTreeNode currentNode,
java.lang.String name)
Check a node for uniqueness of its name. |
void |
sort()
Sorts the tree by sorting the children of each node recursively. |
| 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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PwkTreeModel(javax.swing.tree.TreeNode root)
| Method Detail |
|---|
public static boolean isNameUnique(java.util.Enumeration nodes,
PwkTreeNode currentNode,
java.lang.String name)
nodes - an enumeration of nodes to compare against for uniquenesscurrentNode - the current node - this is needed because a node
having the same name as itself is considered uniquename - the name to check for uniqueness
name is unique within nodes
(with the exception of currentNode), false if notpublic PwkTreeNode getRootNode()
public boolean isCategoryNameUnique(PwkTreeNode currentNode,
java.lang.String categoryName)
currentNode - the category nodecategoryName - the category name
public boolean isItemNameUnique(PwkTreeNode catNode,
PwkTreeNode itemNode,
java.lang.String itemName)
catNode - the category nodeitemNode - the item nodeitemName - the item name
catNode,
false if notpublic void sort()
PwkTreeNode.sortChildren(boolean)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||