webgui/www/extras/yui/docs/treeview/YAHOO.widget.TreeView.html
JT Smith 4f68a0933c added YUI and YUI-ext
fixed the resizable text area with IE problem
fixed the ad space with IE problem
merged the 7.2.0 and 7.1.4 change logs
2006-11-07 23:15:57 +00:00

1576 lines
38 KiB
HTML

<html>
<head>
<!--<title>YUI API - </title>-->
<!--<title>YUI API - YAHOO.widget.TreeView</title>-->
<title>API: TreeView YAHOO.widget.TreeView.html (YUI Library)</title>
<link href="stylesheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="header">
<h1>Yahoo! UI Library</h1>
<h3><a href="./index.html">TreeView</a></h3>
<div class="breadcrumbs">
<a href="./index.html">TreeView</a>
&gt;
<strong>YAHOO.widget.TreeView</strong>
</div>
</div>
<div id="body">
<div class="nav">
<div class="module resources">
<ul class="content">
<li><a href="overview-tree.html">Tree View</a></li>
<li><a href="index-all.html">Element Index</a></li>
</ul>
</div>
<div class="module">
<h4><a href="./allclasses-noframe.html">Classes</a></h4>
<ul class="content">
<li>
<a href="YAHOO.widget.html">
YAHOO.widget</a>
</li>
<li>
<a href="YAHOO.widget.HTMLNode.html">
YAHOO.widget.HTMLNode</a>
</li>
<li>
<a href="YAHOO.widget.MenuNode.html">
YAHOO.widget.MenuNode</a>
</li>
<li>
<a href="YAHOO.widget.Node.html">
YAHOO.widget.Node</a>
</li>
<li>
<a href="YAHOO.widget.RootNode.html">
YAHOO.widget.RootNode</a>
</li>
<li>
<a href="YAHOO.widget.TextNode.html">
YAHOO.widget.TextNode</a>
</li>
<li>
<a href="YAHOO.widget.TreeView.html">
YAHOO.widget.TreeView</a>
</li>
<li>
<a href="YAHOO.widget.TVAnim.html">
YAHOO.widget.TVAnim</a>
</li>
<li>
<a href="YAHOO.widget.TVFadeIn.html">
YAHOO.widget.TVFadeIn</a>
</li>
<li>
<a href="YAHOO.widget.TVFadeOut.html">
YAHOO.widget.TVFadeOut</a>
</li>
</ul>
</div>
<div class="module">
<h4><a href="./overview-summary.html">Files</a></h4>
<ul class="content">
<li>
<a href="overview-summary-HTMLNode.js.html">
HTMLNode.js</a>
</li>
<li>
<a href="overview-summary-MenuNode.js.html">
MenuNode.js</a>
</li>
<li>
<a href="overview-summary-Node.js.html">
Node.js</a>
</li>
<li>
<a href="overview-summary-RootNode.js.html">
RootNode.js</a>
</li>
<li>
<a href="overview-summary-TextNode.js.html">
TextNode.js</a>
</li>
<li>
<a href="overview-summary-TreeView.js.html">
TreeView.js</a>
</li>
<li>
<a href="overview-summary-TVAnim.js.html">
TVAnim.js</a>
</li>
<li>
<a href="overview-summary-TVFadeIn.js.html">
TVFadeIn.js</a>
</li>
<li>
<a href="overview-summary-TVFadeOut.js.html">
TVFadeOut.js</a>
</li>
</ul>
</div>
</div>
<div id="pri">
<div class="main">
<h2>Class YAHOO.widget.TreeView</h2>
<pre>Object
|
+--<b>YAHOO.widget.TreeView</b>
</pre>
<hr />
<!-- Class definition -->
<div class="class-def">
<div class="class-name">
<span class="class-attribs">
</span>
<span class="class-type">class</span>
<b>YAHOO.widget.TreeView</b>
</div>
<div class="class-extends">
</div>
</div>
<div class="meta">
</div>
<!-- ======== QUICK LINKS ======== -->
<div class="quick-links">
<strong>Quick Links:</strong>&nbsp;
<a href="#field_summary">Field Summary</a>
|
<a href="#constructor_summary">Constructor Summary</a>
|
<a href="#methodSummary">Method Summary</a> |
<a href="#methodDetails">Method Details</a>
</div>
<!-- ======== END QUICK LINKS ======== -->
<!-- ======== NESTED CLASS SUMMARY ======== -->
<!-- ======== END NESTED CLASS SUMMARY ======== -->
<!-- =========== FIELD SUMMARY =========== -->
<div class="section field summaries">
<h3><a name="field_summary">Field Summary</a> <span class="top">[<a href="#top">top</a>]</span></h3>
<div class="content">
<table border="1" cellpadding="3" cellspacing="0">
<tr>
<td class="flags">String</td>
<td class="spec">
<code>
<a href="#id">id</a>
</code>
<div class="description">
The id of tree container element&nbsp;
</div>
</td>
</tr>
<tr>
<td class="flags">boolean</td>
<td class="spec">
<code>
<a href="#locked">locked</a>
</code>
<div class="description">
We lock the tree control while waiting for the dynamic loader to return&nbsp;
</div>
</td>
</tr>
<tr>
<td class="flags">int</td>
<td class="spec">
<code>
<a href="#maxAnim">maxAnim</a>
</code>
<div class="description">
The maximum number of animations to run at one time.&nbsp;
</div>
</td>
</tr>
<tr>
<td class="flags">int</td>
<td class="spec">
<code>
<a href="#nodeCount">nodeCount</a>
</code>
<div class="description">
Count of all nodes in all trees&nbsp;
</div>
</td>
</tr>
</table>
</div>
</div>
<!-- =========== END FIELD SUMMARY =========== -->
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<div class="section contructor summaries">
<h3><a name="constructor_summary">Constructor Summary</a> <span class="top">[<a href="#top">top</a>]</span></h3>
<div class="content">
<code class="spec">
<a href="YAHOO.widget.TreeView.html#YAHOO.widget.TreeView()">YAHOO.widget.TreeView</a>
</code>
<div class="description">
Contains the tree view state data and the root node.&nbsp;
</div>
</div>
</div>
<!-- ======== END CONSTRUCTOR SUMMARY ======== -->
<!-- ========== METHOD SUMMARY =========== -->
<div class="section method summaries">
<h3><a name="methodSummary">Method Summary</a> <span class="top">[<a href="#top">top</a>]</span></h3>
<div class="content">
<table border="1" cellpadding="3" cellspacing="0">
<tr>
<td class="flags">boolean</td>
<td class="spec">
<code>
<a href="#animateCollapse">animateCollapse</a>
(el)
</code>
<div class="description">
Perform the collapse animation if configured, or just show the
element if not configured or too many animations are in progress&nbsp;
</div>
</td>
</tr>
<tr>
<td class="flags">boolean</td>
<td class="spec">
<code>
<a href="#animateExpand">animateExpand</a>
(el)
</code>
<div class="description">
Perform the expand animation if configured, or just show the
element if not configured or too many animations are in progress&nbsp;
</div>
</td>
</tr>
<tr>
<td class="flags">void</td>
<td class="spec">
<code>
<a href="#collapseAll">collapseAll</a>
()
</code>
<div class="description">
Collapses all expanded child nodes in the entire tree.&nbsp;
</div>
</td>
</tr>
<tr>
<td class="flags">void</td>
<td class="spec">
<code>
<a href="#collapseComplete">collapseComplete</a>
()
</code>
<div class="description">
Function executed when the collapse animation completes&nbsp;
</div>
</td>
</tr>
<tr>
<td class="flags">void</td>
<td class="spec">
<code>
<a href="#draw">draw</a>
()
</code>
<div class="description">
Renders the tree boilerplate and visible nodes&nbsp;
</div>
</td>
</tr>
<tr>
<td class="flags">void</td>
<td class="spec">
<code>
<a href="#expandAll">expandAll</a>
()
</code>
<div class="description">
Expands all child nodes.&nbsp;
</div>
</td>
</tr>
<tr>
<td class="flags">void</td>
<td class="spec">
<code>
<a href="#expandComplete">expandComplete</a>
()
</code>
<div class="description">
Function executed when the expand animation completes&nbsp;
</div>
</td>
</tr>
<tr>
<td class="flags">Object</td>
<td class="spec">
<code>
<a href="#generateId">generateId</a>
(el)
</code>
<div class="description">
private&nbsp;
</div>
</td>
</tr>
<tr>
<td class="flags">HTMLElement</td>
<td class="spec">
<code>
<a href="#getEl">getEl</a>
()
</code>
<div class="description">
Returns the tree's host element&nbsp;
</div>
</td>
</tr>
<tr>
<td class="flags">Node</td>
<td class="spec">
<code>
<a href="#getNodeByIndex">getNodeByIndex</a>
(&lt;int&gt; nodeIndex)
</code>
<div class="description">
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.)&nbsp;
</div>
</td>
</tr>
<tr>
<td class="flags">Node</td>
<td class="spec">
<code>
<a href="#getNodeByProperty">getNodeByProperty</a>
(&lt;object&gt; property, &lt;object&gt; value)
</code>
<div class="description">
Returns a node that has a matching property and value in the data
object that was passed into its constructor.&nbsp;
</div>
</td>
</tr>
<tr>
<td class="flags">Array</td>
<td class="spec">
<code>
<a href="#getNodesByProperty">getNodesByProperty</a>
(&lt;object&gt; property, &lt;object&gt; value)
</code>
<div class="description">
Returns a collection of nodes that have a matching property
and value in the data object that was passed into its constructor.&nbsp;
</div>
</td>
</tr>
<tr>
<td class="flags">Node</td>
<td class="spec">
<code>
<a href="#getRoot">getRoot</a>
()
</code>
<div class="description">
Returns the root node of this tree&nbsp;
</div>
</td>
</tr>
<tr>
<td class="flags">void</td>
<td class="spec">
<code>
<a href="#onCollapse">onCollapse</a>
(node)
</code>
<div class="description">
Abstract method that is executed when a node is collapsed&nbsp;
</div>
</td>
</tr>
<tr>
<td class="flags">void</td>
<td class="spec">
<code>
<a href="#onExpand">onExpand</a>
(node)
</code>
<div class="description">
Abstract method that is executed when a node is expanded&nbsp;
</div>
</td>
</tr>
<tr>
<td class="flags">void</td>
<td class="spec">
<code>
<a href="#popNode">popNode</a>
(node)
</code>
<div class="description">
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.&nbsp;
</div>
</td>
</tr>
<tr>
<td class="flags">void</td>
<td class="spec">
<code>
<a href="#removeChildren">removeChildren</a>
(&lt;Node&gt; node)
</code>
<div class="description">
Deletes this nodes child collection, recursively.&nbsp;
</div>
</td>
</tr>
<tr>
<td class="flags">boolean</td>
<td class="spec">
<code>
<a href="#removeNode">removeNode</a>
(node, &lt;boolean&gt; autoRefresh)
</code>
<div class="description">
Removes the node and its children, and optionally refreshes the
branch of the tree that was affected.&nbsp;
</div>
</td>
</tr>
<tr>
<td class="flags">void</td>
<td class="spec">
<code>
<a href="#setCollapseAnim">setCollapseAnim</a>
(type)
</code>
<div class="description">
Sets up the animation for collapsing children&nbsp;
</div>
</td>
</tr>
<tr>
<td class="flags">void</td>
<td class="spec">
<code>
<a href="#setDynamicLoad">setDynamicLoad</a>
(&lt;function&gt; fnDataLoader, iconMode)
</code>
<div class="description">
Configures this tree to dynamically load all child data&nbsp;
</div>
</td>
</tr>
<tr>
<td class="flags">void</td>
<td class="spec">
<code>
<a href="#setExpandAnim">setExpandAnim</a>
(type)
</code>
<div class="description">
Sets up the animation for expanding children&nbsp;
</div>
</td>
</tr>
<tr>
<td class="flags">string</td>
<td class="spec">
<code>
<a href="#toString">toString</a>
()
</code>
<div class="description">
toString&nbsp;
</div>
</td>
</tr>
<tr>
<td class="flags">void</td>
<td class="spec">
<code>
<a href="#addHandler">addHandler</a>
(el, &lt;string&gt; sType, &lt;function&gt; fn, &lt;boolean&gt; capture)
</code>
<div class="description">
Adds an event.&nbsp;
</div>
</td>
</tr>
<tr>
<td class="flags">Node</td>
<td class="spec">
<code>
<a href="#getNode">getNode</a>
(treeId, nodeIndex)
</code>
<div class="description">
Global method for getting a node by its id.&nbsp;
</div>
</td>
</tr>
<tr>
<td class="flags">TreeView</td>
<td class="spec">
<code>
<a href="#getTree">getTree</a>
(treeId)
</code>
<div class="description">
Global method for getting a tree by its id.&nbsp;
</div>
</td>
</tr>
<tr>
<td class="flags">void</td>
<td class="spec">
<code>
<a href="#preload">preload</a>
(prefix)
</code>
<div class="description">
Attempts to preload the images defined in the styles used to draw the tree by
rendering off-screen elements that use the styles.&nbsp;
</div>
</td>
</tr>
</table>
</div>
</div>
<!-- ========== END METHOD SUMMARY =========== -->
<!-- ============ FIELD DETAIL START =========== -->
<div class="section field details">
<h3><a name="field_detail">Field Detail</a> <span class="top">[<a href="#top">top</a>]</span></h3>
<div class="content">
<h4><a name="id">id</a></h4>
<div class="detail">
<code>
String
&nbsp;
<strong>id</strong>
</code>
<div class="description">
The id of tree container element
</div>
</div>
<hr />
<h4><a name="locked">locked</a></h4>
<div class="detail">
<code>
boolean
&nbsp;
<strong>locked</strong>
</code>
<div class="description">
We lock the tree control while waiting for the dynamic loader to return
</div>
</div>
<hr />
<h4><a name="maxAnim">maxAnim</a></h4>
<div class="detail">
<code>
int
&nbsp;
<strong>maxAnim</strong>
</code>
<div class="description">
The maximum number of animations to run at one time.
</div>
</div>
<hr />
<h4><a name="nodeCount">nodeCount</a></h4>
<div class="detail">
<code>
int
&nbsp;
<strong>nodeCount</strong>
</code>
<div class="description">
Count of all nodes in all trees
</div>
</div>
<hr />
</div>
</div>
<!-- ============ FIELD DETAIL END =========== -->
<!-- ========= CONSTRUCTOR DETAIL START ======== -->
<div class="section constructor details">
<h3><a name="constructor_detail">Constructor Detail</a> <span class="top">[<a href="#top">top</a>]</span></h3>
<div class="content">
<h4><a name="YAHOO.widget.TreeView()">YAHOO.widget.TreeView</a></h4>
<div class="detail">
<code>
<strong>YAHOO.widget.TreeView</strong>
()
</code>
<div class="description">
Contains the tree view state data and the root node. This is an
ordered tree; child nodes will be displayed in the order created, and
there currently is no way to change this.
<dl>
<dt>Parameters:</dt>
<dd>
<code>string</code> -
|HTMLElement} id The id of the element, or the element itself that the tree will be inserted into.
</dd>
</dl>
</div>
</div>
</div>
</div>
<!-- ========= CONSTRUCTOR DETAIL END ======== -->
<!-- ============ METHOD DETAIL START ========== -->
<div class="section method details">
<h3><a name="methodDetails">Method Detail</a> <span class="top">[<a href="#top">top</a>]</span></h3>
<div class="content">
<h4><a name="animateCollapse">animateCollapse</a></h4>
<div class="detail">
<code>
boolean
<strong>animateCollapse</strong>
(el)
</code>
<div class="description">
Perform the collapse animation if configured, or just show the
element if not configured or too many animations are in progress
<dl>
<dt>Parameters:</dt>
<dd>
<code>el</code> -
{HTMLElement} the element to animate
</dd>
</dl>
<dl>
<dt>Returns:</dt>
<dd> true if animation could be invoked, false otherwise</dd>
</dl>
</div>
</div>
<hr />
<h4><a name="animateExpand">animateExpand</a></h4>
<div class="detail">
<code>
boolean
<strong>animateExpand</strong>
(el)
</code>
<div class="description">
Perform the expand animation if configured, or just show the
element if not configured or too many animations are in progress
<dl>
<dt>Parameters:</dt>
<dd>
<code>el</code> -
{HTMLElement} the element to animate
</dd>
</dl>
<dl>
<dt>Returns:</dt>
<dd> true if animation could be invoked, false otherwise</dd>
</dl>
</div>
</div>
<hr />
<h4><a name="collapseAll">collapseAll</a></h4>
<div class="detail">
<code>
void
<strong>collapseAll</strong>
()
</code>
<div class="description">
Collapses all expanded child nodes in the entire tree.
</div>
</div>
<hr />
<h4><a name="collapseComplete">collapseComplete</a></h4>
<div class="detail">
<code>
void
<strong>collapseComplete</strong>
()
</code>
<div class="description">
Function executed when the collapse animation completes
</div>
</div>
<hr />
<h4><a name="draw">draw</a></h4>
<div class="detail">
<code>
void
<strong>draw</strong>
()
</code>
<div class="description">
Renders the tree boilerplate and visible nodes
</div>
</div>
<hr />
<h4><a name="expandAll">expandAll</a></h4>
<div class="detail">
<code>
void
<strong>expandAll</strong>
()
</code>
<div class="description">
Expands all child nodes. YAHOO.widget.TreeView.prototype.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.
</div>
</div>
<hr />
<h4><a name="expandComplete">expandComplete</a></h4>
<div class="detail">
<code>
void
<strong>expandComplete</strong>
()
</code>
<div class="description">
Function executed when the expand animation completes
</div>
</div>
<hr />
<h4><a name="generateId">generateId</a></h4>
<div class="detail">
<code>
Object
<strong>generateId</strong>
(el)
</code>
<div class="description">
private
</div>
</div>
<hr />
<h4><a name="getEl">getEl</a></h4>
<div class="detail">
<code>
HTMLElement
<strong>getEl</strong>
()
</code>
<div class="description">
Returns the tree's host element
<dl>
<dt>Returns:</dt>
<dd> the host element</dd>
</dl>
</div>
</div>
<hr />
<h4><a name="getNodeByIndex">getNodeByIndex</a></h4>
<div class="detail">
<code>
Node
<strong>getNodeByIndex</strong>
(&lt;int&gt; nodeIndex)
</code>
<div class="description">
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.)
<dl>
<dt>Parameters:</dt>
<dd>
<code>nodeIndex</code> -
the index of the node wanted
</dd>
</dl>
<dl>
<dt>Returns:</dt>
<dd> the node with index=nodeIndex, null if no match</dd>
</dl>
</div>
</div>
<hr />
<h4><a name="getNodeByProperty">getNodeByProperty</a></h4>
<div class="detail">
<code>
Node
<strong>getNodeByProperty</strong>
(&lt;object&gt; property, &lt;object&gt; value)
</code>
<div class="description">
Returns a node that has a matching property and value in the data
object that was passed into its constructor.
<dl>
<dt>Parameters:</dt>
<dd>
<code>property</code> -
the property to search (usually a string)
</dd>
<dd>
<code>value</code> -
the value we want to find (usuall an int or string)
</dd>
</dl>
<dl>
<dt>Returns:</dt>
<dd> the matching node, null if no match</dd>
</dl>
</div>
</div>
<hr />
<h4><a name="getNodesByProperty">getNodesByProperty</a></h4>
<div class="detail">
<code>
Array
<strong>getNodesByProperty</strong>
(&lt;object&gt; property, &lt;object&gt; value)
</code>
<div class="description">
Returns a collection of nodes that have a matching property
and value in the data object that was passed into its constructor.
<dl>
<dt>Parameters:</dt>
<dd>
<code>property</code> -
the property to search (usually a string)
</dd>
<dd>
<code>value</code> -
the value we want to find (usuall an int or string)
</dd>
</dl>
<dl>
<dt>Returns:</dt>
<dd> the matching collection of nodes, null if no match</dd>
</dl>
</div>
</div>
<hr />
<h4><a name="getRoot">getRoot</a></h4>
<div class="detail">
<code>
Node
<strong>getRoot</strong>
()
</code>
<div class="description">
Returns the root node of this tree
<dl>
<dt>Returns:</dt>
<dd> the root node</dd>
</dl>
</div>
</div>
<hr />
<h4><a name="onCollapse">onCollapse</a></h4>
<div class="detail">
<code>
void
<strong>onCollapse</strong>
(node)
</code>
<div class="description">
Abstract method that is executed when a node is collapsed
<dl>
<dt>Parameters:</dt>
<dd>
<code>node</code> -
{Node} the node that was collapsed.
</dd>
</dl>
</div>
</div>
<hr />
<h4><a name="onExpand">onExpand</a></h4>
<div class="detail">
<code>
void
<strong>onExpand</strong>
(node)
</code>
<div class="description">
Abstract method that is executed when a node is expanded
<dl>
<dt>Parameters:</dt>
<dd>
<code>node</code> -
{Node} the node that was expanded
</dd>
</dl>
</div>
</div>
<hr />
<h4><a name="popNode">popNode</a></h4>
<div class="detail">
<code>
void
<strong>popNode</strong>
(node)
</code>
<div class="description">
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.
<dl>
<dt>Parameters:</dt>
<dd>
<code>the</code> -
node to remove
</dd>
</dl>
</div>
</div>
<hr />
<h4><a name="removeChildren">removeChildren</a></h4>
<div class="detail">
<code>
void
<strong>removeChildren</strong>
(&lt;Node&gt; node)
</code>
<div class="description">
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.
<dl>
<dt>Parameters:</dt>
<dd>
<code>node</code> -
the node to purge
</dd>
</dl>
</div>
</div>
<hr />
<h4><a name="removeNode">removeNode</a></h4>
<div class="detail">
<code>
boolean
<strong>removeNode</strong>
(node, &lt;boolean&gt; autoRefresh)
</code>
<div class="description">
Removes the node and its children, and optionally refreshes the
branch of the tree that was affected.
<dl>
<dt>Parameters:</dt>
<dd>
<code>autoRefresh</code> -
automatically refreshes branch if true
</dd>
<dd>
<code>The</code> -
node to remove
</dd>
</dl>
<dl>
<dt>Returns:</dt>
<dd> False is there was a problem, true otherwise.</dd>
</dl>
</div>
</div>
<hr />
<h4><a name="setCollapseAnim">setCollapseAnim</a></h4>
<div class="detail">
<code>
void
<strong>setCollapseAnim</strong>
(type)
</code>
<div class="description">
Sets up the animation for collapsing children
<dl>
<dt>Parameters:</dt>
<dd>
<code>the</code> -
type of animation (acceptable values defined in YAHOO.widget.TVAnim)
</dd>
</dl>
</div>
</div>
<hr />
<h4><a name="setDynamicLoad">setDynamicLoad</a></h4>
<div class="detail">
<code>
void
<strong>setDynamicLoad</strong>
(&lt;function&gt; fnDataLoader, iconMode)
</code>
<div class="description">
Configures this tree to dynamically load all child data
<dl>
<dt>Parameters:</dt>
<dd>
<code>fnDataLoader</code> -
the function that will be called to get the data
</dd>
<dd>
<code>iconMode</code> -
{int} configures 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.
</dd>
</dl>
</div>
</div>
<hr />
<h4><a name="setExpandAnim">setExpandAnim</a></h4>
<div class="detail">
<code>
void
<strong>setExpandAnim</strong>
(type)
</code>
<div class="description">
Sets up the animation for expanding children
<dl>
<dt>Parameters:</dt>
<dd>
<code>the</code> -
type of animation (acceptable values defined in YAHOO.widget.TVAnim)
</dd>
</dl>
</div>
</div>
<hr />
<h4><a name="toString">toString</a></h4>
<div class="detail">
<code>
string
<strong>toString</strong>
()
</code>
<div class="description">
toString
<dl>
<dt>Returns:</dt>
<dd> string representation of the tree</dd>
</dl>
</div>
</div>
<hr />
<h4><a name="addHandler">addHandler</a></h4>
<div class="detail">
<code>
void
<strong>addHandler</strong>
(el, &lt;string&gt; sType, &lt;function&gt; fn, &lt;boolean&gt; capture)
</code>
<div class="description">
Adds an event. Replace with event manager when available
<dl>
<dt>Parameters:</dt>
<dd>
<code>el</code> -
the elment to bind the handler to
</dd>
<dd>
<code>sType</code> -
the type of event handler
</dd>
<dd>
<code>fn</code> -
the callback to invoke
</dd>
<dd>
<code>capture</code> -
if true event is capture phase, bubble otherwise
</dd>
</dl>
</div>
</div>
<hr />
<h4><a name="getNode">getNode</a></h4>
<div class="detail">
<code>
Node
<strong>getNode</strong>
(treeId, nodeIndex)
</code>
<div class="description">
Global method for getting a node by its id. Used in the generated
tree html.
<dl>
<dt>Parameters:</dt>
<dd>
<code>treeId</code> -
{String} the id of the tree instance
</dd>
<dd>
<code>nodeIndex</code> -
{String} the index of the node to return
</dd>
</dl>
<dl>
<dt>Returns:</dt>
<dd> the node instance requested, null if not found</dd>
</dl>
</div>
</div>
<hr />
<h4><a name="getTree">getTree</a></h4>
<div class="detail">
<code>
TreeView
<strong>getTree</strong>
(treeId)
</code>
<div class="description">
Global method for getting a tree by its id. Used in the generated
tree html.
<dl>
<dt>Parameters:</dt>
<dd>
<code>treeId</code> -
{String} the id of the tree instance
</dd>
</dl>
<dl>
<dt>Returns:</dt>
<dd> the tree instance requested, null if not found.</dd>
</dl>
</div>
</div>
<hr />
<h4><a name="preload">preload</a></h4>
<div class="detail">
<code>
void
<strong>preload</strong>
(prefix)
</code>
<div class="description">
Attempts to preload the images defined in the styles used to draw the tree by
rendering off-screen elements that use the styles.
</div>
</div>
<hr />
</div>
</div>
<!-- ============ METHOD DETAIL END ========== -->
</div>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<div id="footer">
<hr />
Copyright &copy; 2004 - 2006 Yahoo! Inc. All rights reserved.
</div>
</body>
</html>