TreeNode is simple tree node and used in Tree.
Description | ||
new TreeNode(params?srcNodeRef?) |
Create a new TreeNode widget. |
Type | Description | |
_styleAttr | Object |
when you want to set style for other node. you can do this by example...
_styleAttr:{
|
alwaysShowChevron | Boolean |
if true, chevron will be always shown even if it has no child at all. |
child | Array |
Array of TreeNode Object which represent child of this node. |
expand | Boolean |
if true, node will expand to display the children. |
state | Unknown | |
title | String |
title of tree node. |
Return type | Description | |
__baseClassInherit(constructor) | None |
get className from superclass. |
add(TreeNodeindex) | None |
add child to this node at specific position. |
append(TreeNode) | None |
append child to this node. |
appendDomNode(domNode) | None |
append domNode to this tree. |
getParent() | Object |
get parent of this node. Return null if it has no parent. |
remove(index) | None |
remove child from this node. |
removeAll() | None |
remove all children from this node. |
removeAllDetailsNodes() | None |
remove all details nodes from this node. |
removeDetailsNode(domNode) | None |
remove details node from this node. |
Description | ||
child-state-change (childNode, oldState, state) |
The event fires when child state of this tree node is changed. |
|
collapse |
The event fires when tree node is collapse. |
|
expand |
The event fires when tree node is expand. |
|
state-change (oldState, state) |
The event fires when tree node state is changed. |
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 child to this node at specific position.
<TreeNode Object>
TreeNode
|
Required |
object you want to add as a child of this node. |
<Number>
index
|
Required |
position you want to locate this child (index start at 0). index = 0 means it will be the first child of this node. |
append child to this node.
<TreeNode Object>
TreeNode
|
Required |
object you want to add as a child of this node. |
append domNode to this tree.
<DOMNode>
domNode
|
Required |
you want to add to this tree. |
remove child from this node.
<Number>
index
|
Required |
position of child you want to remove (index start at 0). index = 0 mean you want to remove first child. |
remove all children from this node.
remove all details nodes from this node.
remove details node from this node.
<DOMNode>
domNode
|
Required |
you want to remove to this tree. |
The event fires when child state of this tree node is changed.
The event fires when tree node is collapse.
The event fires when tree node is expand.