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>
70 <!-- ============================== class summary ========================== -->
71 <div class="description">
72 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>
76 <!-- ============================== Class comment block... ========================== -->
78 <div class="comments">
79 <b>Class Comments / Notes</B> =>
80 <u onclick="parent.CommentDialog.showCommentId = 'Roo.CompositeElement';">[Add Your comment/notes about this class]</u>
82 <iframe frameborder="0" id="comments-Roo" style="border: none;width:100%;"
83 src="/blog.php/GtkDjsComments/Roo.CompositeElement.html"></iframe>
88 <!-- ============================== config options ========================== -->
93 <div class="hr"></div>
94 <a id="Roo.CompositeElement-configs"></a>
98 <table cellspacing="0" class="member-table">
99 <caption class="Empty">Config Options - Has None</caption>
113 <!-- ============================== public properties ==================== -->
117 <a id="Roo.CompositeElement-props"></a>
123 <table cellspacing="0" class="member-table">
124 <caption class="Empty">Public Properties - Has None</caption>
130 <!-- ============================== methods summary / details ======================== -->
133 <a id="Roo.CompositeElement-methods"></a>
134 <!-- constructor?? -->
141 <!-- then dynamics first -->
148 <table cellspacing="0" class="member-table">
149 <caption>Public Methods</caption>
151 <th class="sig-header" colspan="2">Method</th>
152 <th class="msource-header">Defined By</th>
162 <tr class="method-row config-row-alt0 notInherited">
163 <td class="micon"><a class="exi" href="#expand"> </a></td>
167 <a id="Roo-method-CompositeElement" name=".CompositeElement"></a>
168 <div class="fixedFont">
169 <span class="attributes">new <B>Roo.</B></span><b class="itemname">CompositeElement</b>
179 <div class="short">Create a new Roo.CompositeElement</div>
186 Create a new Roo.CompositeElement
209 <tr class="method-row config-row-alt1 expandable notInherited">
210 <td class="micon"><a class="exi" href="#expand"> </a></td>
214 <a id="Roo.CompositeElement-method-add" name=".add"></a>
215 <div class="fixedFont">
216 <span class="attributes"></span><b class="itemname">add</b>
218 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/Array <B><i>els</i></B>)
233 <div class="short">Adds elements to this composite.</div>
239 Adds elements to this composite.
246 <dl class="detailList">
247 <dt class="heading">Parameters:</dt>
250 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/Array</span> <b>els</b>
253 <dd>A string CSS selector, an array of elements or an element</dd>
261 <dl class="detailList">
262 <dt class="heading">Returns:</dt>
264 <dd><span class="fixedFont">CompositeElement</span> this</dd>
286 <tr class="method-row config-row-alt0 expandable notInherited">
287 <td class="micon"><a class="exi" href="#expand"> </a></td>
291 <a id="Roo.CompositeElement-method-clear" name=".clear"></a>
292 <div class="fixedFont">
293 <span class="attributes"></span><b class="itemname">clear</b>
302 <div class="short">Removes all elements.</div>
308 Removes all elements.
337 <tr class="method-row config-row-alt1 expandable notInherited">
338 <td class="micon"><a class="exi" href="#expand"> </a></td>
342 <a id="Roo.CompositeElement-method-contains" name=".contains"></a>
343 <div class="fixedFont">
344 <span class="attributes"></span><b class="itemname">contains</b>
361 <div class="short">Returns true if this composite contains the passed element</div>
367 Returns true if this composite contains the passed element
378 <dl class="detailList">
379 <dt class="heading">Returns:</dt>
403 <tr class="method-row config-row-alt0 expandable notInherited">
404 <td class="micon"><a class="exi" href="#expand"> </a></td>
408 <a id="Roo.CompositeElement-method-each" name=".each"></a>
409 <div class="fixedFont">
410 <span class="attributes"></span><b class="itemname">each</b>
412 (<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>)
427 <div class="short">Calls the passed function passing (el, this, index) for each element in this composite.</div>
433 Calls the passed function passing (el, this, index) for each element in this composite.
440 <dl class="detailList">
441 <dt class="heading">Parameters:</dt>
444 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>fn</b>
447 <dd>The function to call</dd>
450 <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>
453 <dd>(optional) The <i>this</i> object (defaults to the element)</dd>
461 <dl class="detailList">
462 <dt class="heading">Returns:</dt>
464 <dd><span class="fixedFont">CompositeElement</span> this</dd>
486 <tr class="method-row config-row-alt1 expandable notInherited">
487 <td class="micon"><a class="exi" href="#expand"> </a></td>
491 <a id="Roo.CompositeElement-method-fill" name=".fill"></a>
492 <div class="fixedFont">
493 <span class="attributes"></span><b class="itemname">fill</b>
495 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/Array <B><i>els</i></B>)
510 <div class="short">Clears this composite and adds the elements returned by the passed selector.</div>
516 Clears this composite and adds the elements returned by the passed selector.
523 <dl class="detailList">
524 <dt class="heading">Parameters:</dt>
527 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/Array</span> <b>els</b>
530 <dd>A string CSS selector, an array of elements or an element</dd>
538 <dl class="detailList">
539 <dt class="heading">Returns:</dt>
541 <dd><span class="fixedFont">CompositeElement</span> this</dd>
563 <tr class="method-row config-row-alt0 expandable notInherited">
564 <td class="micon"><a class="exi" href="#expand"> </a></td>
568 <a id="Roo.CompositeElement-method-filter" name=".filter"></a>
569 <div class="fixedFont">
570 <span class="attributes"></span><b class="itemname">filter</b>
572 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>selector</i></B>)
587 <div class="short">Filters this composite to only elements that match the passed selector.</div>
593 Filters this composite to only elements that match the passed selector.
600 <dl class="detailList">
601 <dt class="heading">Parameters:</dt>
604 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>selector</b>
607 <dd>A string CSS selector</dd>
615 <dl class="detailList">
616 <dt class="heading">Returns:</dt>
618 <dd><span class="fixedFont">CompositeElement</span> this</dd>
640 <tr class="method-row config-row-alt1 expandable notInherited">
641 <td class="micon"><a class="exi" href="#expand"> </a></td>
645 <a id="Roo.CompositeElement-method-first" name=".first"></a>
646 <div class="fixedFont">
647 <span class="attributes"></span><b class="itemname">first</b>
655 <a href="./Roo.Element.html#constructor" roo:cls="Roo.Element.html#constructor">Roo.Element</a>
664 <div class="short">Returns the first Element</div>
670 Returns the first Element
681 <dl class="detailList">
682 <dt class="heading">Returns:</dt>
684 <dd><span class="fixedFont"><a href="./Roo.Element.html#constructor" roo:cls="Roo.Element.html#constructor">Roo.Element</a></span> </dd>
706 <tr class="method-row config-row-alt0 expandable notInherited">
707 <td class="micon"><a class="exi" href="#expand"> </a></td>
711 <a id="Roo.CompositeElement-method-getCount" name=".getCount"></a>
712 <div class="fixedFont">
713 <span class="attributes"></span><b class="itemname">getCount</b>
730 <div class="short">Returns the number of elements in this composite</div>
736 Returns the number of elements in this composite
747 <dl class="detailList">
748 <dt class="heading">Returns:</dt>
772 <tr class="method-row config-row-alt1 expandable notInherited">
773 <td class="micon"><a class="exi" href="#expand"> </a></td>
777 <a id="Roo.CompositeElement-method-indexOf" name=".indexOf"></a>
778 <div class="fixedFont">
779 <span class="attributes"></span><b class="itemname">indexOf</b>
796 <div class="short">Returns true if this composite contains the passed element</div>
802 Returns true if this composite contains the passed element
813 <dl class="detailList">
814 <dt class="heading">Returns:</dt>
838 <tr class="method-row config-row-alt0 expandable notInherited">
839 <td class="micon"><a class="exi" href="#expand"> </a></td>
843 <a id="Roo.CompositeElement-method-item" name=".item"></a>
844 <div class="fixedFont">
845 <span class="attributes"></span><b class="itemname">item</b>
847 (<a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>index</i></B>)
853 <a href="./Roo.Element.html#constructor" roo:cls="Roo.Element.html#constructor">Roo.Element</a>
862 <div class="short">Returns the Element object at the specified index</div>
868 Returns the Element object at the specified index
875 <dl class="detailList">
876 <dt class="heading">Parameters:</dt>
879 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>index</b>
890 <dl class="detailList">
891 <dt class="heading">Returns:</dt>
893 <dd><span class="fixedFont"><a href="./Roo.Element.html#constructor" roo:cls="Roo.Element.html#constructor">Roo.Element</a></span> </dd>
915 <tr class="method-row config-row-alt1 expandable notInherited">
916 <td class="micon"><a class="exi" href="#expand"> </a></td>
920 <a id="Roo.CompositeElement-method-last" name=".last"></a>
921 <div class="fixedFont">
922 <span class="attributes"></span><b class="itemname">last</b>
930 <a href="./Roo.Element.html#constructor" roo:cls="Roo.Element.html#constructor">Roo.Element</a>
939 <div class="short">Returns the last Element</div>
945 Returns the last Element
956 <dl class="detailList">
957 <dt class="heading">Returns:</dt>
959 <dd><span class="fixedFont"><a href="./Roo.Element.html#constructor" roo:cls="Roo.Element.html#constructor">Roo.Element</a></span> </dd>
981 <tr class="method-row config-row-alt0 expandable notInherited">
982 <td class="micon"><a class="exi" href="#expand"> </a></td>
986 <a id="Roo.CompositeElement-method-removeElement" name=".removeElement"></a>
987 <div class="fixedFont">
988 <span class="attributes"></span><b class="itemname">removeElement</b>
990 (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>)
1005 <div class="short">Removes the specified element(s).</div>
1011 Removes the specified element(s).
1018 <dl class="detailList">
1019 <dt class="heading">Parameters:</dt>
1022 <span class="fixedFont">Mixed</span> <b>el</b>
1025 <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>
1028 <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>
1031 <dd>(optional) True to also remove the element from the document</dd>
1039 <dl class="detailList">
1040 <dt class="heading">Returns:</dt>
1042 <dd><span class="fixedFont">CompositeElement</span> this</dd>
1056 <td class="msource">
1058 Roo.CompositeElement
1064 <tr class="method-row config-row-alt1 expandable notInherited">
1065 <td class="micon"><a class="exi" href="#expand"> </a></td>
1069 <a id="Roo.CompositeElement-method-replaceElement" name=".replaceElement"></a>
1070 <div class="fixedFont">
1071 <span class="attributes"></span><b class="itemname">replaceElement</b>
1073 (<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>)
1088 <div class="short">Replaces the specified element with the passed element.</div>
1094 Replaces the specified element with the passed element.
1101 <dl class="detailList">
1102 <dt class="heading">Parameters:</dt>
1105 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/HTMLElement/Element/Number</span> <b>el</b>
1108 <dd>The id of an element, the Element itself, the index of the element in this composite<br/>to replace.</dd>
1111 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/HTMLElement/Element</span> <b>replacement</b>
1114 <dd>The id of an element or the Element itself.</dd>
1117 <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>
1120 <dd>(Optional) True to remove and replace the element in the document too.</dd>
1128 <dl class="detailList">
1129 <dt class="heading">Returns:</dt>
1131 <dd><span class="fixedFont">CompositeElement</span> this</dd>
1145 <td class="msource">
1147 Roo.CompositeElement
1156 <!-- ============================== events summary / details ======================== -->
1159 <a id="Roo.CompositeElement-events"></a>
1165 <table cellspacing="0" class="member-table">
1166 <caption class="Empty">Events - Has None</caption>
1177 <!-- ============================== footer ================================= -->
1178 <div class="fineprint" style="clear:both">
1180 Documentation generated by <a href="http://www.akbkhome.com" target="_blankt">Introspection Doc Generator</a> on Fri Jul 16 2010 15:55:22 GMT+0800 (HKT)
1182 <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a>