|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.myfaces.custom.tree.DefaultMutableTreeNode
public class DefaultMutableTreeNode
Default implementation of MutableTreeNode
.
Constructor Summary | |
---|---|
DefaultMutableTreeNode(List children,
boolean allowsChildren)
|
|
DefaultMutableTreeNode(Object userObject)
|
|
DefaultMutableTreeNode(Object userObject,
MutableTreeNode parent,
boolean allowsChildren)
|
Method Summary | |
---|---|
Iterator |
children()
Answer the children of the receiver. |
boolean |
getAllowsChildren()
Answer true if this node allows children. |
TreeNode |
getChildAt(int index)
Answer the child at the given index. |
int |
getChildCount()
Answer the number of children this node contains. |
int |
getIndex(TreeNode node)
Answer the index of the given node in this node's children. |
TreeNode |
getParent()
Answer the parent of this node. |
Object |
getUserObject()
|
void |
insert(MutableTreeNode child)
Add the given child to the children of this node. |
void |
insert(MutableTreeNode child,
int index)
Add the given child to the children of this node at index. |
boolean |
isLeaf()
Answer true if this is a leaf node. |
void |
remove(int index)
Remove the child at the given index. |
void |
remove(MutableTreeNode node)
Remove the given node. |
void |
removeFromParent()
Remove this node from its parent. |
void |
setParent(MutableTreeNode parent)
Set the parent node. |
void |
setUserObject(Object object)
Sets the user object of this node. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DefaultMutableTreeNode(Object userObject)
userObject
- The userObject.public DefaultMutableTreeNode(List children, boolean allowsChildren)
children
- The children.allowsChildren
- The allowsChildren.public DefaultMutableTreeNode(Object userObject, MutableTreeNode parent, boolean allowsChildren)
userObject
- The userobject.parent
- The parent.allowsChildren
- The allowsChildren.Method Detail |
---|
public void insert(MutableTreeNode child)
MutableTreeNode
insert
in interface MutableTreeNode
MutableTreeNode.insert(org.apache.myfaces.custom.tree.MutableTreeNode)
public void insert(MutableTreeNode child, int index)
MutableTreeNode
insert
in interface MutableTreeNode
MutableTreeNode.insert(org.apache.myfaces.custom.tree.MutableTreeNode, int)
public void remove(int index)
MutableTreeNode
remove
in interface MutableTreeNode
MutableTreeNode.remove(int)
public void remove(MutableTreeNode node)
MutableTreeNode
remove
in interface MutableTreeNode
MutableTreeNode.remove(org.apache.myfaces.custom.tree.MutableTreeNode)
public void setUserObject(Object object)
MutableTreeNode
setUserObject
in interface MutableTreeNode
MutableTreeNode.setUserObject(java.lang.Object)
public Object getUserObject()
getUserObject
in interface TreeNode
TreeNode.getUserObject()
public void removeFromParent()
MutableTreeNode
removeFromParent
in interface MutableTreeNode
MutableTreeNode.removeFromParent()
public void setParent(MutableTreeNode parent)
MutableTreeNode
setParent
in interface MutableTreeNode
MutableTreeNode.setParent(org.apache.myfaces.custom.tree.MutableTreeNode)
public TreeNode getChildAt(int index)
TreeNode
getChildAt
in interface TreeNode
TreeNode.getChildAt(int)
public int getChildCount()
TreeNode
getChildCount
in interface TreeNode
TreeNode.getChildCount()
public TreeNode getParent()
TreeNode
getParent
in interface TreeNode
TreeNode.getParent()
public int getIndex(TreeNode node)
TreeNode
getIndex
in interface TreeNode
TreeNode.getIndex(org.apache.myfaces.custom.tree.TreeNode)
public boolean getAllowsChildren()
TreeNode
getAllowsChildren
in interface TreeNode
TreeNode.getAllowsChildren()
public boolean isLeaf()
TreeNode
isLeaf
in interface TreeNode
TreeNode.isLeaf()
public Iterator children()
TreeNode
children
in interface TreeNode
TreeNode.children()
public String toString()
toString
in class Object
Object.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |