|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjavax.swing.tree.DefaultMutableTreeNode
com.tensegrity.gui.swing.control.attributetree.AttributeTreeNode
TreeNode implementation containing the data like AttributeTreeCategorys,
AttributeSets and Attributes. It also contains status
information like expanded/collapsed, visible and enabled which is used by the
AttributeTreeModel.
| Field Summary |
| Fields inherited from class javax.swing.tree.DefaultMutableTreeNode |
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject |
| Constructor Summary | |
AttributeTreeNode(Attribute attrib)
Constructor for an attribute node |
|
AttributeTreeNode(AttributeTreeCategory cat)
Constructor for a category node |
|
| Method Summary | |
void |
add(javax.swing.tree.MutableTreeNode newChild)
|
AttributeTreeNode |
findChild(java.lang.String name)
This method finds a child node identified by the parameter name. |
Attribute |
getAttribute()
Returns the attribute of this node A call should only be done, if isAttribute() returned true. |
AttributeSet |
getAttributePath()
Returns the full qualified path of this node |
AttributeTreeCategory |
getCategory()
Returns the category contained in this node. |
AttributeTreeNode |
getChildNode(int index)
Returns the child at the given index. |
int |
getLevel()
Returns the level this node is in |
java.lang.String |
getName()
Returns the name of this node, which will be either the name of the category or the name of the attribute |
AttributeTreeNode |
getParentNode()
Returns the parent node of this node |
java.lang.String |
getPathName()
Returns the full qualified path of this node |
protected java.lang.String |
getPathName(boolean includeSubSetPostFix)
Returns the full qualified path of this node |
int |
getRow()
Returns the row index of this node |
protected int |
getRowCount()
Returns the number of rows that lie in this subtree, depending on the expanded and enabled state of the child nodes. |
boolean |
hasVisibleChildren()
Returns true, if this node contains visible children |
boolean |
isAttribute()
Returns true, if this node is an attribute |
boolean |
isCategory()
Returns true, if this node is a category |
boolean |
isEnabled()
Returns true, if this node is enabled |
boolean |
isExpanded()
Returns true, if this node is currently expanded in the tree |
protected boolean |
isVisible()
Returns whether this node is visible or not |
void |
remove(javax.swing.tree.MutableTreeNode aChild)
|
void |
setEnabled(boolean enabled)
Sets the enabled state of this node |
void |
setExpanded(boolean expanded)
Sets the expanded state of this node in the tree |
void |
setParent(javax.swing.tree.MutableTreeNode newParent)
|
protected void |
setVisible(boolean visible)
Sets the node's visibility |
java.lang.String |
toString()
|
| Methods inherited from class javax.swing.tree.DefaultMutableTreeNode |
breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, 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, removeAllChildren, removeFromParent, setAllowsChildren, setUserObject |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public AttributeTreeNode(AttributeTreeCategory cat)
cat - The category, this node will representpublic AttributeTreeNode(Attribute attrib)
attrib - The attribute this node will represent| Method Detail |
public boolean isCategory()
public boolean isAttribute()
public AttributeTreeCategory getCategory()
public Attribute getAttribute()
public java.lang.String getName()
public java.lang.String toString()
public boolean isExpanded()
public void setExpanded(boolean expanded)
expanded - the new expanded state of this node in the treepublic void add(javax.swing.tree.MutableTreeNode newChild)
public void remove(javax.swing.tree.MutableTreeNode aChild)
public void setParent(javax.swing.tree.MutableTreeNode newParent)
public int getLevel()
public AttributeTreeNode findChild(java.lang.String name)
name - The name of the child node to look for.
AttributeTreeNode or
null if no such child is found.public AttributeTreeNode getChildNode(int index)
index - The index of the child to retrieve
public AttributeTreeNode getParentNode()
public AttributeSet getAttributePath()
public java.lang.String getPathName()
protected java.lang.String getPathName(boolean includeSubSetPostFix)
includeSubSetPostFix - If true, the subset prefixes are added to
complex attributes
protected boolean isVisible()
public boolean hasVisibleChildren()
protected void setVisible(boolean visible)
visible - The visibility to setpublic int getRow()
protected int getRowCount()
public boolean isEnabled()
public void setEnabled(boolean enabled)
enabled - The new state to set
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||