public interface TreeNode
的实现TreeNode重写equals通常需要重写hashCode为好。 请参阅TreeModel以获取更多信息。 有关使用树节点的更多信息和示例,请参阅Java教程中的 How to Use Tree Nodes 。
| Modifier and Type | Method and Description |
|---|---|
Enumeration |
children()
作为
Enumeration返回接收者的
Enumeration 。
|
boolean |
getAllowsChildren()
如果接收器允许孩子,则返回true。
|
TreeNode |
getChildAt(int childIndex)
返回子
TreeNode索引
childIndex 。
|
int |
getChildCount()
返回接收者包含的孩子数
TreeNode 。
|
int |
getIndex(TreeNode node)
返回的索引
node接收机中的孩子。
|
TreeNode |
getParent()
返回接收者的父级
TreeNode 。
|
boolean |
isLeaf()
如果接收者是叶子,则返回true。
|
TreeNode getChildAt(int childIndex)
TreeNode索引
childIndex 。
int getChildCount()
TreeNode 。
TreeNode getParent()
TreeNode 。
int getIndex(TreeNode node)
node接收机中的孩子。
如果接收方不包含node ,则返回-1。
boolean getAllowsChildren()
boolean isLeaf()
Enumeration children()
Enumeration返回接收者的
Enumeration 。
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.