|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.tree.DefaultMutableTreeNode edu.northwestern.at.wordhoard.swing.tcon.TreeNode
public class TreeNode
A table of contents tree node.
There are three types of nodes in table of contents trees:
Field Summary | |
---|---|
static int |
CATEGORY_NODE
A category node. |
static int |
PLACEHOLDER_NODE
A placeholder node. |
static int |
WORK_PART_NODE
A work part node. |
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode |
---|
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject |
Constructor Summary | |
---|---|
TreeNode(java.lang.String categoryTitle,
TableOfContentsPanel parentPanel)
Creates a new category node. |
|
TreeNode(TableOfContentsPanel parentPanel)
Creates a new placeholder node. |
|
TreeNode(WorkPart workPart,
TableOfContentsPanel parentPanel)
Creates a new unloaded work part node. |
Method Summary | |
---|---|
TreeNode |
addCategoryNode(java.lang.String categoryTitle)
Adds a new category node as a child of this node. |
void |
addUnloadedWorkPartNode(TreeNode node)
Adds an unloaded work part node as a child of this node. |
TreeNode |
addUnloadedWorkPartNode(WorkPart workPart)
Creates and adds a new unloaded work part node as a child of this node. |
int |
getNodeType()
Gets the node type. |
WorkPart |
getWorkPart()
Gets the work part. |
boolean |
isLoaded()
Returns true if the node is loaded. |
void |
setLoaded(boolean loaded)
Sets the node loaded attribute. |
java.lang.String |
toString()
Returns a string representation of the node. |
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode |
---|
add, 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, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int CATEGORY_NODE
public static final int WORK_PART_NODE
public static final int PLACEHOLDER_NODE
Constructor Detail |
---|
public TreeNode(java.lang.String categoryTitle, TableOfContentsPanel parentPanel)
categoryTitle
- Category title.parentPanel
- The parent table of contents panel. public TreeNode(WorkPart workPart, TableOfContentsPanel parentPanel)
workPart
- The work part.parentPanel
- The parent table of contents panel. public TreeNode(TableOfContentsPanel parentPanel)
parentPanel
- The parent table of contents panel. Method Detail |
---|
public int getNodeType()
public WorkPart getWorkPart()
public boolean isLoaded()
public void setLoaded(boolean loaded)
loaded
- True if the node is loaded. public TreeNode addCategoryNode(java.lang.String categoryTitle)
categoryTitle
- Category title.
public void addUnloadedWorkPartNode(TreeNode node)
node
- Work part node. public TreeNode addUnloadedWorkPartNode(WorkPart workPart)
workPart
- Work part.
public java.lang.String toString()
toString
in class javax.swing.tree.DefaultMutableTreeNode
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |