1 <div class="body-wrap">
2 <div class="top-tools">
3 <a class="inner-link" href="#Ext.CompositeElementLite-props"><img src="../resources/images/default/s.gif" class="item-icon icon-prop">Properties</a>
4 <a class="inner-link" href="#Ext.CompositeElementLite-methods"><img src="../resources/images/default/s.gif" class="item-icon icon-method">Methods</a>
5 <a class="inner-link" href="#Ext.CompositeElementLite-events"><img src="../resources/images/default/s.gif" class="item-icon icon-event">Events</a>
6 <a class="bookmark" href="../docs/?class=Ext.CompositeElementLite"><img src="../resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a>
8 <div class="inheritance res-block">
9 <pre class="res-block-inner"><a ext:cls="Ext.CompositeElement" ext:member="" href="output/Ext.CompositeElement.html">CompositeElement</a>
10 <img src="resources/elbow-end.gif"/>CompositeElementLite</pre></div>
11 <h1>Class Ext.CompositeElementLite</h1>
12 <table cellspacing="0">
13 <tr><td class="label">Package:</td><td class="hd-info">Ext</td></tr>
14 <tr><td class="label">Defined In:</td><td class="hd-info"><a href="../src/CompositeElement.js" target="_blank">CompositeElement.js</a></td></tr>
15 <tr><td class="label">Class:</td><td class="hd-info">CompositeElementLite</td></tr>
16 <tr><td class="label">Extends:</td><td class="hd-info"><a ext:cls="Ext.CompositeElement" ext:member="" href="output/Ext.CompositeElement.html">CompositeElement</a></td></tr>
18 <div class="description">
19 Flyweight composite class. Reuses the same Ext.Element for element operations.
\r
20 <pre><code>var els = Ext.select(<em>"#some-el div.some-class"</em>);
21 <i>// or select directly from an existing element</i>
22 <b>var</b> el = Ext.get(<em>'some-el'</em>);
23 el.select(<em>'div.some-class'</em>);
25 els.setWidth(100); <i>// all elements become 100 width</i>
26 els.hide(true); <i>// all elements fade out and hide</i>
28 els.setWidth(100).hide(true);</code></pre><br><br>
29 <b>NOTE: Although they are not listed, this class supports all of the set/update methods of Ext.Element. All Ext.Element
30 actions will be performed on all the elements in this collection.</b> </div>
32 <div class="hr"></div>
33 <a id="Ext.CompositeElementLite-props"></a>
34 <h2>Public Properties</h2>
35 <div class="no-members">This class has no public properties.</div> <a id="Ext.CompositeElementLite-methods"></a>
36 <h2>Public Methods</h2>
37 <table cellspacing="0" class="member-table">
39 <th class="sig-header" colspan="2">Method</th>
40 <th class="msource-header">Defined By</th>
42 <tr class="method-row inherited expandable">
\r
43 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
45 <a id="Ext.CompositeElementLite-add"></a>
\r
46 <b>add</b>( <code>String/Array els</code> ) : CompositeElement <div class="mdesc">
\r
47 <div class="short">Adds elements to this composite.</div>
\r
49 Adds elements to this composite. <div class="mdetail-params">
\r
50 <strong>Parameters:</strong>
\r
51 <ul><li><code>els</code> : String/Array<div class="sub-desc">A string CSS selector, an array of elements or an element</div></li> </ul>
\r
52 <strong>Returns:</strong>
\r
54 <li><code>CompositeElement</code><div class="sub-desc">this</div></li>
\r
60 <td class="msource"><a ext:cls="Ext.CompositeElement" ext:member="#add" href="output/Ext.CompositeElement.html#add">CompositeElement</a></td>
\r
62 <tr class="method-row inherited alt expandable">
\r
63 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
65 <a id="Ext.CompositeElementLite-clear"></a>
\r
66 <b>clear</b>() : void <div class="mdesc">
\r
67 <div class="short">Removes all elements.</div>
\r
69 Removes all elements. <div class="mdetail-params">
\r
70 <strong>Parameters:</strong>
\r
71 <ul><li>None.</li> </ul>
\r
72 <strong>Returns:</strong>
\r
74 <li><code>void</code></li>
\r
80 <td class="msource"><a ext:cls="Ext.CompositeElement" ext:member="#clear" href="output/Ext.CompositeElement.html#clear">CompositeElement</a></td>
\r
82 <tr class="method-row inherited expandable">
\r
83 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
85 <a id="Ext.CompositeElementLite-contains"></a>
\r
86 <b>contains</b>( <code>el {Mixed}</code> ) : Boolean <div class="mdesc">
\r
87 <div class="short">Returns true if this composite contains the passed element</div>
\r
89 Returns true if this composite contains the passed element <div class="mdetail-params">
\r
90 <strong>Parameters:</strong>
\r
91 <ul><li><code>{Mixed}</code> : el<div class="sub-desc">The id of an element, or an Ext.Element, or an HtmlElement to find within the composite collection.</div></li> </ul>
\r
92 <strong>Returns:</strong>
\r
94 <li><code>Boolean</code></li>
\r
100 <td class="msource"><a ext:cls="Ext.CompositeElement" ext:member="#contains" href="output/Ext.CompositeElement.html#contains">CompositeElement</a></td>
\r
102 <tr class="method-row alt expandable">
\r
103 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
105 <a id="Ext.CompositeElementLite-each"></a>
\r
106 <b>each</b>( <code>Function fn</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span> ) : CompositeElement <div class="mdesc">
\r
107 <div class="short">Calls the passed function passing (el, this, index) for each element in this composite. The element
108 passed is the fly...</div>
\r
110 Calls the passed function passing (el, this, index) for each element in this composite. <b>The element
111 passed is the flyweight (shared) Ext.Element instance, so if you require a
112 a reference to the dom node, use el.dom.</b> <div class="mdetail-params">
\r
113 <strong>Parameters:</strong>
\r
114 <ul><li><code>fn</code> : Function<div class="sub-desc">The function to call</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The <i>this</i> object (defaults to the element)</div></li> </ul>
\r
115 <strong>Returns:</strong>
\r
117 <li><code>CompositeElement</code><div class="sub-desc">this</div></li>
\r
123 <td class="msource">CompositeElementLite</td>
\r
125 <tr class="method-row inherited expandable">
\r
126 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
128 <a id="Ext.CompositeElementLite-fill"></a>
\r
129 <b>fill</b>( <code>String/Array els</code> ) : CompositeElement <div class="mdesc">
\r
130 <div class="short">Clears this composite and adds the elements returned by the passed selector.</div>
\r
132 Clears this composite and adds the elements returned by the passed selector. <div class="mdetail-params">
\r
133 <strong>Parameters:</strong>
\r
134 <ul><li><code>els</code> : String/Array<div class="sub-desc">A string CSS selector, an array of elements or an element</div></li> </ul>
\r
135 <strong>Returns:</strong>
\r
137 <li><code>CompositeElement</code><div class="sub-desc">this</div></li>
\r
143 <td class="msource"><a ext:cls="Ext.CompositeElement" ext:member="#fill" href="output/Ext.CompositeElement.html#fill">CompositeElement</a></td>
\r
145 <tr class="method-row inherited alt expandable">
\r
146 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
148 <a id="Ext.CompositeElementLite-filter"></a>
\r
149 <b>filter</b>( <code>String selector</code> ) : CompositeElement <div class="mdesc">
\r
150 <div class="short">Filters this composite to only elements that match the passed selector.</div>
\r
152 Filters this composite to only elements that match the passed selector. <div class="mdetail-params">
\r
153 <strong>Parameters:</strong>
\r
154 <ul><li><code>selector</code> : String<div class="sub-desc">A string CSS selector</div></li> </ul>
\r
155 <strong>Returns:</strong>
\r
157 <li><code>CompositeElement</code><div class="sub-desc">this</div></li>
\r
163 <td class="msource"><a ext:cls="Ext.CompositeElement" ext:member="#filter" href="output/Ext.CompositeElement.html#filter">CompositeElement</a></td>
\r
165 <tr class="method-row inherited expandable">
\r
166 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
168 <a id="Ext.CompositeElementLite-first"></a>
\r
169 <b>first</b>() : Ext.Element <div class="mdesc">
\r
170 <div class="short">Returns the first Element</div>
\r
172 Returns the first Element <div class="mdetail-params">
\r
173 <strong>Parameters:</strong>
\r
174 <ul><li>None.</li> </ul>
\r
175 <strong>Returns:</strong>
\r
177 <li><code>Ext.Element</code></li>
\r
183 <td class="msource"><a ext:cls="Ext.CompositeElement" ext:member="#first" href="output/Ext.CompositeElement.html#first">CompositeElement</a></td>
\r
185 <tr class="method-row inherited alt expandable">
\r
186 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
188 <a id="Ext.CompositeElementLite-getCount"></a>
\r
189 <b>getCount</b>() : Number <div class="mdesc">
\r
190 <div class="short">Returns the number of elements in this composite</div>
\r
192 Returns the number of elements in this composite <div class="mdetail-params">
\r
193 <strong>Parameters:</strong>
\r
194 <ul><li>None.</li> </ul>
\r
195 <strong>Returns:</strong>
\r
197 <li><code>Number</code></li>
\r
203 <td class="msource"><a ext:cls="Ext.CompositeElement" ext:member="#getCount" href="output/Ext.CompositeElement.html#getCount">CompositeElement</a></td>
\r
205 <tr class="method-row inherited expandable">
\r
206 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
208 <a id="Ext.CompositeElementLite-indexOf"></a>
\r
209 <b>indexOf</b>( <code>el {Mixed}</code> ) : Number <div class="mdesc">
\r
210 <div class="short">Find the index of the passed element within the composite collection.</div>
\r
212 Find the index of the passed element within the composite collection. <div class="mdetail-params">
\r
213 <strong>Parameters:</strong>
\r
214 <ul><li><code>{Mixed}</code> : el<div class="sub-desc">The id of an element, or an Ext.Element, or an HtmlElement to find within the composite collection.</div></li> </ul>
\r
215 <strong>Returns:</strong>
\r
217 <li><code>Number</code><div class="sub-desc">The index of the passed Ext.Element in the composite collection, or -1 if not found.</div></li>
\r
223 <td class="msource"><a ext:cls="Ext.CompositeElement" ext:member="#indexOf" href="output/Ext.CompositeElement.html#indexOf">CompositeElement</a></td>
\r
225 <tr class="method-row alt expandable">
\r
226 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
228 <a id="Ext.CompositeElementLite-item"></a>
\r
229 <b>item</b>( <code>Number index</code> ) : Ext.Element <div class="mdesc">
\r
230 <div class="short">Returns a flyweight Element of the dom element object at the specified index</div>
\r
232 Returns a flyweight Element of the dom element object at the specified index <div class="mdetail-params">
\r
233 <strong>Parameters:</strong>
\r
234 <ul><li><code>index</code> : Number<div class="sub-desc"></div></li> </ul>
\r
235 <strong>Returns:</strong>
\r
237 <li><code>Ext.Element</code></li>
\r
243 <td class="msource">CompositeElementLite</td>
\r
245 <tr class="method-row inherited expandable">
\r
246 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
248 <a id="Ext.CompositeElementLite-last"></a>
\r
249 <b>last</b>() : Ext.Element <div class="mdesc">
\r
250 <div class="short">Returns the last Element</div>
\r
252 Returns the last Element <div class="mdetail-params">
\r
253 <strong>Parameters:</strong>
\r
254 <ul><li>None.</li> </ul>
\r
255 <strong>Returns:</strong>
\r
257 <li><code>Ext.Element</code></li>
\r
263 <td class="msource"><a ext:cls="Ext.CompositeElement" ext:member="#last" href="output/Ext.CompositeElement.html#last">CompositeElement</a></td>
\r
265 <tr class="method-row inherited alt expandable">
\r
266 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
268 <a id="Ext.CompositeElementLite-removeElement"></a>
\r
269 <b>removeElement</b>( <code>Mixed el</code>, <span class="optional" title="Optional">[<code>Boolean removeDom</code>]</span> ) : CompositeElement <div class="mdesc">
\r
270 <div class="short">Removes the specified element(s).</div>
\r
272 Removes the specified element(s). <div class="mdetail-params">
\r
273 <strong>Parameters:</strong>
\r
274 <ul><li><code>el</code> : Mixed<div class="sub-desc">The id of an element, the Element itself, the index of the element in this composite
275 or an array of any of those.</div></li><li><code>removeDom</code> : Boolean<div class="sub-desc">(optional) True to also remove the element from the document</div></li> </ul>
\r
276 <strong>Returns:</strong>
\r
278 <li><code>CompositeElement</code><div class="sub-desc">this</div></li>
\r
284 <td class="msource"><a ext:cls="Ext.CompositeElement" ext:member="#removeElement" href="output/Ext.CompositeElement.html#removeElement">CompositeElement</a></td>
\r
286 <tr class="method-row inherited expandable">
\r
287 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
289 <a id="Ext.CompositeElementLite-replaceElement"></a>
\r
290 <b>replaceElement</b>( <code>Mixed el</code>, <code>Mixed replacement</code>, <span class="optional" title="Optional">[<code>Boolean domReplace</code>]</span> ) : CompositeElement <div class="mdesc">
\r
291 <div class="short">Replaces the specified element with the passed element.</div>
\r
293 Replaces the specified element with the passed element. <div class="mdetail-params">
\r
294 <strong>Parameters:</strong>
\r
295 <ul><li><code>el</code> : Mixed<div class="sub-desc">The id of an element, the Element itself, the index of the element in this composite
296 to replace.</div></li><li><code>replacement</code> : Mixed<div class="sub-desc">The id of an element or the Element itself.</div></li><li><code>domReplace</code> : Boolean<div class="sub-desc">(Optional) True to remove and replace the element in the document too.</div></li> </ul>
\r
297 <strong>Returns:</strong>
\r
299 <li><code>CompositeElement</code><div class="sub-desc">this</div></li>
\r
305 <td class="msource"><a ext:cls="Ext.CompositeElement" ext:member="#replaceElement" href="output/Ext.CompositeElement.html#replaceElement">CompositeElement</a></td>
\r
308 <a id="Ext.CompositeElementLite-events"></a>
309 <h2>Public Events</h2>
310 <div class="no-members">This class has no public events.</div>