|
|
/*This file is part of Ext JS 3.4
Copyright (c) 2011-2013 Sencha Inc
Contact: http://www.sencha.com/contact
GNU General Public License UsageThis file may be used under the terms of the GNU General Public License version 3.0 aspublished by the Free Software Foundation and appearing in the file LICENSE included in thepackaging of this file.
Please review the following information to ensure the GNU General Public License version 3.0requirements will be met: http://www.gnu.org/copyleft/gpl.html.
If you are unsure which license is appropriate for your use, please contact the sales departmentat http://www.sencha.com/contact.
Build date: 2013-04-03 15:07:25*/Ext.data.JsonP.Ext_tree_TreePanel({"alternateClassNames":[],"aliases":{"widget":["treepanel"]},"enum":null,"parentMixins":[],"tagname":"class","subclasses":[],"extends":"Ext.Panel","uses":[],"html":"<div><pre class=\"hierarchy\"><h4>Hierarchy</h4><div class='subclass first-child'><a href='#!/api/Ext.util.Observable' rel='Ext.util.Observable' class='docClass'>Ext.util.Observable</a><div class='subclass '><a href='#!/api/Ext.Component' rel='Ext.Component' class='docClass'>Ext.Component</a><div class='subclass '><a href='#!/api/Ext.BoxComponent' rel='Ext.BoxComponent' class='docClass'>Ext.BoxComponent</a><div class='subclass '><a href='#!/api/Ext.Container' rel='Ext.Container' class='docClass'>Ext.Container</a><div class='subclass '><a href='#!/api/Ext.Panel' rel='Ext.Panel' class='docClass'>Ext.Panel</a><div class='subclass '><strong>Ext.tree.TreePanel</strong></div></div></div></div></div></div><h4>Files</h4><div class='dependency'><a href='source/TreePanel.html#Ext-tree-TreePanel' target='_blank'>TreePanel.js</a></div></pre><div class='doc-contents'><p>The TreePanel provides tree-structured UI representation of tree-structured data.</p>\n\n\n<p><a href=\"#!/api/Ext.tree.TreeNode\" rel=\"Ext.tree.TreeNode\" class=\"docClass\">TreeNode</a>s added to the TreePanel may each contain metadata\nused by your application in their <a href=\"#!/api/Ext.tree.TreeNode-property-attributes\" rel=\"Ext.tree.TreeNode-property-attributes\" class=\"docClass\">attributes</a> property.</p>\n\n\n<p><b>A TreePanel must have a <a href=\"#!/api/Ext.tree.TreePanel-property-root\" rel=\"Ext.tree.TreePanel-property-root\" class=\"docClass\">root</a> node before it is rendered.</b> This may either be\nspecified using the <a href=\"#!/api/Ext.tree.TreePanel-property-root\" rel=\"Ext.tree.TreePanel-property-root\" class=\"docClass\">root</a> config option, or using the <a href=\"#!/api/Ext.tree.TreePanel-method-setRootNode\" rel=\"Ext.tree.TreePanel-method-setRootNode\" class=\"docClass\">setRootNode</a> method.\n<p>An example of tree rendered to an existing div:</p>\n<pre><code>var tree = new <a href=\"#!/api/Ext.tree.TreePanel\" rel=\"Ext.tree.TreePanel\" class=\"docClass\">Ext.tree.TreePanel</a>({\n renderTo: 'tree-div',\n useArrows: true,\n autoScroll: true,\n animate: true,\n enableDD: true,\n containerScroll: true,\n border: false,\n // auto create TreeLoader\n dataUrl: 'get-nodes.php',\n\n root: {\n nodeType: 'async',\n text: 'Ext JS',\n draggable: false,\n id: 'source'\n }\n});\n\ntree.getRootNode().expand();\n</code></pre>\n<p>The example above would work with a data packet similar to this:</p>\n<pre><code>[{\n \"text\": \"adapter\",\n \"id\": \"source\\/adapter\",\n \"cls\": \"folder\"\n}, {\n \"text\": \"dd\",\n \"id\": \"source\\/dd\",\n \"cls\": \"folder\"\n}, {\n \"text\": \"debug.js\",\n \"id\": \"source\\/debug.js\",\n \"leaf\": true,\n \"cls\": \"file\"\n}]\n</code></pre>\n<p>An example of tree within a Viewport:</p>\n<pre><code>new <a href=\"#!/api/Ext.Viewport\" rel=\"Ext.Viewport\" class=\"docClass\">Ext.Viewport</a>({\n layout: 'border',\n items: [{\n region: 'west',\n collapsible: true,\n title: 'Navigation',\n xtype: 'treepanel',\n width: 200,\n autoScroll: true,\n split: true,\n loader: new <a href=\"#!/api/Ext.tree.TreeLoader\" rel=\"Ext.tree.TreeLoader\" class=\"docClass\">Ext.tree.TreeLoader</a>(),\n root: new <a href=\"#!/api/Ext.tree.AsyncTreeNode\" rel=\"Ext.tree.AsyncTreeNode\" class=\"docClass\">Ext.tree.AsyncTreeNode</a>({\n expanded: true,\n children: [{\n text: 'Menu Option 1',\n leaf: true\n }, {\n text: 'Menu Option 2',\n leaf: true\n }, {\n text: 'Menu Option 3',\n leaf: true\n }]\n }),\n rootVisible: false,\n listeners: {\n click: function(n) {\n Ext.Msg.alert('Navig
|