Tree is simple control used to represent tree structure. Tree contains collection of TreeNode object to represent each node.
Description | ||
new Tree(params?srcNodeRef?) |
Create a new Tree widget. |
Type | Description | |
_styleAttr | Object |
when you want to set style for other node. you can do this by example...
_styleAttr:{
|
nodes | Array |
Array of TreeNode Object which represent node in this tree. |
value | Array |
Array of value of all nodes and it's children. This property is read-only. |
Return type | Description | |
__baseClassInherit(constructor) | None |
get className from superclass. |
add(TreeNodeindex) | None |
add new node to tree at specific position. |
append(TreeNode) | None |
append node to this tree. |
expandAll() | None |
expand all nodes and children in the tree. |
remove(index) | None |
remove node from this tree. |
removeAll() | None |
remove all nodes from this tree. |
Description | ||
collapse (node) |
The event fires when node in tree is collapse. |
|
expand (node) |
The event fires when node in tree is expand. |
when you want to set style for other node. you can do this by example...
_styleAttr:{
style-property
:effected-node
}
this property was effected where this class was inherited and your widget was called by...
var widget = new YourWidget({
style:{
style-property
:style-value
}
});
now effected-node
in you widget will have style-property
= style-value
Default value: {}
get className from superclass.
<Object>
constructor
|
Required |
|
add new node to tree at specific position.
<TreeNode Object>
TreeNode
|
Required |
object you want to add to this tree. |
<Number>
index
|
Required |
position you want to locate this node (index start at 0). index = 0 means it will be the first node of this tree. |
append node to this tree.
<TreeNode Object>
TreeNode
|
Required |
object you want to add to this tree. |
expand all nodes and children in the tree.
remove node from this tree.
<Index Number>
index
|
Required |
position of node you want to remove (index start at 0). index = 0 mean you want to remove first node in this tree. |
remove all nodes from this tree.
The event fires when node in tree is collapse.
<TreeNode Object>
node
|
-tree node which is collapsed. |
The event fires when node in tree is expand.
<TreeNode Object>
node
|
-tree node which is expanded. |