protected
void
_appendChild
(
node
,
cancelBubbling
)
Append a child node to the TreeData.
- Parameters:
-
node
<TreeNode>
-
cancelBubbling
<boolean>
protected
void
_collapseAll
(
)
Collapse all children of the TreeData.
protected
void
_expandAll
(
)
Expand all children of the TreeData.
void
_removeChild
(
node
)
Remove the passed node
from the current TreeData.
- Parameters:
-
node
<TreeData>
void
appendChild
(
node
,
cancelBubbling
)
Append a child node to the TreeData.
- Parameters:
-
node
<TreeNode>
-
cancelBubbling
<boolean>
void
bubbleEvent
(
eventType
,
args
,
cancelBubbling
,
stopActionPropagation
)
Bubble event to all parent nodes.
- Parameters:
-
eventType
<String>
-
args
<Array>
-
cancelBubbling
<boolean>
-
stopActionPropagation
<boolean>
void
collapseAll
(
)
Collapse all children of the TreeData.
TreeNode
createNode
(
options
)
Create a TreeNode instance.
- Parameters:
-
options
<Object>
void
eachChildren
(
fn
)
Loop each children and execute the fn
callback.
- Parameters:
-
fn
<function>
callback
-
fn
<boolean>
recursive
void
empty
(
)
Delete all children of the current TreeData.
void
expandAll
(
)
Expand all children of the TreeData.
Array
getChildren
(
deep
)
Get an Array of the children nodes of the current TreeData.
- Parameters:
-
deep
<boolean>
Object
getEventOutputMap
(
node
)
Get an object containing metadata for the custom events.
- Parameters:
-
node
<TreeData>
TreeNode
getNodeByChild
(
child
)
Get a TreeNode instance by a child DOM Node.
boolean
hasChildNodes
(
)
Whether the TreeData contains children or not.
protected
void
initializer
(
)
Construction logic executed during TreeData instantiation. Lifecycle.
void
insert
(
treeNode
,
refTreeNode
,
where
)
Insert treeNode
before or after the refTreeNode
.
- Parameters:
-
treeNode
<TreeNode>
-
refTreeNode
<TreeNode>
-
where
<TreeNode>
'before' or 'after'
void
insertAfter
(
treeNode
,
refTreeNode
)
Insert treeNode
after the refTreeNode
.
- Parameters:
-
treeNode
<TreeNode>
-
refTreeNode
<TreeNode>
void
insertBefore
(
treeNode
,
refTreeNode
)
Insert treeNode
before the refTreeNode
.
- Parameters:
-
treeNode
<TreeNode>
-
refTreeNode
<TreeNode>
boolean
isRegistered
(
node
)
Whether the TreeNode is registered on this TreeData.
- Parameters:
-
node
<TreeNode>
TreeNode
item
(
index
)
Get a TreeNode children by index.
- Parameters:
-
index
<Number>
void
refreshIndex
(
)
Refresh the index (i.e. re-index all nodes).
void
registerNode
(
node
)
Register the passed TreeNode on this TreeData.
- Parameters:
-
node
<TreeNode>
void
removeChild
(
node
)
Remove the passed node
from the current TreeData.
- Parameters:
-
node
<TreeData>
void
selectAll
(
)
Select all children of the TreeData.
void
unregisterNode
(
node
)
Unregister the passed TreeNode from this TreeData.
- Parameters:
-
node
<TreeNode>
void
updateReferences
(
TreeNode
,
TreeView
)
Update the references of the passed TreeNode.
- Parameters:
-
TreeNode
<node>
-
TreeNode
<parentNode>
-
TreeView
<ownerTree>