標籤:看到了 mod child 有關 table ranch 重寫 操作 method
今天寫安卓程式見到一個方法getChildAt();不懂其用邊去百度搜尋了一下,看到了它的api,細緻看看原來是在介面裡面如今我把這個api貼給大家共用假設是操作xml我認為用這個非常方便
javax.swing.tree
介面 TreeNode
-
全部已知子介面:
-
MutableTreeNode
-
全部已知實作類別:
-
AbstractDocument.AbstractElement, AbstractDocument.BranchElement, AbstractDocument.LeafElement, DefaultMutableTreeNode, DefaultStyledDocument.SectionElement,HTMLDocument.BlockElement, HTMLDocument.RunElement, JTree.DynamicUtilTreeNode
-
public interface TreeNode
定義能夠用作 JTree 中樹節點的對象所需的要求。
重寫 equals 的 TreeNode 的實現通常也須要重寫 hashCode。有關很多其它資訊,請參閱 TreeModel。 有關使用樹節點的很多其它資訊和示範範例,請參閱 The Java Tutorial 中的 How to Use Tree Nodes。
| 方法摘要 |
Enumeration |
children() 以 Enumeration 的形式返回接收者的子節點。 |
boolean |
getAllowsChildren() 假設接收者同意有子節點,則返回 true。 |
TreeNode |
getChildAt(int childIndex) 返回索引 childIndex 位置的子 TreeNode。 |
int |
getChildCount() 返回接收者包括的子 TreeNode 數。 |
int |
getIndex(TreeNode node) 返回接收者子節點中的 node 的索引。 |
TreeNode |
getParent() 返回接收者的父 TreeNode。 |
boolean |
isLeaf() 假設接收者是一個分葉節點,則返回 true。 |
getChildAt
TreeNode getChildAt(int childIndex)
-
返回索引
childIndex 位置的子
TreeNode。
-
getChildCount
int getChildCount()
-
返回接收者包括的子
TreeNode 數。
-
getParent
TreeNode getParent()
-
返回接收者的父
TreeNode。
-
getIndex
int getIndex(TreeNode node)
-
返回接收者子節點中的
node 的索引。
假設接收者不包括 node,則返回 -1。
-
getAllowsChildren
boolean getAllowsChildren()
-
假設接收者同意有子節點,則返回 true。
-
isLeaf
boolean isLeaf()
-
假設接收者是一個分葉節點,則返回 true。
-
children
Enumeration children()
-
以
Enumeration 的形式返回接收者的子節點。
java TreeNode介面