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.grid.FeatureSelectionModel — 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="Widgets" href="../../widgets.html" /> |
---|
25 | <link rel="next" title="GeoExt.tree.BaseLayerContainer" href="../tree/BaseLayerContainer.html" /> |
---|
26 | <link rel="prev" title="GeoExt.form.SearchAction" href="../form/SearchAction.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="../../widgets.html" accesskey="U">Widgets</a> »</li> |
---|
61 | <li><a href="#"><tt class="docutils literal docutils literal"><span class="pre">GeoExt.grid.FeatureSelectionModel</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.grid.FeatureSelectionModel</span></tt></a><ul> |
---|
70 | <li><a class="reference external" href="#example-use">Example Use</a></li> |
---|
71 | <li><a class="reference external" href="#config-options">Config Options</a></li> |
---|
72 | <li><a class="reference external" href="#public-methods">Public Methods</a></li> |
---|
73 | </ul> |
---|
74 | </li> |
---|
75 | </ul> |
---|
76 | |
---|
77 | <h4>Previous topic</h4> |
---|
78 | <p class="topless"><a href="../form/SearchAction.html" |
---|
79 | title="previous chapter"><tt class="docutils literal docutils literal docutils literal"><span class="pre">GeoExt.form.SearchAction</span></tt></a></p> |
---|
80 | <h4>Next topic</h4> |
---|
81 | <p class="topless"><a href="../tree/BaseLayerContainer.html" |
---|
82 | title="next chapter"><tt class="docutils literal"><span class="pre">GeoExt.tree.BaseLayerContainer</span></tt></a></p> |
---|
83 | </div> |
---|
84 | </div> |
---|
85 | |
---|
86 | |
---|
87 | <div class="document"> |
---|
88 | <div class="documentwrapper"> |
---|
89 | <div class="bodywrapper"> |
---|
90 | <div class="body"> |
---|
91 | |
---|
92 | <div class="section" id="geoext-grid-featureselectionmodel"> |
---|
93 | <h1><a title="GeoExt.grid.FeatureSelectionModel" class="reference internal" href="#GeoExt.grid.FeatureSelectionModel"><tt class="xref docutils literal"><span class="pre">GeoExt.grid.FeatureSelectionModel</span></tt></a><a class="headerlink" href="#geoext-grid-featureselectionmodel" title="Permalink to this headline">¶</a></h1> |
---|
94 | <dl class="meta docutils"> |
---|
95 | <dt>Extends</dt> |
---|
96 | <dd><ul class="first last simple"> |
---|
97 | <li><a class="reference external" href="http://dev.sencha.com/deploy/dev/docs/?class=Ext.grid.RowSelectionModel">Ext.grid.RowSelectionModel</a></li> |
---|
98 | </ul> |
---|
99 | </dd> |
---|
100 | </dl> |
---|
101 | <dl class="class"> |
---|
102 | <dt id="GeoExt.grid.FeatureSelectionModel"> |
---|
103 | <em class="property">class </em><tt class="descclassname">GeoExt.grid.</tt><tt class="descname">FeatureSelectionModel</tt><a class="headerlink" href="#GeoExt.grid.FeatureSelectionModel" title="Permalink to this definition">¶</a></dt> |
---|
104 | <dd>A row selection model which enables automatic selection of features |
---|
105 | in the map when rows are selected in the grid and vice-versa.</dd></dl> |
---|
106 | |
---|
107 | <div class="section" id="example-use"> |
---|
108 | <h2>Example Use<a class="headerlink" href="#example-use" title="Permalink to this headline">¶</a></h2> |
---|
109 | <p>Sample code to create a feature grid with a feature selection model:</p> |
---|
110 | <div class="highlight-javascript"><div class="highlight"><pre> <span class="kd">var</span> <span class="nx">gridPanel</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Ext</span><span class="p">.</span><span class="nx">grid</span><span class="p">.</span><span class="nx">GridPanel</span><span class="p">({</span> |
---|
111 | <span class="nx">title</span><span class="o">:</span> <span class="s2">"Feature Grid"</span><span class="p">,</span> |
---|
112 | <span class="nx">region</span><span class="o">:</span> <span class="s2">"east"</span><span class="p">,</span> |
---|
113 | <span class="nx">store</span><span class="o">:</span> <span class="nx">store</span><span class="p">,</span> |
---|
114 | <span class="nx">width</span><span class="o">:</span> <span class="mi">320</span><span class="p">,</span> |
---|
115 | <span class="nx">columns</span><span class="o">:</span> <span class="p">[{</span> |
---|
116 | <span class="nx">header</span><span class="o">:</span> <span class="s2">"Name"</span><span class="p">,</span> |
---|
117 | <span class="nx">width</span><span class="o">:</span> <span class="mi">200</span><span class="p">,</span> |
---|
118 | <span class="nx">dataIndex</span><span class="o">:</span> <span class="s2">"name"</span> |
---|
119 | <span class="p">},</span> <span class="p">{</span> |
---|
120 | <span class="nx">header</span><span class="o">:</span> <span class="s2">"Elevation"</span><span class="p">,</span> |
---|
121 | <span class="nx">width</span><span class="o">:</span> <span class="mi">100</span><span class="p">,</span> |
---|
122 | <span class="nx">dataIndex</span><span class="o">:</span> <span class="s2">"elevation"</span> |
---|
123 | <span class="p">}],</span> |
---|
124 | <span class="nx">sm</span><span class="o">:</span> <span class="k">new</span> <span class="nx">GeoExt</span><span class="p">.</span><span class="nx">grid</span><span class="p">.</span><span class="nx">FeatureSelectionModel</span><span class="p">()</span> |
---|
125 | <span class="p">});</span> |
---|
126 | </pre></div> |
---|
127 | </div> |
---|
128 | </div> |
---|
129 | <div class="section" id="config-options"> |
---|
130 | <h2>Config Options<a class="headerlink" href="#config-options" title="Permalink to this headline">¶</a></h2> |
---|
131 | <p>Configuration properties in addition to |
---|
132 | those listed for <a class="reference external" href="http://dev.sencha.com/deploy/dev/docs/?class=Ext.grid.RowSelectionModel">Ext.grid.RowSelectionModel</a>.</p> |
---|
133 | <dl class="describe"> |
---|
134 | <dt> |
---|
135 | <tt class="descname">autoActivateControl</tt></dt> |
---|
136 | <dd><tt class="docutils literal"><span class="pre">Boolean</span></tt> If true the select feature control is activated and |
---|
137 | deactivated when binding and unbinding. Defaults to true.</dd></dl> |
---|
138 | |
---|
139 | <dl class="describe"> |
---|
140 | <dt> |
---|
141 | <tt class="descname">layer</tt></dt> |
---|
142 | <dd><tt class="docutils literal"><span class="pre">OpenLayers.Layer.Vector</span></tt> The vector layer used for the creation of |
---|
143 | the select feature control, it must already be added to the map. If not |
---|
144 | provided, the layer bound to the grid’s store, if any, will be used.</dd></dl> |
---|
145 | |
---|
146 | <dl class="describe"> |
---|
147 | <dt> |
---|
148 | <tt class="descname">layerFromStore</tt></dt> |
---|
149 | <dd><tt class="docutils literal"><span class="pre">Boolean</span></tt> If true, and if the constructor is passed neither a |
---|
150 | layer nor a select feature control, a select feature control is |
---|
151 | created using the layer found in the grid’s store. Set it to |
---|
152 | false if you want to manually bind the selection model to a |
---|
153 | layer. Defaults to true.</dd></dl> |
---|
154 | |
---|
155 | <dl class="describe"> |
---|
156 | <dt> |
---|
157 | <tt class="descname">selectControl</tt></dt> |
---|
158 | <dd><tt class="docutils literal"><span class="pre">OpenLayers.Control.SelectFeature</span></tt> A select feature control. If not |
---|
159 | provided one will be created. If provided any “layer” config option |
---|
160 | will be ignored, and its “multiple” option will be used to configure |
---|
161 | the selectionModel. If an <tt class="docutils literal"><span class="pre">Object</span></tt> is provided here, it will be |
---|
162 | passed as config to the SelectFeature constructor, and the “layer” |
---|
163 | config option will be used for the layer.</dd></dl> |
---|
164 | |
---|
165 | </div> |
---|
166 | <div class="section" id="public-methods"> |
---|
167 | <h2>Public Methods<a class="headerlink" href="#public-methods" title="Permalink to this headline">¶</a></h2> |
---|
168 | <p>Public methods in addition to those |
---|
169 | listed for <a class="reference external" href="http://dev.sencha.com/deploy/dev/docs/?class=Ext.grid.RowSelectionModel">Ext.grid.RowSelectionModel</a>.</p> |
---|
170 | <dl class="method"> |
---|
171 | <dt id="GeoExt.grid.FeatureSelectionModel.bind"> |
---|
172 | <tt class="descclassname">FeatureSelectionModel.</tt><tt class="descname">bind</tt><big>(</big><big>)</big><a class="headerlink" href="#GeoExt.grid.FeatureSelectionModel.bind" title="Permalink to this definition">¶</a></dt> |
---|
173 | <dd><table class="docutils field-list" frame="void" rules="none"> |
---|
174 | <col class="field-name" /> |
---|
175 | <col class="field-body" /> |
---|
176 | <tbody valign="top"> |
---|
177 | <tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
---|
178 | <li><em>obj</em> – <tt class="docutils literal"><span class="pre">OpenLayers.Layer.Vector</span></tt> or |
---|
179 | <tt class="docutils literal"><span class="pre">OpenLayers.Control.SelectFeature</span></tt> The object this selection model |
---|
180 | should be bound to, either a vector layer or a select feature |
---|
181 | control.</li> |
---|
182 | <li><em>options</em> – <tt class="docutils literal"><span class="pre">Object</span></tt> An object with a “controlConfig” |
---|
183 | property referencing the configuration object to pass to the |
---|
184 | <tt class="docutils literal"><span class="pre">OpenLayers.Control.SelectFeature</span></tt> constructor.</li> |
---|
185 | </ul> |
---|
186 | </td> |
---|
187 | </tr> |
---|
188 | <tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><tt class="docutils literal"><span class="pre">OpenLayers.Control.SelectFeature</span></tt> The select feature |
---|
189 | control this selection model uses.</p> |
---|
190 | </td> |
---|
191 | </tr> |
---|
192 | </tbody> |
---|
193 | </table> |
---|
194 | <p>Bind the selection model to a layer or a SelectFeature control.</p> |
---|
195 | </dd></dl> |
---|
196 | |
---|
197 | <dl class="method"> |
---|
198 | <dt id="GeoExt.grid.FeatureSelectionModel.unbind"> |
---|
199 | <tt class="descclassname">FeatureSelectionModel.</tt><tt class="descname">unbind</tt><big>(</big><big>)</big><a class="headerlink" href="#GeoExt.grid.FeatureSelectionModel.unbind" title="Permalink to this definition">¶</a></dt> |
---|
200 | <dd><table class="docutils field-list" frame="void" rules="none"> |
---|
201 | <col class="field-name" /> |
---|
202 | <col class="field-body" /> |
---|
203 | <tbody valign="top"> |
---|
204 | <tr class="field"><th class="field-name">Returns:</th><td class="field-body"><tt class="docutils literal"><span class="pre">OpenLayers.Control.SelectFeature</span></tt> The select feature |
---|
205 | control this selection model used.</td> |
---|
206 | </tr> |
---|
207 | </tbody> |
---|
208 | </table> |
---|
209 | <p>Unbind the selection model from the layer or SelectFeature control.</p> |
---|
210 | </dd></dl> |
---|
211 | |
---|
212 | </div> |
---|
213 | </div> |
---|
214 | |
---|
215 | |
---|
216 | </div> |
---|
217 | </div> |
---|
218 | </div> |
---|
219 | <div class="clearer"></div> |
---|
220 | </div> |
---|
221 | <div class="related"> |
---|
222 | <h3>Navigation</h3> |
---|
223 | <ul> |
---|
224 | <li class="right" style="margin-right: 10px"> |
---|
225 | <a href="../../../../genindex.html" title="General Index" |
---|
226 | accesskey="I">index</a></li> |
---|
227 | <li class="right" > |
---|
228 | <a href="../../../../modindex.html" title="Global Module Index" |
---|
229 | accesskey="M">modules</a> |</li> |
---|
230 | <li class="right" > |
---|
231 | <a href="../tree/BaseLayerContainer.html" title="GeoExt.tree.BaseLayerContainer" |
---|
232 | accesskey="N">next</a> |</li> |
---|
233 | <li class="right" > |
---|
234 | <a href="../form/SearchAction.html" title="GeoExt.form.SearchAction" |
---|
235 | accesskey="P">previous</a> |</li> |
---|
236 | <li><a href="../../../../index.html">GeoExt</a> »</li> |
---|
237 | <li><a href="../../../index.html" >API Reference</a> »</li> |
---|
238 | <li><a href="../../widgets.html" >Widgets</a> »</li> |
---|
239 | <li><a href="#"><tt class="docutils literal docutils literal"><span class="pre">GeoExt.grid.FeatureSelectionModel</span></tt></a></li> |
---|
240 | </ul> |
---|
241 | </div> |
---|
242 | |
---|
243 | <div class="footer"> |
---|
244 | © Copyright 2009-2010, GeoExt Community. |
---|
245 | </div> |
---|
246 | </body> |
---|
247 | </html> |
---|