Table 116 summarizes the method of the TreeNode
class.
Table 116.
Member method of the TreeNode class.
Member method
| Description
| Page
|
TreeNode()
| Creates a tree-node object.
| page description
|
Creates a
tree-node object.
Syntax
public TreeNode(String name, String desc, boolean isGen, boolean isExp);
public TreeNode(String name, String desc, boolean isGen, boolean isExp,
TreeNode[] treeNodes);
public TreeNode(String name, String desc, boolean isGen, boolean isExp,
TreeNode[] treeNodes, int nodeNature);
Parameters
- desc
- Specifies the description of the node; the value of this parameter
initializes the description member variable (description).
- isGen
- Specifies whether the node is "generatable" (that is, whether the
node can be converted to a business object definition); the value of this
parameter initializes the isGeneratable member variable (isGeneratable).
- isExp
- Specifies whether the node is expandable (that is, whether the node is or
is not a leaf); the value of this parameter initializes the
isExpandable member variable (isExpandable).
- name
- Specifies the name of the node; the value of this parameter
initializes the name member variable (name).
- nodeNature
- Indicates the nature of the node, as one of the following node-nature
constants:
ODKConstant.NODE_NATURE_FILE
ODKConstant.NODE_NATURE_NORMAL
- treeNodes
- Specifies the fully expanded hierarchy of nodes; the value of this
parameter initializes the nodes member variable (nodes).
Return values
A newly instantiated TreeNode object.
Notes
The TreeNode() method provides the following forms to
instantiate a tree node:
- The first form of the constructor allows you to specify the name and
description of the tree node, as well as whether it is generatable or
expandable. In this form, the child-nodes array (the nodes
member variable) is initialized to null and the node nature (the
polymorphicNature member variable) is initialized to
"normal". Use this form to initialize a leaf node.
- The second form of the constructor allows you to specify the child-nodes
array (in addition to the values that the first form specifies). In
this form, the node nature is initialized to "normal". Use this
form to initialize an expandable node.
- The third form of the constructor allows you to specify the node nature
(in addition to the values that the first and second forms specify).
Use this form to initialize a file-nature node.
For more information, see Constructing the tree nodes.
