Constructor
new TreeNode(config)
- Description:
- Create a new TreeNode with the given configuration
- Source:
Parameters:
| Name |
Type |
Description |
config |
TreeNode~config
|
The configuration for this TreeNode |
Members
alwaysOpen
- Source:
childNodes :Array.<TreeNode>
- Description:
- The children of this TreeNode
- Source:
The children of this TreeNode
Type:
context
- Source:
html :Element
- Description:
- The DOM Element of this TreeNode
- Source:
The DOM Element of this TreeNode
Type:
- Description:
- Meta icons of this TreeNode
- Source:
Meta icons of this TreeNode
Type:
- Description:
- The parent node of this TreeNode
- Source:
The parent node of this TreeNode
Type:
type
- Source:
Methods
- Description:
- Add a meta icon to this TreeNode
- Source:
Parameters:
| Name |
Type |
Description |
icon |
*
|
|
addNode(index, node)
- Description:
- Add a child node to this node at a given index
- Source:
Parameters:
| Name |
Type |
Description |
index |
Number
|
|
node |
TreeNode
|
|
clearNodes()
- Description:
- Removes all child nodes from this TreeNode
- Source:
fold()
- Description:
- Source:
getProperty(propertyName, defaultValueopt) → {*}
- Description:
- Retrieve the value of the given property
- Source:
Parameters:
| Name |
Type |
Attributes |
Default |
Description |
propertyName |
String
|
|
|
|
defaultValue |
*
|
<optional>
|
null
|
The default value if the property does not exist |
Returns:
-
Type
-
*
getTreeBrowser() → {null|TreeBrowser}
- Description:
- Return the TreeBrowser at the top of the tree this TreeNode is in, if any
- Source:
Returns:
-
Type
-
null
|
TreeBrowser
isFolded() → {boolean}
- Description:
- Check wether this TreeNode is folded or unfolded
- Source:
Returns:
- True of this TreeNode is folded, false if unfolded
-
Type
-
boolean
isLeaf() → {boolean}
- Description:
- Checks if this TreeNode has any children
- Source:
Returns:
True/False depending on if this TreeNode has any children
-
Type
-
boolean
onDecorated()
- Description:
- Called when this TreeNode has been decorated
- Source:
onRemoved()
- Description:
- Called when we are removed from the tree
- Source:
- Description:
- Remove a meta icon from this TreeNode
- Source:
Parameters:
| Name |
Type |
Description |
icon |
*
|
|
removeNode(node)
- Description:
- Remove a child node from this node
- Source:
Parameters:
reveal()
- Description:
- Make this TreeNode and all parent TreeNode's unfold,
- Source:
select()
- Description:
- Make this TreeNode the selected node in the tree
- Source:
setProperty(propertyName, value)
- Description:
- Sets the value of the given property
- Source:
Parameters:
| Name |
Type |
Description |
propertyName |
String
|
|
value |
*
|
|
toggleFold()
- Description:
- Toggle fold state of this TreeNode
- Source:
triggerAction()
- Description:
- Trigger the action listeners of this TreeNode
- Source:
unfold()
- Description:
- Source:
Type Definitions
config
- Source:
Properties:
| Name |
Type |
Attributes |
Default |
Description |
type |
string
|
|
|
The type of this TreeNode, ex. "DomTreeNode", "AssetNode", "AssetRootNode" |
context |
*
|
|
|
The context of this TreeNode |
alwaysOpen |
boolean
|
<optional>
|
false
|
If this TreeNode should stay unfolded |
lookupKey |
*
|
<optional>
|
context
|
The lookupkey to use when TreeGenerator saves this TreeNode for later lookup |
startOpen |
boolean
|
<optional>
|
false
|
If this TreeNode should start unfolded |
hideSelf |
boolean
|
<optional>
|
false
|
If this TreeNode should be hidden. |
Type:
Events
EventSystem:"TreeBrowser.TreeNode.Action"
- Description:
- Called when a TreeNode's action is triggered. (Ie. double click it)
- Source:
Properties:
| Name |
Type |
Description |
node |
TreeNode
|
The node which had its action triggered |
Type: