Contains the tree view state data and the root node.
|
TreeView(string|HTMLElement id ) |
TreeView |
|
|
addHandler<static>(el the , string sType , function fn ) : void |
TreeView |
<static> Add a DOM event |
|
animateCollapse(el {HTMLElement} , node {YAHOO.util.Node} ) : boolean |
TreeView |
Perform the collapse animation if configured, or just show the
element if not configured or too many animations are i... |
|
animateExpand(el {HTMLElement} , node {YAHOO.util.Node} ) : boolean |
TreeView |
Perform the expand animation if configured, or just show the
element if not configured or too many animations are in ... |
|
collapseAll() : void |
TreeView |
Collapses all expanded child nodes in the entire tree. |
|
collapseComplete() : void |
TreeView |
Function executed when the collapse animation completes |
|
draw() : void |
TreeView |
Renders the tree boilerplate and visible nodes |
|
expandAll() : void |
TreeView |
Expands all child nodes. Note: this conflicts with the "multiExpand"
node property. If expand all is called in a tr... |
|
expandComplete() : void |
TreeView |
Function executed when the expand animation completes |
|
getEl() : HTMLElement |
TreeView |
Returns the tree's host element |
|
getNode<static>(treeId {String} , nodeIndex {String} ) : Node |
TreeView |
<static> Global method for getting a node by its id. Used in the generated
tree html. |
|
getNodeByIndex(int nodeIndex ) : Node |
TreeView |
Returns a node in the tree that has the specified index (this index
is created internally, so this function probably ... |
|
getNodeByProperty(object property , object value ) : Node |
TreeView |
Returns a node that has a matching property and value in the data
object that was passed into its constructor. |
|
getNodesByProperty(object property , object value ) : Array |
TreeView |
Returns a collection of nodes that have a matching property
and value in the data object that was passed into its co... |
|
getRoot() : Node |
TreeView |
Returns the root node of this tree |
|
getTree<static>(treeId {String} ) : TreeView |
TreeView |
<static> Global method for getting a tree by its id. Used in the generated
tree html. |
|
onCollapse(node {Node} ) : void |
TreeView |
Deprecated. Abstract method that is executed when a node is collapsed. |
|
onExpand(node {Node} ) : void |
TreeView |
Deprecated. Abstract method that is executed when a node is expanded |
|
popNode(Node the ) : void |
TreeView |
Removes the node from the tree, preserving the child collection
to make it possible to insert the branch into anothe... |
|
preload<static>(string prefix ) : void |
TreeView |
<static> Attempts to preload the images defined in the styles used to draw the tree by
rendering off-screen ele... |
|
removeChildren(Node node ) : void |
TreeView |
Deletes this nodes child collection, recursively. Also collapses
the node, and resets the dynamic load flag. The pr... |
|
removeHandler<static>(el the , string sType , function fn ) : void |
TreeView |
<static> Remove a DOM event |
|
removeNode(Node The , boolean autoRefresh ) : boolean |
TreeView |
Removes the node and its children, and optionally refreshes the
branch of the tree that was affected. |
|
setCollapseAnim(string the ) : void |
TreeView |
Sets up the animation for collapsing children |
|
setDynamicLoad(function fnDataLoader , iconMode {int} ) : void |
TreeView |
Configures this tree to dynamically load all child data |
|
setExpandAnim(string type ) : void |
TreeView |
Sets up the animation for expanding children |
|
toString() : string |
TreeView |
TreeView instance toString |
id
public String id
The id of tree container element
This property is defined by TreeView.
locked
public boolean locked
We lock the tree control while waiting for the dynamic loader to return
This property is defined by TreeView.
maxAnim
public int maxAnim
The maximum number of animations to run at one time.
This property is defined by TreeView.
nodeCount<static>
public int nodeCount<static>
<static> Count of all nodes in all trees
This property is defined by TreeView.
addHandler<static>
public function addHandler<static>(el the
, string sType
, function fn
)
This method is defined by TreeView.
animateCollapse
public function animateCollapse(el {HTMLElement}
, node {YAHOO.util.Node}
)
Perform the collapse animation if configured, or just show the
element if not configured or too many animations are in progress
This method is defined by TreeView.
animateExpand
public function animateExpand(el {HTMLElement}
, node {YAHOO.util.Node}
)
Perform the expand animation if configured, or just show the
element if not configured or too many animations are in progress
This method is defined by TreeView.
collapseAll
public function collapseAll()
Collapses all expanded child nodes in the entire tree.
This method is defined by TreeView.
collapseComplete
public function collapseComplete()
Function executed when the collapse animation completes
This method is defined by TreeView.
draw
public function draw()
Renders the tree boilerplate and visible nodes
This method is defined by TreeView.
expandAll
public function expandAll()
Expands all child nodes. Note: this conflicts with the "multiExpand"
node property. If expand all is called in a tree with nodes that
do not allow multiple siblings to be displayed, only the last sibling
will be expanded.
This method is defined by TreeView.
expandComplete
public function expandComplete()
Function executed when the expand animation completes
This method is defined by TreeView.
getEl
public function getEl()
Returns the tree's host element
Parameters:
Returns:
HTMLElement
the host element
This method is defined by TreeView.
getNode<static>
public function getNode<static>(treeId {String}
, nodeIndex {String}
)
<static> Global method for getting a node by its id. Used in the generated
tree html.
This method is defined by TreeView.
getNodeByIndex
public function getNodeByIndex(int nodeIndex
)
Returns a node in the tree that has the specified index (this index
is created internally, so this function probably will only be used
in html generated for a given node.)
This method is defined by TreeView.
getNodeByProperty
public function getNodeByProperty(object property
, object value
)
Returns a node that has a matching property and value in the data
object that was passed into its constructor.
This method is defined by TreeView.
getNodesByProperty
public function getNodesByProperty(object property
, object value
)
Returns a collection of nodes that have a matching property
and value in the data object that was passed into its constructor.
This method is defined by TreeView.
getRoot
public function getRoot()
Returns the root node of this tree
This method is defined by TreeView.
getTree<static>
public function getTree<static>(treeId {String}
)
<static> Global method for getting a tree by its id. Used in the generated
tree html.
This method is defined by TreeView.
onCollapse
public function onCollapse(node {Node}
)
Deprecated. Abstract method that is executed when a node is collapsed.
This method is defined by TreeView.
onExpand
public function onExpand(node {Node}
)
Deprecated. Abstract method that is executed when a node is expanded
This method is defined by TreeView.
popNode
public function popNode(Node the
)
Removes the node from the tree, preserving the child collection
to make it possible to insert the branch into another part of the
tree, or another tree.
This method is defined by TreeView.
preload<static>
public function preload<static>(string prefix
)
<static> Attempts to preload the images defined in the styles used to draw the tree by
rendering off-screen elements that use the styles.
This method is defined by TreeView.
removeChildren
public function removeChildren(Node node
)
Deletes this nodes child collection, recursively. Also collapses
the node, and resets the dynamic load flag. The primary use for
this method is to purge a node and allow it to fetch its data
dynamically again.
Parameters:
node
: Nodethe node to purge
Returns:
This method is defined by TreeView.
removeHandler<static>
public function removeHandler<static>(el the
, string sType
, function fn
)
<static> Remove a DOM event
This method is defined by TreeView.
removeNode
public function removeNode(Node The
, boolean autoRefresh
)
Removes the node and its children, and optionally refreshes the
branch of the tree that was affected.
This method is defined by TreeView.
setCollapseAnim
public function setCollapseAnim(string the
)
Sets up the animation for collapsing children
This method is defined by TreeView.
setDynamicLoad
public function setDynamicLoad(function fnDataLoader
, iconMode {int}
)
Configures this tree to dynamically load all child data
Parameters:
fnDataLoader
: functionthe function that will be called to get the data
{int}
: iconModeconfigures the icon that is displayed when a dynamic load node is expanded the first time without children. By default, the "collapse" icon will be used. If set to 1, the leaf node icon will be displayed.
Returns:
This method is defined by TreeView.
setExpandAnim
public function setExpandAnim(string type
)
Sets up the animation for expanding children
This method is defined by TreeView.
toString
public function toString()
TreeView instance toString
This method is defined by TreeView.