Ext.CompositeElementLite.html
16.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
<div class="body-wrap">
<div class="top-tools">
<a class="inner-link" href="#Ext.CompositeElementLite-props"><img src="../resources/images/default/s_wev8.gif" class="item-icon icon-prop">Properties</a>
<a class="inner-link" href="#Ext.CompositeElementLite-methods"><img src="../resources/images/default/s_wev8.gif" class="item-icon icon-method">Methods</a>
<a class="inner-link" href="#Ext.CompositeElementLite-events"><img src="../resources/images/default/s_wev8.gif" class="item-icon icon-event">Events</a>
<a class="bookmark" href="../docs/?class=Ext.CompositeElementLite"><img src="../resources/images/default/s_wev8.gif" class="item-icon icon-fav">Direct Link</a>
</div>
<div class="inheritance res-block">
<pre class="res-block-inner"><a ext:cls="Ext.CompositeElement" ext:member="" href="output/Ext.CompositeElement.html">CompositeElement</a>
<img src="resources/elbow-end_wev8.gif"/>CompositeElementLite</pre></div>
<h1>Class Ext.CompositeElementLite</h1>
<table cellspacing="0">
<tr><td class="label">Package:</td><td class="hd-info">Ext</td></tr>
<tr><td class="label">Defined In:</td><td class="hd-info"><a href="../source/core/CompositeElement_wev8.js" target="_blank">CompositeElement_wev8.js</a></td></tr>
<tr><td class="label">Class:</td><td class="hd-info">CompositeElementLite</td></tr>
<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>
</table>
<div class="description">
Flyweight composite class. Reuses the same Ext.Element for element operations.
<pre><code>var els = Ext.select(<em>"#some-el div.some-class"</em>);
<i>// or select directly from an existing element</i>
<b>var</b> el = Ext.get(<em>'some-el'</em>);
el.select(<em>'div.some-class'</em>);
els.setWidth(100); <i>// all elements become 100 width</i>
els.hide(true); <i>// all elements fade out and hide</i>
<i>// or</i>
els.setWidth(100).hide(true);</code></pre><br><br>
<b>NOTE: Although they are not listed, this class supports all of the set/update methods of Ext.Element. All Ext.Element
actions will be performed on all the elements in this collection.</b> </div>
<div class="hr"></div>
<a id="Ext.CompositeElementLite-props"></a>
<h2>Public Properties</h2>
<div class="no-members">This class has no public properties.</div> <a id="Ext.CompositeElementLite-methods"></a>
<h2>Public Methods</h2>
<table cellspacing="0" class="member-table">
<tr>
<th class="sig-header" colspan="2">Method</th>
<th class="msource-header">Defined By</th>
</tr>
<tr class="method-row inherited expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.CompositeElementLite-add"></a>
<b>add</b>( <code>String/Array els</code> ) : CompositeElement <div class="mdesc">
<div class="short">Adds elements to this composite.</div>
<div class="long">
Adds elements to this composite. <div class="mdetail-params">
<strong>Parameters:</strong>
<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>
<strong>Returns:</strong>
<ul>
<li><code>CompositeElement</code><div class="sub-desc">this</div></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource"><a ext:cls="Ext.CompositeElement" ext:member="#add" href="output/Ext.CompositeElement.html#add">CompositeElement</a></td>
</tr>
<tr class="method-row inherited alt expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.CompositeElementLite-clear"></a>
<b>clear</b>() : void <div class="mdesc">
<div class="short">Removes all elements.</div>
<div class="long">
Removes all elements. <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li>None.</li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>void</code></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource"><a ext:cls="Ext.CompositeElement" ext:member="#clear" href="output/Ext.CompositeElement.html#clear">CompositeElement</a></td>
</tr>
<tr class="method-row inherited expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.CompositeElementLite-contains"></a>
<b>contains</b>() : Boolean <div class="mdesc">
<div class="short">Returns true if this composite contains the passed element</div>
<div class="long">
Returns true if this composite contains the passed element <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li>None.</li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Boolean</code></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource"><a ext:cls="Ext.CompositeElement" ext:member="#contains" href="output/Ext.CompositeElement.html#contains">CompositeElement</a></td>
</tr>
<tr class="method-row alt expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.CompositeElementLite-each"></a>
<b>each</b>( <code>Function fn</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span> ) : CompositeElement <div class="mdesc">
<div class="short">Calls the passed function passing (el, this, index) for each element in this composite. The element
passed is the fly...</div>
<div class="long">
Calls the passed function passing (el, this, index) for each element in this composite. <b>The element
passed is the flyweight (shared) Ext.Element instance, so if you require a
a reference to the dom node, use el.dom.</b> <div class="mdetail-params">
<strong>Parameters:</strong>
<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>
<strong>Returns:</strong>
<ul>
<li><code>CompositeElement</code><div class="sub-desc">this</div></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource">CompositeElementLite</td>
</tr>
<tr class="method-row inherited expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.CompositeElementLite-fill"></a>
<b>fill</b>( <code>String/Array els</code> ) : CompositeElement <div class="mdesc">
<div class="short">Clears this composite and adds the elements returned by the passed selector.</div>
<div class="long">
Clears this composite and adds the elements returned by the passed selector. <div class="mdetail-params">
<strong>Parameters:</strong>
<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>
<strong>Returns:</strong>
<ul>
<li><code>CompositeElement</code><div class="sub-desc">this</div></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource"><a ext:cls="Ext.CompositeElement" ext:member="#fill" href="output/Ext.CompositeElement.html#fill">CompositeElement</a></td>
</tr>
<tr class="method-row inherited alt expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.CompositeElementLite-filter"></a>
<b>filter</b>( <code>String selector</code> ) : CompositeElement <div class="mdesc">
<div class="short">Filters this composite to only elements that match the passed selector.</div>
<div class="long">
Filters this composite to only elements that match the passed selector. <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>selector</code> : String<div class="sub-desc">A string CSS selector</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>CompositeElement</code><div class="sub-desc">this</div></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource"><a ext:cls="Ext.CompositeElement" ext:member="#filter" href="output/Ext.CompositeElement.html#filter">CompositeElement</a></td>
</tr>
<tr class="method-row inherited expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.CompositeElementLite-first"></a>
<b>first</b>() : Ext.Element <div class="mdesc">
<div class="short">Returns the first Element</div>
<div class="long">
Returns the first Element <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li>None.</li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Ext.Element</code></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource"><a ext:cls="Ext.CompositeElement" ext:member="#first" href="output/Ext.CompositeElement.html#first">CompositeElement</a></td>
</tr>
<tr class="method-row inherited alt expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.CompositeElementLite-getCount"></a>
<b>getCount</b>() : Number <div class="mdesc">
<div class="short">Returns the number of elements in this composite</div>
<div class="long">
Returns the number of elements in this composite <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li>None.</li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Number</code></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource"><a ext:cls="Ext.CompositeElement" ext:member="#getCount" href="output/Ext.CompositeElement.html#getCount">CompositeElement</a></td>
</tr>
<tr class="method-row inherited expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.CompositeElementLite-indexOf"></a>
<b>indexOf</b>() : Boolean <div class="mdesc">
<div class="short">Returns true if this composite contains the passed element</div>
<div class="long">
Returns true if this composite contains the passed element <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li>None.</li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Boolean</code></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource"><a ext:cls="Ext.CompositeElement" ext:member="#indexOf" href="output/Ext.CompositeElement.html#indexOf">CompositeElement</a></td>
</tr>
<tr class="method-row alt expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.CompositeElementLite-item"></a>
<b>item</b>( <code>Number index</code> ) : Ext.Element <div class="mdesc">
<div class="short">Returns a flyweight Element of the dom element object at the specified index</div>
<div class="long">
Returns a flyweight Element of the dom element object at the specified index <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>index</code> : Number<div class="sub-desc"></div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Ext.Element</code></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource">CompositeElementLite</td>
</tr>
<tr class="method-row inherited expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.CompositeElementLite-last"></a>
<b>last</b>() : Ext.Element <div class="mdesc">
<div class="short">Returns the last Element</div>
<div class="long">
Returns the last Element <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li>None.</li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Ext.Element</code></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource"><a ext:cls="Ext.CompositeElement" ext:member="#last" href="output/Ext.CompositeElement.html#last">CompositeElement</a></td>
</tr>
<tr class="method-row inherited alt expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.CompositeElementLite-removeElement"></a>
<b>removeElement</b>( <code>Mixed el</code>, <span class="optional" title="Optional">[<code>Boolean removeDom</code>]</span> ) : CompositeElement <div class="mdesc">
<div class="short">Removes the specified element(s).</div>
<div class="long">
Removes the specified element(s). <div class="mdetail-params">
<strong>Parameters:</strong>
<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
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>
<strong>Returns:</strong>
<ul>
<li><code>CompositeElement</code><div class="sub-desc">this</div></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource"><a ext:cls="Ext.CompositeElement" ext:member="#removeElement" href="output/Ext.CompositeElement.html#removeElement">CompositeElement</a></td>
</tr>
<tr class="method-row inherited expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.CompositeElementLite-replaceElement"></a>
<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">
<div class="short">Replaces the specified element with the passed element.</div>
<div class="long">
Replaces the specified element with the passed element. <div class="mdetail-params">
<strong>Parameters:</strong>
<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
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>
<strong>Returns:</strong>
<ul>
<li><code>CompositeElement</code><div class="sub-desc">this</div></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource"><a ext:cls="Ext.CompositeElement" ext:member="#replaceElement" href="output/Ext.CompositeElement.html#replaceElement">CompositeElement</a></td>
</tr>
</table>
<a id="Ext.CompositeElementLite-events"></a>
<h2>Public Events</h2>
<div class="no-members">This class has no public events.</div>
</div>