1 <div class="body-wrap">
2 <div class="top-tools">
3 <a class="inner-link" href="#Ext.tree.MultiSelectionModel-props"><img src="../resources/images/default/s.gif" class="item-icon icon-prop">Properties</a>
4 <a class="inner-link" href="#Ext.tree.MultiSelectionModel-methods"><img src="../resources/images/default/s.gif" class="item-icon icon-method">Methods</a>
5 <a class="inner-link" href="#Ext.tree.MultiSelectionModel-events"><img src="../resources/images/default/s.gif" class="item-icon icon-event">Events</a>
6 <a class="inner-link" href="#Ext.tree.MultiSelectionModel-configs"><img src="../resources/images/default/s.gif" class="item-icon icon-config">Config Options</a>
7 <a class="bookmark" href="../docs/?class=Ext.tree.MultiSelectionModel"><img src="../resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a>
9 <div class="inheritance res-block">
10 <pre class="res-block-inner"><a ext:cls="Ext.util.Observable" ext:member="" href="output/Ext.util.Observable.html">Observable</a>
11 <img src="resources/elbow-end.gif"/>MultiSelectionModel</pre></div>
12 <h1>Class Ext.tree.MultiSelectionModel</h1>
13 <table cellspacing="0">
14 <tr><td class="label">Package:</td><td class="hd-info">Ext.tree</td></tr>
15 <tr><td class="label">Defined In:</td><td class="hd-info"><a href="../src/TreeSelectionModel.js" target="_blank">TreeSelectionModel.js</a></td></tr>
16 <tr><td class="label">Class:</td><td class="hd-info">MultiSelectionModel</td></tr>
17 <tr><td class="label">Extends:</td><td class="hd-info"><a ext:cls="Ext.util.Observable" ext:member="" href="output/Ext.util.Observable.html">Observable</a></td></tr>
19 <div class="description">
20 Multi selection for a TreePanel. </div>
22 <div class="hr"></div>
23 <a id="Ext.tree.MultiSelectionModel-configs"></a>
24 <h2>Config Options</h2>
25 <table cellspacing="0" class="member-table">
27 <th class="sig-header" colspan="2">Config Options</th>
28 <th class="msource-header">Defined By</th>
30 <tr class="config-row inherited expandable">
\r
31 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
33 <a id="Ext.tree.MultiSelectionModel-listeners"></a>
\r
34 <b>listeners</b> : Object <div class="mdesc">
\r
35 <div class="short">(optional) A config object containing one or more event handlers to be added to this object during initialization. Th...</div>
\r
37 (optional) A config object containing one or more event handlers to be added to this object during initialization. This should be a valid listeners config object as specified in the <a ext:cls="Ext.util.Observable" ext:member="addListener" href="output/Ext.util.Observable.html#addListener">addListener</a> example for attaching multiple handlers at once. </div>
\r
40 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#listeners" href="output/Ext.util.Observable.html#listeners">Observable</a></td>
\r
43 <a id="Ext.tree.MultiSelectionModel-props"></a>
44 <h2>Public Properties</h2>
45 <div class="no-members">This class has no public properties.</div> <a id="Ext.tree.MultiSelectionModel-methods"></a>
46 <h2>Public Methods</h2>
47 <table cellspacing="0" class="member-table">
49 <th class="sig-header" colspan="2">Method</th>
50 <th class="msource-header">Defined By</th>
52 <tr class="method-row inherited expandable">
\r
53 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
55 <a id="Ext.tree.MultiSelectionModel-addEvents"></a>
\r
56 <b>addEvents</b>( <code>Object object</code> ) : void <div class="mdesc">
\r
57 <div class="short">Used to define events on this Observable</div>
\r
59 Used to define events on this Observable <div class="mdetail-params">
\r
60 <strong>Parameters:</strong>
\r
61 <ul><li><code>object</code> : Object<div class="sub-desc">The object with the events defined</div></li> </ul>
\r
62 <strong>Returns:</strong>
\r
64 <li><code>void</code></li>
\r
70 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#addEvents" href="output/Ext.util.Observable.html#addEvents">Observable</a></td>
\r
72 <tr class="method-row inherited alt expandable">
\r
73 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
75 <a id="Ext.tree.MultiSelectionModel-addListener"></a>
\r
76 <b>addListener</b>( <code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>, <span class="optional" title="Optional">[<code>Object options</code>]</span> ) : void <div class="mdesc">
\r
77 <div class="short">Appends an event handler to this component</div>
\r
79 Appends an event handler to this component <div class="mdetail-params">
\r
80 <strong>Parameters:</strong>
\r
81 <ul><li><code>eventName</code> : String<div class="sub-desc">The type of event to listen for</div></li><li><code>handler</code> : Function<div class="sub-desc">The method the event invokes</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope in which to execute the handler
82 function. The handler function's "this" context.</div></li><li><code>options</code> : Object<div class="sub-desc">(optional) An object containing handler configuration
83 properties. This may contain any of the following properties:<ul>
84 <li><b>scope</b> : Object<p class="sub-desc">The scope in which to execute the handler function. The handler function's "this" context.</p></li>
85 <li><b>delay</b> : Number<p class="sub-desc">The number of milliseconds to delay the invocation of the handler after the event fires.</p></li>
86 <li><b>single</b> : Boolean<p class="sub-desc">True to add a handler to handle just the next firing of the event, and then remove itself.</p></li>
87 <li><b>buffer</b> : Number<p class="sub-desc">Causes the handler to be scheduled to run in an <a ext:cls="Ext.util.DelayedTask" href="output/Ext.util.DelayedTask.html">Ext.util.DelayedTask</a> delayed
88 by the specified number of milliseconds. If the event fires again within that time, the original
89 handler is <em>not</em> invoked, but the new handler is scheduled in its place.</p></li>
92 <b>Combining Options</b><br>
93 Using the options argument, it is possible to combine different types of listeners:<br>
95 A normalized, delayed, one-time listener that auto stops the event and passes a custom argument (forumId)
96 <pre><code>el.on(<em>'click'</em>, <b>this</b>.onClick, <b>this</b>, {
102 <b>Attaching multiple handlers in 1 call</b><br>
103 The method also allows for a single argument to be passed which is a config object containing properties
104 which specify multiple handlers.
108 fn: <b>this</b>.onClick,
112 <em>'mouseover'</em> : {
113 fn: <b>this</b>.onMouseOver,
116 <em>'mouseout'</em> : {
117 fn: <b>this</b>.onMouseOut,
122 Or a shorthand syntax:<br>
124 <em>'click'</em> : <b>this</b>.onClick,
125 <em>'mouseover'</em> : <b>this</b>.onMouseOver,
126 <em>'mouseout'</em> : <b>this</b>.onMouseOut,
128 });</code></pre></div></li> </ul>
\r
129 <strong>Returns:</strong>
\r
131 <li><code>void</code></li>
\r
137 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#addListener" href="output/Ext.util.Observable.html#addListener">Observable</a></td>
\r
139 <tr class="method-row expandable">
\r
140 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
142 <a id="Ext.tree.MultiSelectionModel-clearSelections"></a>
\r
143 <b>clearSelections</b>() : void <div class="mdesc">
\r
144 <div class="short">Clear all selections</div>
\r
146 Clear all selections <div class="mdetail-params">
\r
147 <strong>Parameters:</strong>
\r
148 <ul><li>None.</li> </ul>
\r
149 <strong>Returns:</strong>
\r
151 <li><code>void</code></li>
\r
157 <td class="msource">MultiSelectionModel</td>
\r
159 <tr class="method-row inherited alt expandable">
\r
160 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
162 <a id="Ext.tree.MultiSelectionModel-fireEvent"></a>
\r
163 <b>fireEvent</b>( <code>String eventName</code>, <code>Object... args</code> ) : Boolean <div class="mdesc">
\r
164 <div class="short">Fires the specified event with the passed parameters (minus the event name).</div>
\r
166 Fires the specified event with the passed parameters (minus the event name). <div class="mdetail-params">
\r
167 <strong>Parameters:</strong>
\r
168 <ul><li><code>eventName</code> : String<div class="sub-desc"></div></li><li><code>args</code> : Object...<div class="sub-desc">Variable number of parameters are passed to handlers</div></li> </ul>
\r
169 <strong>Returns:</strong>
\r
171 <li><code>Boolean</code><div class="sub-desc">returns false if any of the handlers return false otherwise it returns true</div></li>
\r
177 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#fireEvent" href="output/Ext.util.Observable.html#fireEvent">Observable</a></td>
\r
179 <tr class="method-row expandable">
\r
180 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
182 <a id="Ext.tree.MultiSelectionModel-getSelectedNodes"></a>
\r
183 <b>getSelectedNodes</b>() : Array <div class="mdesc">
\r
184 <div class="short">Returns an array of the selected nodes</div>
\r
186 Returns an array of the selected nodes <div class="mdetail-params">
\r
187 <strong>Parameters:</strong>
\r
188 <ul><li>None.</li> </ul>
\r
189 <strong>Returns:</strong>
\r
191 <li><code>Array</code></li>
\r
197 <td class="msource">MultiSelectionModel</td>
\r
199 <tr class="method-row inherited alt expandable">
\r
200 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
202 <a id="Ext.tree.MultiSelectionModel-hasListener"></a>
\r
203 <b>hasListener</b>( <code>String eventName</code> ) : Boolean <div class="mdesc">
\r
204 <div class="short">Checks to see if this object has any listeners for a specified event</div>
\r
206 Checks to see if this object has any listeners for a specified event <div class="mdetail-params">
\r
207 <strong>Parameters:</strong>
\r
208 <ul><li><code>eventName</code> : String<div class="sub-desc">The name of the event to check for</div></li> </ul>
\r
209 <strong>Returns:</strong>
\r
211 <li><code>Boolean</code><div class="sub-desc">True if the event is being listened for, else false</div></li>
\r
217 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#hasListener" href="output/Ext.util.Observable.html#hasListener">Observable</a></td>
\r
219 <tr class="method-row expandable">
\r
220 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
222 <a id="Ext.tree.MultiSelectionModel-isSelected"></a>
\r
223 <b>isSelected</b>( <code>TreeNode node</code> ) : Boolean <div class="mdesc">
\r
224 <div class="short">Returns true if the node is selected</div>
\r
226 Returns true if the node is selected <div class="mdetail-params">
\r
227 <strong>Parameters:</strong>
\r
228 <ul><li><code>node</code> : TreeNode<div class="sub-desc">The node to check</div></li> </ul>
\r
229 <strong>Returns:</strong>
\r
231 <li><code>Boolean</code></li>
\r
237 <td class="msource">MultiSelectionModel</td>
\r
239 <tr class="method-row inherited alt expandable">
\r
240 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
242 <a id="Ext.tree.MultiSelectionModel-on"></a>
\r
243 <b>on</b>( <code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>, <span class="optional" title="Optional">[<code>Object options</code>]</span> ) : void <div class="mdesc">
\r
244 <div class="short">Appends an event handler to this element (shorthand for addListener)</div>
\r
246 Appends an event handler to this element (shorthand for addListener) <div class="mdetail-params">
\r
247 <strong>Parameters:</strong>
\r
248 <ul><li><code>eventName</code> : String<div class="sub-desc">The type of event to listen for</div></li><li><code>handler</code> : Function<div class="sub-desc">The method the event invokes</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope in which to execute the handler
249 function. The handler function's "this" context.</div></li><li><code>options</code> : Object<div class="sub-desc">(optional)</div></li> </ul>
\r
250 <strong>Returns:</strong>
\r
252 <li><code>void</code></li>
\r
258 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#on" href="output/Ext.util.Observable.html#on">Observable</a></td>
\r
260 <tr class="method-row inherited expandable">
\r
261 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
263 <a id="Ext.tree.MultiSelectionModel-purgeListeners"></a>
\r
264 <b>purgeListeners</b>() : void <div class="mdesc">
\r
265 <div class="short">Removes all listeners for this object</div>
\r
267 Removes all listeners for this object <div class="mdetail-params">
\r
268 <strong>Parameters:</strong>
\r
269 <ul><li>None.</li> </ul>
\r
270 <strong>Returns:</strong>
\r
272 <li><code>void</code></li>
\r
278 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#purgeListeners" href="output/Ext.util.Observable.html#purgeListeners">Observable</a></td>
\r
280 <tr class="method-row inherited alt expandable">
\r
281 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
283 <a id="Ext.tree.MultiSelectionModel-relayEvents"></a>
\r
284 <b>relayEvents</b>( <code>Object o</code>, <code>Array events</code> ) : void <div class="mdesc">
\r
285 <div class="short">Relays selected events from the specified Observable as if the events were fired by <tt><b>this</b></tt>.</div>
\r
287 Relays selected events from the specified Observable as if the events were fired by <tt><b>this</b></tt>. <div class="mdetail-params">
\r
288 <strong>Parameters:</strong>
\r
289 <ul><li><code>o</code> : Object<div class="sub-desc">The Observable whose events this object is to relay.</div></li><li><code>events</code> : Array<div class="sub-desc">Array of event names to relay.</div></li> </ul>
\r
290 <strong>Returns:</strong>
\r
292 <li><code>void</code></li>
\r
298 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#relayEvents" href="output/Ext.util.Observable.html#relayEvents">Observable</a></td>
\r
300 <tr class="method-row inherited expandable">
\r
301 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
303 <a id="Ext.tree.MultiSelectionModel-removeListener"></a>
\r
304 <b>removeListener</b>( <code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span> ) : void <div class="mdesc">
\r
305 <div class="short">Removes a listener</div>
\r
307 Removes a listener <div class="mdetail-params">
\r
308 <strong>Parameters:</strong>
\r
309 <ul><li><code>eventName</code> : String<div class="sub-desc">The type of event to listen for</div></li><li><code>handler</code> : Function<div class="sub-desc">The handler to remove</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope (this object) for the handler</div></li> </ul>
\r
310 <strong>Returns:</strong>
\r
312 <li><code>void</code></li>
\r
318 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#removeListener" href="output/Ext.util.Observable.html#removeListener">Observable</a></td>
\r
320 <tr class="method-row inherited alt expandable">
\r
321 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
323 <a id="Ext.tree.MultiSelectionModel-resumeEvents"></a>
\r
324 <b>resumeEvents</b>() : void <div class="mdesc">
\r
325 <div class="short">Resume firing events. (see <a ext:cls="Ext.util.Observable" ext:member="suspendEvents" href="output/Ext.util.Observable.html#suspendEvents">suspendEvents</a>)</div>
\r
327 Resume firing events. (see <a ext:cls="Ext.util.Observable" ext:member="suspendEvents" href="output/Ext.util.Observable.html#suspendEvents">suspendEvents</a>) <div class="mdetail-params">
\r
328 <strong>Parameters:</strong>
\r
329 <ul><li>None.</li> </ul>
\r
330 <strong>Returns:</strong>
\r
332 <li><code>void</code></li>
\r
338 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#resumeEvents" href="output/Ext.util.Observable.html#resumeEvents">Observable</a></td>
\r
340 <tr class="method-row expandable">
\r
341 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
343 <a id="Ext.tree.MultiSelectionModel-select"></a>
\r
344 <b>select</b>( <code>TreeNode node</code>, <span class="optional" title="Optional">[<code>EventObject e</code>]</span>, <code>Boolean keepExisting</code> ) : TreeNode <div class="mdesc">
\r
345 <div class="short">Select a node.</div>
\r
347 Select a node. <div class="mdetail-params">
\r
348 <strong>Parameters:</strong>
\r
349 <ul><li><code>node</code> : TreeNode<div class="sub-desc">The node to select</div></li><li><code>e</code> : EventObject<div class="sub-desc">(optional) An event associated with the selection</div></li><li><code>keepExisting</code> : Boolean<div class="sub-desc">True to retain existing selections</div></li> </ul>
\r
350 <strong>Returns:</strong>
\r
352 <li><code>TreeNode</code><div class="sub-desc">The selected node</div></li>
\r
358 <td class="msource">MultiSelectionModel</td>
\r
360 <tr class="method-row inherited alt expandable">
\r
361 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
363 <a id="Ext.tree.MultiSelectionModel-suspendEvents"></a>
\r
364 <b>suspendEvents</b>() : void <div class="mdesc">
\r
365 <div class="short">Suspend the firing of all events. (see <a ext:cls="Ext.util.Observable" ext:member="resumeEvents" href="output/Ext.util.Observable.html#resumeEvents">resumeEvents</a>)</div>
\r
367 Suspend the firing of all events. (see <a ext:cls="Ext.util.Observable" ext:member="resumeEvents" href="output/Ext.util.Observable.html#resumeEvents">resumeEvents</a>) <div class="mdetail-params">
\r
368 <strong>Parameters:</strong>
\r
369 <ul><li>None.</li> </ul>
\r
370 <strong>Returns:</strong>
\r
372 <li><code>void</code></li>
\r
378 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#suspendEvents" href="output/Ext.util.Observable.html#suspendEvents">Observable</a></td>
\r
380 <tr class="method-row inherited expandable">
\r
381 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
383 <a id="Ext.tree.MultiSelectionModel-un"></a>
\r
384 <b>un</b>( <code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span> ) : void <div class="mdesc">
\r
385 <div class="short">Removes a listener (shorthand for removeListener)</div>
\r
387 Removes a listener (shorthand for removeListener) <div class="mdetail-params">
\r
388 <strong>Parameters:</strong>
\r
389 <ul><li><code>eventName</code> : String<div class="sub-desc">The type of event to listen for</div></li><li><code>handler</code> : Function<div class="sub-desc">The handler to remove</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope (this object) for the handler</div></li> </ul>
\r
390 <strong>Returns:</strong>
\r
392 <li><code>void</code></li>
\r
398 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#un" href="output/Ext.util.Observable.html#un">Observable</a></td>
\r
400 <tr class="method-row alt expandable">
\r
401 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
403 <a id="Ext.tree.MultiSelectionModel-unselect"></a>
\r
404 <b>unselect</b>( <code>TreeNode node</code> ) : void <div class="mdesc">
\r
405 <div class="short">Deselect a node.</div>
\r
407 Deselect a node. <div class="mdetail-params">
\r
408 <strong>Parameters:</strong>
\r
409 <ul><li><code>node</code> : TreeNode<div class="sub-desc">The node to unselect</div></li> </ul>
\r
410 <strong>Returns:</strong>
\r
412 <li><code>void</code></li>
\r
418 <td class="msource">MultiSelectionModel</td>
\r
421 <a id="Ext.tree.MultiSelectionModel-events"></a>
422 <h2>Public Events</h2>
423 <table cellspacing="0" class="member-table">
425 <th class="sig-header" colspan="2">Event</th>
426 <th class="msource-header">Defined By</th>
428 <tr class="event-row expandable">
\r
429 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
431 <a id="Ext.tree.MultiSelectionModel-selectionchange"></a>
\r
432 <b>selectionchange</b> : ( <code>MultiSelectionModel this</code>, <code>Array nodes</code> ) <div class="mdesc">
\r
433 <div class="short">Fires when the selected nodes change</div>
\r
435 Fires when the selected nodes change <div class="mdetail-params">
\r
436 <strong style="font-weight:normal;">Listeners will be called with the following arguments:</strong>
\r
437 <ul><li><code>this</code> : MultiSelectionModel<div class="sub-desc"></div></li><li><code>nodes</code> : Array<div class="sub-desc">Array of the selected nodes</div></li> </ul>
\r
442 <td class="msource">MultiSelectionModel</td>
\r