Java TreeNode Interface

Source: Internet
Author: User

Today to write an Android program to see a Method Getchildat (); Do not understand its use of Baidu search for a bit, see its API, carefully look at the original interface inside now I put this API to share the assumption is that the operation of XML I think this is very convenient

Javax.swing.tree
Interface TreeNode
All known sub-interfaces:
Mutabletreenode
All known implementation classes:
abstractdocument.abstractelement, Abstractdocument.branchelement, Abstractdocument.leafelement, Defaultmutabletreenode, Defaultstyleddocument.sectionelement,htmldocument.blockelement, HTMLDocument.RunElement, Jtree.dynamicutiltreenode
TreeNode

Defines the requirements that can be used as objects for tree nodes in JTree.

Overridden equals TreeNode implementations often need to be rewritten as well hashCode . For a lot of other information, please refer to TreeModel . For a lot of other information and demonstration examples of using tree nodes, refer to the "How to" use Tree Nodes in the Java Tutorial .

Method Summary
 Enumeration children()
Enumerationreturns the child node of the recipient in the form of a
 boolean getAllowsChildren()
Returns true if the recipient agrees to have child nodes.
 TreeNode getChildAt(int childIndex)
Returns childIndex the child of the index position TreeNode .
 int getChildCount()
Returns the number of children included by the recipient TreeNode .
 int getIndex(TreeNode node)
Returns the index in the child node of the recipient node .
 TreeNode getParent()
Returns the recipient's parent TreeNode .
 boolean isLeaf()
Returns TRUE if the recipient is a leaf node.

 

Method specific Information
Getchildat
Getchildat (int childindex)
returns childIndex the child of the index position TreeNode .

Getchildcount
Getchildcount ()
Returns the number of children included by the recipient TreeNode .

GetParent
getParent ()
returns the recipient's parent TreeNode .

GetIndex
GetIndex (TreeNode node)
Returns the index in the child node of the recipient node .

If the recipient does not include node , return-1.

Getallowschildren
Getallowschildren ()
Returns True if the recipient agrees to have child nodes.

IsLeaf
IsLeaf ()
Returns True if the recipient is a leaf node.

Children
Children ()
Enumeration Returns the child node of the recipient in the form of a

Java TreeNode Interface

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.