[76] | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
---|
| 2 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
---|
| 3 | |
---|
| 4 | <html xmlns="http://www.w3.org/1999/xhtml"> |
---|
| 5 | <head> |
---|
| 6 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
---|
| 7 | |
---|
| 8 | <title>GeoExt.plugins.TreeNodeComponent — GeoExt v1.0</title> |
---|
| 9 | <link rel="stylesheet" href="../../../_static/geoext.css" type="text/css" /> |
---|
| 10 | <link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" /> |
---|
| 11 | <script type="text/javascript"> |
---|
| 12 | var DOCUMENTATION_OPTIONS = { |
---|
| 13 | URL_ROOT: '../../../', |
---|
| 14 | VERSION: '1.0', |
---|
| 15 | COLLAPSE_MODINDEX: false, |
---|
| 16 | FILE_SUFFIX: '.html', |
---|
| 17 | HAS_SOURCE: true |
---|
| 18 | }; |
---|
| 19 | </script> |
---|
| 20 | <script type="text/javascript" src="../../../_static/jquery.js"></script> |
---|
| 21 | <script type="text/javascript" src="../../../_static/doctools.js"></script> |
---|
| 22 | <link rel="shortcut icon" href="../../../_static/favicon.ico"/> |
---|
| 23 | <link rel="top" title="GeoExt v1.0" href="../../../index.html" /> |
---|
| 24 | <link rel="up" title="GeoExt.plugins" href="../plugins.html" /> |
---|
| 25 | <link rel="next" title="GeoExt.plugins.TreeNodeRadioButton" href="TreeNodeRadioButton.html" /> |
---|
| 26 | <link rel="prev" title="GeoExt.plugins.PrintProviderField" href="PrintProviderField.html" /> |
---|
| 27 | |
---|
| 28 | |
---|
| 29 | |
---|
| 30 | |
---|
| 31 | |
---|
| 32 | |
---|
| 33 | </head> |
---|
| 34 | <body> |
---|
| 35 | <div class="header"> |
---|
| 36 | <div class="wrap"> |
---|
| 37 | <h1 id="logo"><a href="../../../index.html">GeoExt</a></h1> |
---|
| 38 | <ul id="top-nav"> |
---|
| 39 | <li class="first"><a href="../../../docs.html">Documentation</a></li> |
---|
| 40 | <li><a href="../../../examples.html">Examples</a></li> |
---|
| 41 | <li><a href="../../../downloads.html">Download</a></li> |
---|
| 42 | <li><a href="http://trac.geoext.org/">Development</a></li> |
---|
| 43 | </ul> |
---|
| 44 | <div id="searchbox"> |
---|
| 45 | <form class="search" action="../../../search.html" method="get"> |
---|
| 46 | <input id="searchbox-query" type="text" name="q" size="25" value="Search …" tabindex="3" onblur="if(this.value=='') this.value='Search …';" onfocus="if(this.value=='Search …') this.value='';" /> |
---|
| 47 | <input id="searchbox-submit" type="image" value="Search" src="../../../_static/img/search_icon_green.png" /> |
---|
| 48 | <input type="hidden" name="check_keywords" value="yes" /> |
---|
| 49 | <input type="hidden" name="area" value="default" /> |
---|
| 50 | </form> |
---|
| 51 | </div> |
---|
| 52 | </div> |
---|
| 53 | </div> |
---|
| 54 | |
---|
| 55 | <div class="related"> |
---|
| 56 | <h3>Navigation</h3> |
---|
| 57 | <ul> |
---|
| 58 | <li><a href="../../../index.html">GeoExt</a> »</li> |
---|
| 59 | <li><a href="../../index.html" >API Reference</a> »</li> |
---|
| 60 | <li><a href="../plugins.html" accesskey="U"><tt class="docutils literal docutils literal docutils literal docutils literal docutils literal docutils literal docutils literal docutils literal"><span class="pre">GeoExt.plugins</span></tt></a> »</li> |
---|
| 61 | <li><a href="#"><tt class="docutils literal docutils literal"><span class="pre">GeoExt.plugins.TreeNodeComponent</span></tt></a></li> |
---|
| 62 | </ul> |
---|
| 63 | </div> |
---|
| 64 | |
---|
| 65 | <div class="sphinxsidebar"> |
---|
| 66 | <div class="sphinxsidebarwrapper"> |
---|
| 67 | <h3><a href="../../../index.html">Table Of Contents</a></h3> |
---|
| 68 | <ul> |
---|
| 69 | <li><a class="reference external" href="#"><tt class="docutils literal"><span class="pre">GeoExt.plugins.TreeNodeComponent</span></tt></a><ul> |
---|
| 70 | <li><a class="reference external" href="#example-use">Example Use</a></li> |
---|
| 71 | </ul> |
---|
| 72 | </li> |
---|
| 73 | </ul> |
---|
| 74 | |
---|
| 75 | <h4>Previous topic</h4> |
---|
| 76 | <p class="topless"><a href="PrintProviderField.html" |
---|
| 77 | title="previous chapter"><tt class="docutils literal docutils literal docutils literal"><span class="pre">GeoExt.plugins.PrintProviderField</span></tt></a></p> |
---|
| 78 | <h4>Next topic</h4> |
---|
| 79 | <p class="topless"><a href="TreeNodeRadioButton.html" |
---|
| 80 | title="next chapter"><tt class="docutils literal"><span class="pre">GeoExt.plugins.TreeNodeRadioButton</span></tt></a></p> |
---|
| 81 | </div> |
---|
| 82 | </div> |
---|
| 83 | |
---|
| 84 | |
---|
| 85 | <div class="document"> |
---|
| 86 | <div class="documentwrapper"> |
---|
| 87 | <div class="bodywrapper"> |
---|
| 88 | <div class="body"> |
---|
| 89 | |
---|
| 90 | <div class="section" id="geoext-plugins-treenodecomponent"> |
---|
| 91 | <h1><tt class="xref docutils literal"><span class="pre">GeoExt.plugins.TreeNodeComponent</span></tt><a class="headerlink" href="#geoext-plugins-treenodecomponent" title="Permalink to this headline">¶</a></h1> |
---|
| 92 | <dl class="meta docutils"> |
---|
| 93 | <dt>ptype</dt> |
---|
| 94 | <dd><tt class="docutils literal"><span class="pre">gx_TreeNodeComponent</span></tt></dd> |
---|
| 95 | </dl> |
---|
| 96 | <p>A plugin to create tree node UIs that can have an Ext.Component below the |
---|
| 97 | node’s title. Can be plugged into any <tt class="docutils literal"><span class="pre">Ext.tree.TreePanel</span></tt> and will be |
---|
| 98 | applied to nodes that are extended with the |
---|
| 99 | <tt class="xref docutils literal"><span class="pre">GeoExt.Tree.TreeNodeUIEventMixin</span></tt>.</p> |
---|
| 100 | <p>If a node is configured with a <tt class="docutils literal"><span class="pre">component</span></tt> attribute, it will be rendered |
---|
| 101 | with the component in addition to icon and title.</p> |
---|
| 102 | <div class="section" id="example-use"> |
---|
| 103 | <h2>Example Use<a class="headerlink" href="#example-use" title="Permalink to this headline">¶</a></h2> |
---|
| 104 | <p>Sample code to create a tree with a node that has a component:</p> |
---|
| 105 | <div class="highlight-javascript"><div class="highlight"><pre><span class="kd">var</span> <span class="nx">uiClass</span> <span class="o">=</span> <span class="nx">Ext</span><span class="p">.</span><span class="nx">extend</span><span class="p">(</span> |
---|
| 106 | <span class="nx">Ext</span><span class="p">.</span><span class="nx">tree</span><span class="p">.</span><span class="nx">TreeNodeUI</span><span class="p">,</span> |
---|
| 107 | <span class="nx">GeoExt</span><span class="p">.</span><span class="nx">tree</span><span class="p">.</span><span class="nx">TreeNodeUIEventMixin</span> |
---|
| 108 | <span class="p">);</span> |
---|
| 109 | <span class="kd">var</span> <span class="nx">tree</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Ext</span><span class="p">.</span><span class="nx">tree</span><span class="p">.</span><span class="nx">TreePanel</span><span class="p">({</span> |
---|
| 110 | <span class="nx">plugins</span><span class="o">:</span> <span class="p">[</span> |
---|
| 111 | <span class="k">new</span> <span class="nx">GeoExt</span><span class="p">.</span><span class="nx">plugins</span><span class="p">.</span><span class="nx">TreeNodeRadioButton</span><span class="p">({</span> |
---|
| 112 | <span class="nx">listeners</span><span class="o">:</span> <span class="p">{</span> |
---|
| 113 | <span class="s2">"radiochange"</span><span class="o">:</span> <span class="kd">function</span><span class="p">(</span><span class="nx">node</span><span class="p">)</span> <span class="p">{</span> |
---|
| 114 | <span class="nx">alert</span><span class="p">(</span><span class="nx">node</span><span class="p">.</span><span class="nx">text</span> <span class="o">+</span> <span class="s2">"'s radio button was clicked."</span><span class="p">);</span> |
---|
| 115 | <span class="p">}</span> |
---|
| 116 | <span class="p">}</span> |
---|
| 117 | <span class="p">})</span> |
---|
| 118 | <span class="p">],</span> |
---|
| 119 | <span class="nx">root</span><span class="o">:</span> <span class="p">{</span> |
---|
| 120 | <span class="nx">nodeType</span><span class="o">:</span> <span class="s2">"node"</span><span class="p">,</span> |
---|
| 121 | <span class="nx">uiProvider</span><span class="o">:</span> <span class="nx">uiClass</span><span class="p">,</span> |
---|
| 122 | <span class="nx">text</span><span class="o">:</span> <span class="s2">"My Node"</span><span class="p">,</span> |
---|
| 123 | <span class="nx">component</span><span class="o">:</span> <span class="p">{</span> |
---|
| 124 | <span class="nx">xtype</span><span class="o">:</span> <span class="s2">"box"</span><span class="p">,</span> |
---|
| 125 | <span class="nx">autoEl</span><span class="o">:</span> <span class="p">{</span> |
---|
| 126 | <span class="nx">tag</span><span class="o">:</span> <span class="s2">"img"</span><span class="p">,</span> |
---|
| 127 | <span class="nx">src</span><span class="o">:</span> <span class="s2">"/images/my-image.jpg"</span> |
---|
| 128 | <span class="p">}</span> |
---|
| 129 | <span class="p">}</span> |
---|
| 130 | <span class="p">}</span> |
---|
| 131 | <span class="p">}</span> |
---|
| 132 | </pre></div> |
---|
| 133 | </div> |
---|
| 134 | <p>Sample code to create a layer node UI with a radio button:</p> |
---|
| 135 | <div class="highlight-javascript"><div class="highlight"><pre><span class="kd">var</span> <span class="nx">uiClass</span> <span class="o">=</span> <span class="nx">Ext</span><span class="p">.</span><span class="nx">extend</span><span class="p">(</span> |
---|
| 136 | <span class="nx">GeoExt</span><span class="p">.</span><span class="nx">tree</span><span class="p">.</span><span class="nx">LayerNodeUI</span><span class="p">,</span> |
---|
| 137 | <span class="k">new</span> <span class="nx">GeoExt</span><span class="p">.</span><span class="nx">tree</span><span class="p">.</span><span class="nx">TreeNodeUIEventMixin</span> |
---|
| 138 | <span class="p">);</span> |
---|
| 139 | </pre></div> |
---|
| 140 | </div> |
---|
| 141 | </div> |
---|
| 142 | </div> |
---|
| 143 | |
---|
| 144 | |
---|
| 145 | </div> |
---|
| 146 | </div> |
---|
| 147 | </div> |
---|
| 148 | <div class="clearer"></div> |
---|
| 149 | </div> |
---|
| 150 | <div class="related"> |
---|
| 151 | <h3>Navigation</h3> |
---|
| 152 | <ul> |
---|
| 153 | <li class="right" style="margin-right: 10px"> |
---|
| 154 | <a href="../../../genindex.html" title="General Index" |
---|
| 155 | accesskey="I">index</a></li> |
---|
| 156 | <li class="right" > |
---|
| 157 | <a href="../../../modindex.html" title="Global Module Index" |
---|
| 158 | accesskey="M">modules</a> |</li> |
---|
| 159 | <li class="right" > |
---|
| 160 | <a href="TreeNodeRadioButton.html" title="GeoExt.plugins.TreeNodeRadioButton" |
---|
| 161 | accesskey="N">next</a> |</li> |
---|
| 162 | <li class="right" > |
---|
| 163 | <a href="PrintProviderField.html" title="GeoExt.plugins.PrintProviderField" |
---|
| 164 | accesskey="P">previous</a> |</li> |
---|
| 165 | <li><a href="../../../index.html">GeoExt</a> »</li> |
---|
| 166 | <li><a href="../../index.html" >API Reference</a> »</li> |
---|
| 167 | <li><a href="../plugins.html" ><tt class="docutils literal docutils literal docutils literal docutils literal docutils literal docutils literal docutils literal docutils literal"><span class="pre">GeoExt.plugins</span></tt></a> »</li> |
---|
| 168 | <li><a href="#"><tt class="docutils literal docutils literal"><span class="pre">GeoExt.plugins.TreeNodeComponent</span></tt></a></li> |
---|
| 169 | </ul> |
---|
| 170 | </div> |
---|
| 171 | |
---|
| 172 | <div class="footer"> |
---|
| 173 | © Copyright 2009-2010, GeoExt Community. |
---|
| 174 | </div> |
---|
| 175 | </body> |
---|
| 176 | </html> |
---|