--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=undefined" />
+ <meta name="generator" content="JsDoc Toolkit" />
+
+
+ <title>JsDoc Reference - Roo.data.Tree</title>
+
+
+ <link rel="stylesheet" type="text/css" href="../../css/roojs.css" />
+ <link rel="stylesheet" type="text/css" href="../default.css" />
+
+
+ <script type="text/javascript" src="../page.js">
+
+ </script>
+
+
+ </head>
+
+ <body onload="RooDocsPage.onload();">
+
+
+<div class="body-wrap">
+
+ <!-- ============================== links to methods. ================================= -->
+
+ <div class="top-tools">
+ <!--
+ <a class="inner-link" href="#Roo.data.Tree-props"><img src="resources/s.gif" class="item-icon icon-prop">Properties</a>
+ <a class="inner-link" href="#Roo.data.Tree-methods"><img src="resources/s.gif" class="item-icon icon-method">Methods</a>
+ <a class="inner-link" href="#Roo.data.Tree-events"><img src="resources/s.gif" class="item-icon icon-event">Events</a>
+ <a class="inner-link" href="#Roo.data.Tree-configs"><img src="resources/s.gif" class="item-icon icon-config">Config Options</a>
+ <a class="bookmark" href="NEED_TO_CREATE_DIRECT_LINK_HREF"><img src="resources/s.gif" class="item-icon icon-fav">Direct Link</a>
+ -->
+ </div>
+
+
+<!-- ============================== inheritance Block. ================================= -->
+
+ <div class="inheritance res-block">
+ <pre class="res-block-inner"><a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
+<img src="../../images/default/s.gif" height="1" width="20"/><img class="elbow" src="../../images/default/tree/elbow-end.gif"/>Roo.data.Tree
+
+ </pre>
+ </div>
+
+<!-- ============================== class title / details ============================ -->
+
+
+ <h1 class="classTitle">
+
+ Class Roo.data.Tree
+ </h1>
+
+ <table cellspacing="0" class="class-summary-table">
+
+ <tr><td class="label">Package:</td><td class="hd-info">Roo.data</td></tr>
+
+ <tr><td class="label">Defined In:</td><td class="hd-info">
+
+ <a href="./src/Roo_data_Tree.js.html">Roo/data/Tree.js</a>.
+
+ </td></tr>
+ <tr><td class="label">Class:</td><td class="hd-info">Tree</td></tr>
+
+
+
+
+ <tr><td class="label">Extends:</td><td class="hd-info">
+ <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
+
+ </td></tr>
+
+
+ </table>
+
+
+<!-- ============================== class summary ========================== -->
+ <div class="description">
+ Represents a tree data structure and bubbles all the events for its nodes. The nodes<br/>in the tree have most standard DOM functionality.
+ </div>
+
+
+<!-- ============================== Class comment block... ========================== -->
+
+<div class="comments">
+ <b>Class Comments / Notes</B> =>
+ <u onclick="parent.CommentDialog.showCommentId = 'Roo.data.Tree';">[Add Your comment/notes about this class]</u>
+ <br/>
+ <iframe frameborder="0" id="comments-Roo.data" style="border: none;width:100%;"
+ src="/blog.php/GtkDjsComments/Roo.data.Tree.html"></iframe>
+</div>
+
+
+
+<!-- ============================== config options ========================== -->
+
+
+
+
+ <div class="hr"></div>
+ <a id="Roo.data.Tree-configs"></a>
+
+
+
+ <table cellspacing="0" class="member-table">
+ <caption class="Empty">Config Options - Has None</caption>
+ </table>
+
+
+
+
+
+
+
+
+
+
+
+
+ <!-- ============================== public properties ==================== -->
+
+
+
+ <a id="Roo.data.Tree-props"></a>
+
+
+
+
+
+ <table cellspacing="0" class="member-table">
+ <caption class="Empty">Public Properties - Has None</caption>
+ </table>
+
+
+
+
+ <!-- ============================== methods summary / details ======================== -->
+
+
+ <a id="Roo.data.Tree-methods"></a>
+ <!-- constructor?? -->
+
+ <!-- static's first
+
+
+ -->
+
+ <!-- then dynamics first -->
+
+
+
+
+
+
+ <table cellspacing="0" class="member-table">
+ <caption>Public Methods</caption>
+ <tr>
+ <th class="sig-header" colspan="2">Method</th>
+ <th class="msource-header">Defined By</th>
+
+ </tr>
+
+
+
+
+
+
+
+ <tr class="method-row config-row-alt0 expandable notInherited">
+ <td class="micon"><a class="exi" href="#expand"> </a></td>
+
+
+ <td class="sig">
+ <a id="Roo.data-method-Tree" name=".Tree"></a>
+ <div class="fixedFont">
+ <span class="attributes">new <B>Roo.data.</B></span><b class="itemname">Tree</b>
+
+ (Node <B><i>root</i></B>)
+
+
+
+ </div>
+ <div class="mdesc">
+
+
+ <div class="short">Create a new Roo.data.Tree</div>
+
+
+ <div class="long">
+
+
+
+ Create a new Roo.data.Tree
+
+
+ <dl class="detailList">
+ <dt class="heading">Parameters:</dt>
+
+ <dt>
+ <span class="fixedFont">Node</span> <b>root</b>
+
+ </dt>
+ <dd>(optional) The root node</dd>
+
+ </dl>
+
+
+
+
+
+
+
+
+
+
+
+ </div>
+ </div>
+
+ </td>
+ <td class="msource">
+
+ </td>
+ </tr>
+
+
+ <tr class="method-row config-row-alt1 expandable notInherited">
+ <td class="micon"><a class="exi" href="#expand"> </a></td>
+
+
+ <td class="sig">
+ <a id="Roo.data.Tree-method-getNodeById" name=".getNodeById"></a>
+ <div class="fixedFont">
+ <span class="attributes"></span><b class="itemname">getNodeById</b>
+
+ (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>id</i></B>)
+
+
+ :
+
+
+ Node
+
+
+
+
+
+ </div>
+ <div class="mdesc">
+
+ <div class="short">Gets a node in this tree by its id.</div>
+
+
+
+ <div class="long">
+
+ Gets a node in this tree by its id.
+
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Parameters:</dt>
+
+ <dt>
+ <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>id</b>
+
+ </dt>
+ <dd></dd>
+
+ </dl>
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Returns:</dt>
+
+ <dd><span class="fixedFont">Node</span> </dd>
+
+ </dl>
+
+
+
+
+
+
+
+ </div>
+ </div>
+
+ </td>
+ <td class="msource">
+
+ Roo.data.Tree
+
+ </td>
+ </tr>
+
+
+ <tr class="method-row config-row-alt0 expandable notInherited">
+ <td class="micon"><a class="exi" href="#expand"> </a></td>
+
+
+ <td class="sig">
+ <a id="Roo.data.Tree-method-getRootNode" name=".getRootNode"></a>
+ <div class="fixedFont">
+ <span class="attributes"></span><b class="itemname">getRootNode</b>
+
+ ()
+
+
+ :
+
+
+ Node
+
+
+
+
+
+ </div>
+ <div class="mdesc">
+
+ <div class="short">Returns the root node for this tree.</div>
+
+
+
+ <div class="long">
+
+ Returns the root node for this tree.
+
+
+
+
+
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Returns:</dt>
+
+ <dd><span class="fixedFont">Node</span> </dd>
+
+ </dl>
+
+
+
+
+
+
+
+ </div>
+ </div>
+
+ </td>
+ <td class="msource">
+
+ Roo.data.Tree
+
+ </td>
+ </tr>
+
+
+ <tr class="method-row config-row-alt1 expandable notInherited">
+ <td class="micon"><a class="exi" href="#expand"> </a></td>
+
+
+ <td class="sig">
+ <a id="Roo.data.Tree-method-setRootNode" name=".setRootNode"></a>
+ <div class="fixedFont">
+ <span class="attributes"></span><b class="itemname">setRootNode</b>
+
+ (Node <B><i>node</i></B>)
+
+
+ :
+
+
+ Node
+
+
+
+
+
+ </div>
+ <div class="mdesc">
+
+ <div class="short">Sets the root node for this tree.</div>
+
+
+
+ <div class="long">
+
+ Sets the root node for this tree.
+
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Parameters:</dt>
+
+ <dt>
+ <span class="fixedFont">Node</span> <b>node</b>
+
+ </dt>
+ <dd></dd>
+
+ </dl>
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Returns:</dt>
+
+ <dd><span class="fixedFont">Node</span> </dd>
+
+ </dl>
+
+
+
+
+
+
+
+ </div>
+ </div>
+
+ </td>
+ <td class="msource">
+
+ Roo.data.Tree
+
+ </td>
+ </tr>
+
+
+ </table>
+
+
+ <!-- ============================== events summary / details ======================== -->
+
+
+ <a id="Roo.data.Tree-events"></a>
+
+
+
+
+
+
+
+
+ <table cellspacing="0" class="member-table">
+ <caption>Events</caption>
+ <thead>
+ <tr>
+ <th class="sig-header" colspan="2">Event</th>
+ <th class="msource-header">Defined By</th>
+
+ </tr>
+ </thead>
+
+
+
+
+
+ <tr class="method-row expandable config-row-alt0 notInherited">
+ <td class="micon"><a class="exi" href="#expand"> </a></td>
+
+ <td class="sig">
+ <a id="Roo.data.Tree-event-*append"></a>
+
+ <div class="fixedFont">
+ <b class="itemname">append</b> (Tree <B><i>tree</i></B>, Node <B><i>parent</i></B>, Node <B><i>node</i></B>, <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>index</i></B>)
+
+ </div>
+
+ <div class="mdesc">
+
+ <div class="short">Fires when a new child node is appended to a node in this tree.
+
+ </div>
+
+ <div class="long">
+
+ Fires when a new child node is appended to a node in this tree.
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Parameters:</dt>
+
+ <dt>
+ <span class="fixedFont">Tree</span> <b>tree</b>
+
+ </dt>
+ <dd>The owner tree</dd>
+
+ <dt>
+ <span class="fixedFont">Node</span> <b>parent</b>
+
+ </dt>
+ <dd>The parent node</dd>
+
+ <dt>
+ <span class="fixedFont">Node</span> <b>node</b>
+
+ </dt>
+ <dd>The newly appended node</dd>
+
+ <dt>
+ <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>index</b>
+
+ </dt>
+ <dd>The index of the newly appended node</dd>
+
+ </dl>
+
+
+
+
+
+
+
+
+
+
+
+ </div>
+ </div>
+
+ </td>
+ <td class="msource">
+ Roo.data.Tree
+ </td>
+ </tr>
+
+ <tr class="method-row expandable config-row-alt1 notInherited">
+ <td class="micon"><a class="exi" href="#expand"> </a></td>
+
+ <td class="sig">
+ <a id="Roo.data.Tree-event-*beforeappend"></a>
+
+ <div class="fixedFont">
+ <b class="itemname">beforeappend</b> (Tree <B><i>tree</i></B>, Node <B><i>parent</i></B>, Node <B><i>node</i></B>)
+
+ </div>
+
+ <div class="mdesc">
+
+ <div class="short">Fires before a new child is appended to a node in this tree, return false to cancel the append.
+
+ </div>
+
+ <div class="long">
+
+ Fires before a new child is appended to a node in this tree, return false to cancel the append.
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Parameters:</dt>
+
+ <dt>
+ <span class="fixedFont">Tree</span> <b>tree</b>
+
+ </dt>
+ <dd>The owner tree</dd>
+
+ <dt>
+ <span class="fixedFont">Node</span> <b>parent</b>
+
+ </dt>
+ <dd>The parent node</dd>
+
+ <dt>
+ <span class="fixedFont">Node</span> <b>node</b>
+
+ </dt>
+ <dd>The child node to be appended</dd>
+
+ </dl>
+
+
+
+
+
+
+
+
+
+
+
+ </div>
+ </div>
+
+ </td>
+ <td class="msource">
+ Roo.data.Tree
+ </td>
+ </tr>
+
+ <tr class="method-row expandable config-row-alt0 notInherited">
+ <td class="micon"><a class="exi" href="#expand"> </a></td>
+
+ <td class="sig">
+ <a id="Roo.data.Tree-event-*beforeinsert"></a>
+
+ <div class="fixedFont">
+ <b class="itemname">beforeinsert</b> (Tree <B><i>tree</i></B>, Node <B><i>parent</i></B>, Node <B><i>node</i></B>, Node <B><i>refNode</i></B>)
+
+ </div>
+
+ <div class="mdesc">
+
+ <div class="short">Fires before a new child is inserted in a node in this tree, return false to cancel the insert.
+
+ </div>
+
+ <div class="long">
+
+ Fires before a new child is inserted in a node in this tree, return false to cancel the insert.
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Parameters:</dt>
+
+ <dt>
+ <span class="fixedFont">Tree</span> <b>tree</b>
+
+ </dt>
+ <dd>The owner tree</dd>
+
+ <dt>
+ <span class="fixedFont">Node</span> <b>parent</b>
+
+ </dt>
+ <dd>The parent node</dd>
+
+ <dt>
+ <span class="fixedFont">Node</span> <b>node</b>
+
+ </dt>
+ <dd>The child node to be inserted</dd>
+
+ <dt>
+ <span class="fixedFont">Node</span> <b>refNode</b>
+
+ </dt>
+ <dd>The child node the node is being inserted before</dd>
+
+ </dl>
+
+
+
+
+
+
+
+
+
+
+
+ </div>
+ </div>
+
+ </td>
+ <td class="msource">
+ Roo.data.Tree
+ </td>
+ </tr>
+
+ <tr class="method-row expandable config-row-alt1 notInherited">
+ <td class="micon"><a class="exi" href="#expand"> </a></td>
+
+ <td class="sig">
+ <a id="Roo.data.Tree-event-*beforemove"></a>
+
+ <div class="fixedFont">
+ <b class="itemname">beforemove</b> (Tree <B><i>tree</i></B>, Node <B><i>node</i></B>, Node <B><i>oldParent</i></B>, Node <B><i>newParent</i></B>, <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>index</i></B>)
+
+ </div>
+
+ <div class="mdesc">
+
+ <div class="short">Fires before a node is moved to a new location in the tree.
+
+ </div>
+
+ <div class="long">
+
+ Fires before a node is moved to a new location in the tree. Return false to cancel the move.
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Parameters:</dt>
+
+ <dt>
+ <span class="fixedFont">Tree</span> <b>tree</b>
+
+ </dt>
+ <dd>The owner tree</dd>
+
+ <dt>
+ <span class="fixedFont">Node</span> <b>node</b>
+
+ </dt>
+ <dd>The node being moved</dd>
+
+ <dt>
+ <span class="fixedFont">Node</span> <b>oldParent</b>
+
+ </dt>
+ <dd>The parent of the node</dd>
+
+ <dt>
+ <span class="fixedFont">Node</span> <b>newParent</b>
+
+ </dt>
+ <dd>The new parent the node is moving to</dd>
+
+ <dt>
+ <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>index</b>
+
+ </dt>
+ <dd>The index it is being moved to</dd>
+
+ </dl>
+
+
+
+
+
+
+
+
+
+
+
+ </div>
+ </div>
+
+ </td>
+ <td class="msource">
+ Roo.data.Tree
+ </td>
+ </tr>
+
+ <tr class="method-row expandable config-row-alt0 notInherited">
+ <td class="micon"><a class="exi" href="#expand"> </a></td>
+
+ <td class="sig">
+ <a id="Roo.data.Tree-event-*beforeremove"></a>
+
+ <div class="fixedFont">
+ <b class="itemname">beforeremove</b> (Tree <B><i>tree</i></B>, Node <B><i>parent</i></B>, Node <B><i>node</i></B>)
+
+ </div>
+
+ <div class="mdesc">
+
+ <div class="short">Fires before a child is removed from a node in this tree, return false to cancel the remove.
+
+ </div>
+
+ <div class="long">
+
+ Fires before a child is removed from a node in this tree, return false to cancel the remove.
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Parameters:</dt>
+
+ <dt>
+ <span class="fixedFont">Tree</span> <b>tree</b>
+
+ </dt>
+ <dd>The owner tree</dd>
+
+ <dt>
+ <span class="fixedFont">Node</span> <b>parent</b>
+
+ </dt>
+ <dd>The parent node</dd>
+
+ <dt>
+ <span class="fixedFont">Node</span> <b>node</b>
+
+ </dt>
+ <dd>The child node to be removed</dd>
+
+ </dl>
+
+
+
+
+
+
+
+
+
+
+
+ </div>
+ </div>
+
+ </td>
+ <td class="msource">
+ Roo.data.Tree
+ </td>
+ </tr>
+
+ <tr class="method-row expandable config-row-alt1 notInherited">
+ <td class="micon"><a class="exi" href="#expand"> </a></td>
+
+ <td class="sig">
+ <a id="Roo.data.Tree-event-*insert"></a>
+
+ <div class="fixedFont">
+ <b class="itemname">insert</b> (Tree <B><i>tree</i></B>, Node <B><i>parent</i></B>, Node <B><i>node</i></B>, Node <B><i>refNode</i></B>)
+
+ </div>
+
+ <div class="mdesc">
+
+ <div class="short">Fires when a new child node is inserted in a node in this tree.
+
+ </div>
+
+ <div class="long">
+
+ Fires when a new child node is inserted in a node in this tree.
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Parameters:</dt>
+
+ <dt>
+ <span class="fixedFont">Tree</span> <b>tree</b>
+
+ </dt>
+ <dd>The owner tree</dd>
+
+ <dt>
+ <span class="fixedFont">Node</span> <b>parent</b>
+
+ </dt>
+ <dd>The parent node</dd>
+
+ <dt>
+ <span class="fixedFont">Node</span> <b>node</b>
+
+ </dt>
+ <dd>The child node inserted</dd>
+
+ <dt>
+ <span class="fixedFont">Node</span> <b>refNode</b>
+
+ </dt>
+ <dd>The child node the node was inserted before</dd>
+
+ </dl>
+
+
+
+
+
+
+
+
+
+
+
+ </div>
+ </div>
+
+ </td>
+ <td class="msource">
+ Roo.data.Tree
+ </td>
+ </tr>
+
+ <tr class="method-row expandable config-row-alt0 notInherited">
+ <td class="micon"><a class="exi" href="#expand"> </a></td>
+
+ <td class="sig">
+ <a id="Roo.data.Tree-event-*move"></a>
+
+ <div class="fixedFont">
+ <b class="itemname">move</b> (Tree <B><i>tree</i></B>, Node <B><i>node</i></B>, Node <B><i>oldParent</i></B>, Node <B><i>newParent</i></B>, <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>index</i></B>)
+
+ </div>
+
+ <div class="mdesc">
+
+ <div class="short">Fires when a node is moved to a new location in the tree
+
+ </div>
+
+ <div class="long">
+
+ Fires when a node is moved to a new location in the tree
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Parameters:</dt>
+
+ <dt>
+ <span class="fixedFont">Tree</span> <b>tree</b>
+
+ </dt>
+ <dd>The owner tree</dd>
+
+ <dt>
+ <span class="fixedFont">Node</span> <b>node</b>
+
+ </dt>
+ <dd>The node moved</dd>
+
+ <dt>
+ <span class="fixedFont">Node</span> <b>oldParent</b>
+
+ </dt>
+ <dd>The old parent of this node</dd>
+
+ <dt>
+ <span class="fixedFont">Node</span> <b>newParent</b>
+
+ </dt>
+ <dd>The new parent of this node</dd>
+
+ <dt>
+ <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>index</b>
+
+ </dt>
+ <dd>The index it was moved to</dd>
+
+ </dl>
+
+
+
+
+
+
+
+
+
+
+
+ </div>
+ </div>
+
+ </td>
+ <td class="msource">
+ Roo.data.Tree
+ </td>
+ </tr>
+
+ <tr class="method-row expandable config-row-alt1 notInherited">
+ <td class="micon"><a class="exi" href="#expand"> </a></td>
+
+ <td class="sig">
+ <a id="Roo.data.Tree-event-*remove"></a>
+
+ <div class="fixedFont">
+ <b class="itemname">remove</b> (Tree <B><i>tree</i></B>, Node <B><i>parent</i></B>, Node <B><i>node</i></B>)
+
+ </div>
+
+ <div class="mdesc">
+
+ <div class="short">Fires when a child node is removed from a node in this tree.
+
+ </div>
+
+ <div class="long">
+
+ Fires when a child node is removed from a node in this tree.
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Parameters:</dt>
+
+ <dt>
+ <span class="fixedFont">Tree</span> <b>tree</b>
+
+ </dt>
+ <dd>The owner tree</dd>
+
+ <dt>
+ <span class="fixedFont">Node</span> <b>parent</b>
+
+ </dt>
+ <dd>The parent node</dd>
+
+ <dt>
+ <span class="fixedFont">Node</span> <b>node</b>
+
+ </dt>
+ <dd>The child node removed</dd>
+
+ </dl>
+
+
+
+
+
+
+
+
+
+
+
+ </div>
+ </div>
+
+ </td>
+ <td class="msource">
+ Roo.data.Tree
+ </td>
+ </tr>
+
+
+ </table>
+
+
+
+
+
+<!-- ============================== footer ================================= -->
+ <div class="fineprint" style="clear:both">
+
+ Documentation generated by <a href="http://www.akbkhome.com" target="_blankt">Introspection Doc Generator</a> on Fri Jul 16 2010 15:55:25 GMT+0800 (HKT)
+ Based on
+ <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a>
+ </div>
+ </body>
+</html>