1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7 <meta http-equiv="content-type" content="text/html; charset=undefined" />
8 <meta name="generator" content="JsDoc Toolkit" />
11 <title>JsDoc Reference - Roo.CompositeElement</title>
14 <link rel="stylesheet" type="text/css" href="../../css/roojs.css" />
15 <link rel="stylesheet" type="text/css" href="../default.css" />
18 <script type="text/javascript" src="../page.js">
25 <body onload="RooDocsPage.onload();">
28 <div class="body-wrap">
30 <!-- ============================== links to methods. ================================= -->
32 <div class="top-tools">
34 <a class="inner-link" href="#Roo.CompositeElement-props"><img src="resources/s.gif" class="item-icon icon-prop">Properties</a>
35 <a class="inner-link" href="#Roo.CompositeElement-methods"><img src="resources/s.gif" class="item-icon icon-method">Methods</a>
36 <a class="inner-link" href="#Roo.CompositeElement-events"><img src="resources/s.gif" class="item-icon icon-event">Events</a>
37 <a class="inner-link" href="#Roo.CompositeElement-configs"><img src="resources/s.gif" class="item-icon icon-config">Config Options</a>
38 <a class="bookmark" href="NEED_TO_CREATE_DIRECT_LINK_HREF"><img src="resources/s.gif" class="item-icon icon-fav">Direct Link</a>
43 <!-- ============================== inheritance Block. ================================= -->
45 <!-- ============================== class title / details ============================ -->
48 <h1 class="classTitle">
50 Class Roo.CompositeElement
53 <table cellspacing="0" class="class-summary-table">
55 <tr><td class="label">Package:</td><td class="hd-info">Roo</td></tr>
57 <tr><td class="label">Defined In:</td><td class="hd-info">
59 <a href="./src/Roo_CompositeElement.js.html">Roo/CompositeElement.js</a>.
62 <tr><td class="label">Class:</td><td class="hd-info">CompositeElement</td></tr>
65 <tr><td class="label">Subclasses:</td><td class="hd-info">
66 <a href="./Roo.CompositeElementLite.html#constructor" roo:cls="Roo.CompositeElementLite.html#constructor">Roo.CompositeElementLite</a>
77 <!-- ============================== class summary ========================== -->
78 <div class="description">
79 Standard composite class. Creates a Roo.Element for every element in the collection.<br/><br><br><br/><b>NOTE: Although they are not listed, this class supports all of the set/update methods of Roo.Element. All Roo.Element<br/>actions will be performed on all the elements in this collection.</b><br/><br><br><br/>All methods return <i>this</i> and can be chained.<br/> <pre><code><br/> var els = Roo.select("<b>some</b>-el div.some-class", true);<br/> // or select directly from an existing element<br/> var el = Roo.get('some-el');<br/> el.select('div.some-class', true);<br/><br/> els.setWidth(100); // all elements become 100 width<br/> els.hide(true); // all elements fade out and hide<br/> // or<br/> els.setWidth(100).hide(true);<br/> </code></pre>
83 <!-- ============================== Class comment block... ========================== -->
85 <div class="comments">
86 <b>Class Comments / Notes</B> =>
87 <u onclick="parent.CommentDialog.showCommentId = 'Roo.CompositeElement';">[Add Your comment/notes about this class]</u>
89 <iframe frameborder="0" id="comments-Roo" style="border: none;width:100%;"
90 src="/blog.php/GtkDjsComments/Roo.CompositeElement.html"></iframe>
95 <!-- ============================== config options ========================== -->
100 <div class="hr"></div>
101 <a id="Roo.CompositeElement-configs"></a>
105 <table cellspacing="0" class="member-table">
106 <caption class="Empty">Config Options - Has None</caption>
120 <!-- ============================== public properties ==================== -->
124 <a id="Roo.CompositeElement-props"></a>
130 <table cellspacing="0" class="member-table">
131 <caption class="Empty">Public Properties - Has None</caption>
137 <!-- ============================== methods summary / details ======================== -->
140 <a id="Roo.CompositeElement-methods"></a>
141 <!-- constructor?? -->
148 <!-- then dynamics first -->
155 <table cellspacing="0" class="member-table">
156 <caption>Public Methods</caption>
158 <th class="sig-header" colspan="2">Method</th>
159 <th class="msource-header">Defined By</th>
169 <tr class="method-row config-row-alt0 notInherited">
170 <td class="micon"><a class="exi" href="#expand"> </a></td>
174 <a id="Roo-method-CompositeElement" name=".CompositeElement"></a>
175 <div class="fixedFont">
176 <span class="attributes">new <B>Roo.</B></span><b class="itemname">CompositeElement</b>
186 <div class="short">Create a new Roo.CompositeElement</div>
193 Create a new Roo.CompositeElement
216 <tr class="method-row config-row-alt1 expandable notInherited">
217 <td class="micon"><a class="exi" href="#expand"> </a></td>
221 <a id="Roo.CompositeElement-method-add" name=".add"></a>
222 <div class="fixedFont">
223 <span class="attributes"></span><b class="itemname">add</b>
225 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/Array <B><i>els</i></B>)
240 <div class="short">Adds elements to this composite.</div>
246 Adds elements to this composite.
253 <dl class="detailList">
254 <dt class="heading">Parameters:</dt>
257 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/Array</span> <b>els</b>
260 <dd>A string CSS selector, an array of elements or an element</dd>
268 <dl class="detailList">
269 <dt class="heading">Returns:</dt>
271 <dd><span class="fixedFont">CompositeElement</span> this</dd>
293 <tr class="method-row config-row-alt0 expandable notInherited">
294 <td class="micon"><a class="exi" href="#expand"> </a></td>
298 <a id="Roo.CompositeElement-method-clear" name=".clear"></a>
299 <div class="fixedFont">
300 <span class="attributes"></span><b class="itemname">clear</b>
309 <div class="short">Removes all elements.</div>
315 Removes all elements.
344 <tr class="method-row config-row-alt1 expandable notInherited">
345 <td class="micon"><a class="exi" href="#expand"> </a></td>
349 <a id="Roo.CompositeElement-method-contains" name=".contains"></a>
350 <div class="fixedFont">
351 <span class="attributes"></span><b class="itemname">contains</b>
368 <div class="short">Returns true if this composite contains the passed element</div>
374 Returns true if this composite contains the passed element
385 <dl class="detailList">
386 <dt class="heading">Returns:</dt>
410 <tr class="method-row config-row-alt0 expandable notInherited">
411 <td class="micon"><a class="exi" href="#expand"> </a></td>
415 <a id="Roo.CompositeElement-method-each" name=".each"></a>
416 <div class="fixedFont">
417 <span class="attributes"></span><b class="itemname">each</b>
419 (<a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a> <B><i>fn</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>scope</i></B>)
434 <div class="short">Calls the passed function passing (el, this, index) for each element in this composite.</div>
440 Calls the passed function passing (el, this, index) for each element in this composite.
447 <dl class="detailList">
448 <dt class="heading">Parameters:</dt>
451 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>fn</b>
454 <dd>The function to call</dd>
457 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>scope</b>
460 <dd>(optional) The <i>this</i> object (defaults to the element)</dd>
468 <dl class="detailList">
469 <dt class="heading">Returns:</dt>
471 <dd><span class="fixedFont">CompositeElement</span> this</dd>
493 <tr class="method-row config-row-alt1 expandable notInherited">
494 <td class="micon"><a class="exi" href="#expand"> </a></td>
498 <a id="Roo.CompositeElement-method-fill" name=".fill"></a>
499 <div class="fixedFont">
500 <span class="attributes"></span><b class="itemname">fill</b>
502 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/Array <B><i>els</i></B>)
517 <div class="short">Clears this composite and adds the elements returned by the passed selector.</div>
523 Clears this composite and adds the elements returned by the passed selector.
530 <dl class="detailList">
531 <dt class="heading">Parameters:</dt>
534 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/Array</span> <b>els</b>
537 <dd>A string CSS selector, an array of elements or an element</dd>
545 <dl class="detailList">
546 <dt class="heading">Returns:</dt>
548 <dd><span class="fixedFont">CompositeElement</span> this</dd>
570 <tr class="method-row config-row-alt0 expandable notInherited">
571 <td class="micon"><a class="exi" href="#expand"> </a></td>
575 <a id="Roo.CompositeElement-method-filter" name=".filter"></a>
576 <div class="fixedFont">
577 <span class="attributes"></span><b class="itemname">filter</b>
579 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>selector</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a> <B><i>inverse</i></B>)
594 <div class="short">Filters this composite to only elements that match the passed selector.</div>
600 Filters this composite to only elements that match the passed selector.
607 <dl class="detailList">
608 <dt class="heading">Parameters:</dt>
611 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>selector</b>
614 <dd>A string CSS selector</dd>
617 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span> <b>inverse</b>
620 <dd>return inverse filter (not matches)</dd>
628 <dl class="detailList">
629 <dt class="heading">Returns:</dt>
631 <dd><span class="fixedFont">CompositeElement</span> this</dd>
653 <tr class="method-row config-row-alt1 expandable notInherited">
654 <td class="micon"><a class="exi" href="#expand"> </a></td>
658 <a id="Roo.CompositeElement-method-first" name=".first"></a>
659 <div class="fixedFont">
660 <span class="attributes"></span><b class="itemname">first</b>
668 <a href="./Roo.Element.html#constructor" roo:cls="Roo.Element.html#constructor">Roo.Element</a>
677 <div class="short">Returns the first Element</div>
683 Returns the first Element
694 <dl class="detailList">
695 <dt class="heading">Returns:</dt>
697 <dd><span class="fixedFont"><a href="./Roo.Element.html#constructor" roo:cls="Roo.Element.html#constructor">Roo.Element</a></span> </dd>
719 <tr class="method-row config-row-alt0 expandable notInherited">
720 <td class="micon"><a class="exi" href="#expand"> </a></td>
724 <a id="Roo.CompositeElement-method-getCount" name=".getCount"></a>
725 <div class="fixedFont">
726 <span class="attributes"></span><b class="itemname">getCount</b>
743 <div class="short">Returns the number of elements in this composite</div>
749 Returns the number of elements in this composite
760 <dl class="detailList">
761 <dt class="heading">Returns:</dt>
785 <tr class="method-row config-row-alt1 expandable notInherited">
786 <td class="micon"><a class="exi" href="#expand"> </a></td>
790 <a id="Roo.CompositeElement-method-indexOf" name=".indexOf"></a>
791 <div class="fixedFont">
792 <span class="attributes"></span><b class="itemname">indexOf</b>
809 <div class="short">Returns true if this composite contains the passed element</div>
815 Returns true if this composite contains the passed element
826 <dl class="detailList">
827 <dt class="heading">Returns:</dt>
851 <tr class="method-row config-row-alt0 expandable notInherited">
852 <td class="micon"><a class="exi" href="#expand"> </a></td>
856 <a id="Roo.CompositeElement-method-item" name=".item"></a>
857 <div class="fixedFont">
858 <span class="attributes"></span><b class="itemname">item</b>
860 (<a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>index</i></B>)
866 <a href="./Roo.Element.html#constructor" roo:cls="Roo.Element.html#constructor">Roo.Element</a>
875 <div class="short">Returns the Element object at the specified index</div>
881 Returns the Element object at the specified index
888 <dl class="detailList">
889 <dt class="heading">Parameters:</dt>
892 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>index</b>
903 <dl class="detailList">
904 <dt class="heading">Returns:</dt>
906 <dd><span class="fixedFont"><a href="./Roo.Element.html#constructor" roo:cls="Roo.Element.html#constructor">Roo.Element</a></span> </dd>
928 <tr class="method-row config-row-alt1 expandable notInherited">
929 <td class="micon"><a class="exi" href="#expand"> </a></td>
933 <a id="Roo.CompositeElement-method-last" name=".last"></a>
934 <div class="fixedFont">
935 <span class="attributes"></span><b class="itemname">last</b>
943 <a href="./Roo.Element.html#constructor" roo:cls="Roo.Element.html#constructor">Roo.Element</a>
952 <div class="short">Returns the last Element</div>
958 Returns the last Element
969 <dl class="detailList">
970 <dt class="heading">Returns:</dt>
972 <dd><span class="fixedFont"><a href="./Roo.Element.html#constructor" roo:cls="Roo.Element.html#constructor">Roo.Element</a></span> </dd>
994 <tr class="method-row config-row-alt0 expandable notInherited">
995 <td class="micon"><a class="exi" href="#expand"> </a></td>
999 <a id="Roo.CompositeElement-method-removeElement" name=".removeElement"></a>
1000 <div class="fixedFont">
1001 <span class="attributes"></span><b class="itemname">removeElement</b>
1003 (Mixed <B><i>el</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a> <B><i>removeDom</i></B>)
1018 <div class="short">Removes the specified element(s).</div>
1024 Removes the specified element(s).
1031 <dl class="detailList">
1032 <dt class="heading">Parameters:</dt>
1035 <span class="fixedFont">Mixed</span> <b>el</b>
1038 <dd>The id of an element, the Element itself, the index of the element in this composite<br/>or an array of any of those.</dd>
1041 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span> <b>removeDom</b>
1044 <dd>(optional) True to also remove the element from the document</dd>
1052 <dl class="detailList">
1053 <dt class="heading">Returns:</dt>
1055 <dd><span class="fixedFont">CompositeElement</span> this</dd>
1069 <td class="msource">
1071 Roo.CompositeElement
1077 <tr class="method-row config-row-alt1 expandable notInherited">
1078 <td class="micon"><a class="exi" href="#expand"> </a></td>
1082 <a id="Roo.CompositeElement-method-replaceElement" name=".replaceElement"></a>
1083 <div class="fixedFont">
1084 <span class="attributes"></span><b class="itemname">replaceElement</b>
1086 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/HTMLElement/Element/Number <B><i>el</i></B>, <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/HTMLElement/Element <B><i>replacement</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a> <B><i>domReplace</i></B>)
1101 <div class="short">Replaces the specified element with the passed element.</div>
1107 Replaces the specified element with the passed element.
1114 <dl class="detailList">
1115 <dt class="heading">Parameters:</dt>
1118 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/HTMLElement/Element/Number</span> <b>el</b>
1121 <dd>The id of an element, the Element itself, the index of the element in this composite<br/>to replace.</dd>
1124 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/HTMLElement/Element</span> <b>replacement</b>
1127 <dd>The id of an element or the Element itself.</dd>
1130 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span> <b>domReplace</b>
1133 <dd>(Optional) True to remove and replace the element in the document too.</dd>
1141 <dl class="detailList">
1142 <dt class="heading">Returns:</dt>
1144 <dd><span class="fixedFont">CompositeElement</span> this</dd>
1158 <td class="msource">
1160 Roo.CompositeElement
1169 <!-- ============================== events summary / details ======================== -->
1172 <a id="Roo.CompositeElement-events"></a>
1178 <table cellspacing="0" class="member-table">
1179 <caption class="Empty">Events - Has None</caption>
1190 <!-- ============================== footer ================================= -->
1191 <div class="fineprint" style="clear:both">
1193 Documentation generated by <a href="http://www.akbkhome.com" target="_blankt">Introspection Doc Generator</a> on Thu May 10 2018 15:50:15 GMT+0800 (HKT)
1195 <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a>