| 限定符和类型 | 字段和说明 |
|---|---|
static Enumeration |
EMPTY_ENUMERATION |
| 构造器和说明 |
|---|
ComponentTreeNode() |
ComponentTreeNode(T userObject) |
| 限定符和类型 | 方法和说明 |
|---|---|
Enumeration |
children() |
boolean |
equals(Object o) |
boolean |
getAllowsChildren() |
TreeNode |
getChildAt(int index) |
int |
getChildCount()
Returns the number of children of this node.
|
TreeNode[] |
getChildren() |
int |
getIndex(TreeNode aChild) |
int |
getLevel() |
TreeNode |
getParent() |
Object |
getUserObject() |
void |
insert(TreeNode newChild) |
void |
insert(TreeNode newChild,
int index) |
boolean |
isLeaf() |
boolean |
isNodeChild(TreeNode aNode)
Returns true if
aNode is a child of this node. |
boolean |
isRoot() |
void |
remove(int index) |
void |
remove(TreeNode aChild) |
void |
removeAllChildren() |
void |
removeFromParent() |
void |
setLeaf(boolean leaf) |
void |
setParent(TreeNode parent) |
void |
setUserObject(T userObject) |
String |
toString() |
public static final Enumeration EMPTY_ENUMERATION
public ComponentTreeNode(T userObject)
public ComponentTreeNode()
public TreeNode[] getChildren()
public void setParent(TreeNode parent)
parent - The parent to set.public void setLeaf(boolean leaf)
leaf - The leaf to set.public void insert(TreeNode newChild, int index)
public void insert(TreeNode newChild)
public void remove(TreeNode aChild)
public void remove(int index)
public void removeAllChildren()
public Object getUserObject()
public void setUserObject(T userObject)
userObject - The userObject to set.public TreeNode getChildAt(int index)
getChildAt 在接口中 TreeNodepublic void removeFromParent()
public boolean isNodeChild(TreeNode aNode)
aNode is a child of this node. If aNode is null, this method returns
false.aNode is a child of this node; false if aNode is nullpublic int getChildCount()
getChildCount 在接口中 TreeNodepublic int getLevel()
public boolean isRoot()
public Enumeration children()
public boolean getAllowsChildren()
getAllowsChildren 在接口中 TreeNodeCopyright © 2023 onecode. All rights reserved.