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.util.MixedCollection</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.util.MixedCollection-props"><img src="resources/s.gif" class="item-icon icon-prop">Properties</a>
35 <a class="inner-link" href="#Roo.util.MixedCollection-methods"><img src="resources/s.gif" class="item-icon icon-method">Methods</a>
36 <a class="inner-link" href="#Roo.util.MixedCollection-events"><img src="resources/s.gif" class="item-icon icon-event">Events</a>
37 <a class="inner-link" href="#Roo.util.MixedCollection-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 <div class="inheritance res-block">
46 <pre class="res-block-inner"><a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
47 <img src="../../images/default/s.gif" height="1" width="20"/><img class="elbow" src="../../images/default/tree/elbow-end.gif"/>Roo.util.MixedCollection
52 <!-- ============================== class title / details ============================ -->
55 <h1 class="classTitle">
57 Class Roo.util.MixedCollection
60 <table cellspacing="0" class="class-summary-table">
62 <tr><td class="label">Package:</td><td class="hd-info">Roo.util</td></tr>
64 <tr><td class="label">Defined In:</td><td class="hd-info">
66 <a href="./src/Roo_util_MixedCollection.js.html">Roo/util/MixedCollection.js</a>.
69 <tr><td class="label">Class:</td><td class="hd-info">MixedCollection</td></tr>
74 <tr><td class="label">Extends:</td><td class="hd-info">
75 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
83 <!-- ============================== class summary ========================== -->
84 <div class="description">
85 A Collection class that maintains both numeric indexes and keys and exposes events.
89 <!-- ============================== Class comment block... ========================== -->
91 <div class="comments">
92 <b>Class Comments / Notes</B> =>
93 <u onclick="parent.CommentDialog.showCommentId = 'Roo.util.MixedCollection';">[Add Your comment/notes about this class]</u>
95 <iframe frameborder="0" id="comments-Roo.util" style="border: none;width:100%;"
96 src="/blog.php/GtkDjsComments/Roo.util.MixedCollection.html"></iframe>
101 <!-- ============================== config options ========================== -->
106 <div class="hr"></div>
107 <a id="Roo.util.MixedCollection-configs"></a>
111 <table cellspacing="0" class="member-table">
112 <caption class="Empty">Config Options - Has None</caption>
126 <!-- ============================== public properties ==================== -->
130 <a id="Roo.util.MixedCollection-props"></a>
136 <table cellspacing="0" class="member-table">
137 <caption class="Empty">Public Properties - Has None</caption>
143 <!-- ============================== methods summary / details ======================== -->
146 <a id="Roo.util.MixedCollection-methods"></a>
147 <!-- constructor?? -->
154 <!-- then dynamics first -->
161 <table cellspacing="0" class="member-table">
162 <caption>Public Methods</caption>
164 <th class="sig-header" colspan="2">Method</th>
165 <th class="msource-header">Defined By</th>
175 <tr class="method-row config-row-alt0 expandable notInherited">
176 <td class="micon"><a class="exi" href="#expand"> </a></td>
180 <a id="Roo.util-method-MixedCollection" name=".MixedCollection"></a>
181 <div class="fixedFont">
182 <span class="attributes">new <B>Roo.util.</B></span><b class="itemname">MixedCollection</b>
184 (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a> <B><i>allowFunctions</i></B>, <a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a> <B><i>keyFn</i></B>)
192 <div class="short">Create a new Roo.util.MixedCollection</div>
199 Create a new Roo.util.MixedCollection
202 <dl class="detailList">
203 <dt class="heading">Parameters:</dt>
206 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span> <b>allowFunctions</b>
209 <dd>True if the addAll function should add function references to the<br/>collection (defaults to false)</dd>
212 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>keyFn</b>
215 <dd>A function that can accept an item of the type(s) stored in this MixedCollection<br/>and return the key value for that item. This is used when available to look up the key on items that<br/>were passed without an explicit key parameter to a MixedCollection method. Passing this parameter is<br/>equivalent to providing an implementation for the {<b>link</b> <b>getKey</b>} method.</dd>
239 <tr class="method-row config-row-alt1 expandable notInherited">
240 <td class="micon"><a class="exi" href="#expand"> </a></td>
244 <a id="Roo.util.MixedCollection-method-add" name=".add"></a>
245 <div class="fixedFont">
246 <span class="attributes"></span><b class="itemname">add</b>
248 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>key</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>o</i></B>)
254 <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a>
263 <div class="short">Adds an item to the collection.</div>
269 Adds an item to the collection.
276 <dl class="detailList">
277 <dt class="heading">Parameters:</dt>
280 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>key</b>
283 <dd>The key to associate with the item</dd>
286 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>o</b>
289 <dd>The item to add.</dd>
297 <dl class="detailList">
298 <dt class="heading">Returns:</dt>
300 <dd><span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> The item added.</dd>
316 Roo.util.MixedCollection
322 <tr class="method-row config-row-alt0 expandable notInherited">
323 <td class="micon"><a class="exi" href="#expand"> </a></td>
327 <a id="Roo.util.MixedCollection-method-addAll" name=".addAll"></a>
328 <div class="fixedFont">
329 <span class="attributes"></span><b class="itemname">addAll</b>
331 (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a>/Array <B><i>objs</i></B>)
338 <div class="short">Adds all elements of an Array or an Object to the collection.</div>
344 Adds all elements of an Array or an Object to the collection.
351 <dl class="detailList">
352 <dt class="heading">Parameters:</dt>
355 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a>/Array</span> <b>objs</b>
358 <dd>An Object containing properties which will be added to the collection, or<br/>an Array of values, each of which are added to the collection.</dd>
378 Roo.util.MixedCollection
384 <tr class="method-row config-row-alt1 expandable notInherited">
385 <td class="micon"><a class="exi" href="#expand"> </a></td>
389 <a id="Roo.util.MixedCollection-method-clear" name=".clear"></a>
390 <div class="fixedFont">
391 <span class="attributes"></span><b class="itemname">clear</b>
400 <div class="short">Removes all items from the collection.</div>
406 Removes all items from the collection.
429 Roo.util.MixedCollection
435 <tr class="method-row config-row-alt0 expandable notInherited">
436 <td class="micon"><a class="exi" href="#expand"> </a></td>
440 <a id="Roo.util.MixedCollection-method-clone" name=".clone"></a>
441 <div class="fixedFont">
442 <span class="attributes"></span><b class="itemname">clone</b>
459 <div class="short">Creates a duplicate of this collection</div>
465 Creates a duplicate of this collection
476 <dl class="detailList">
477 <dt class="heading">Returns:</dt>
479 <dd><span class="fixedFont">MixedCollection</span> </dd>
495 Roo.util.MixedCollection
501 <tr class="method-row config-row-alt1 expandable notInherited">
502 <td class="micon"><a class="exi" href="#expand"> </a></td>
506 <a id="Roo.util.MixedCollection-method-contains" name=".contains"></a>
507 <div class="fixedFont">
508 <span class="attributes"></span><b class="itemname">contains</b>
510 (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>o</i></B>)
516 <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a>
525 <div class="short">Returns true if the collection contains the passed Object as an item.</div>
531 Returns true if the collection contains the passed Object as an item.
538 <dl class="detailList">
539 <dt class="heading">Parameters:</dt>
542 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>o</b>
545 <dd>The Object to look for in the collection.</dd>
553 <dl class="detailList">
554 <dt class="heading">Returns:</dt>
556 <dd><span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span> True if the collection contains the Object as an item.</dd>
572 Roo.util.MixedCollection
578 <tr class="method-row config-row-alt0 expandable notInherited">
579 <td class="micon"><a class="exi" href="#expand"> </a></td>
583 <a id="Roo.util.MixedCollection-method-containsKey" name=".containsKey"></a>
584 <div class="fixedFont">
585 <span class="attributes"></span><b class="itemname">containsKey</b>
587 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>key</i></B>)
593 <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a>
602 <div class="short">Returns true if the collection contains the passed Object as a key.</div>
608 Returns true if the collection contains the passed Object as a key.
615 <dl class="detailList">
616 <dt class="heading">Parameters:</dt>
619 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>key</b>
622 <dd>The key to look for in the collection.</dd>
630 <dl class="detailList">
631 <dt class="heading">Returns:</dt>
633 <dd><span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span> True if the collection contains the Object as a key.</dd>
649 Roo.util.MixedCollection
655 <tr class="method-row config-row-alt1 expandable notInherited">
656 <td class="micon"><a class="exi" href="#expand"> </a></td>
660 <a id="Roo.util.MixedCollection-method-each" name=".each"></a>
661 <div class="fixedFont">
662 <span class="attributes"></span><b class="itemname">each</b>
664 (<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>)
671 <div class="short">Executes the specified function once for every item in the collection, passing each<br/>item as the first and only parameter.</div>
677 Executes the specified function once for every item in the collection, passing each<br/>item as the first and only parameter. returning false from the function will stop the iteration.
684 <dl class="detailList">
685 <dt class="heading">Parameters:</dt>
688 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>fn</b>
691 <dd>The function to execute for each item.</dd>
694 <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>
697 <dd>(optional) The scope in which to execute the function.</dd>
717 Roo.util.MixedCollection
723 <tr class="method-row config-row-alt0 expandable notInherited">
724 <td class="micon"><a class="exi" href="#expand"> </a></td>
728 <a id="Roo.util.MixedCollection-method-eachKey" name=".eachKey"></a>
729 <div class="fixedFont">
730 <span class="attributes"></span><b class="itemname">eachKey</b>
732 (<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>)
739 <div class="short">Executes the specified function once for every key in the collection, passing each<br/>key, and its associated item as the first two parameters.</div>
745 Executes the specified function once for every key in the collection, passing each<br/>key, and its associated item as the first two parameters.
752 <dl class="detailList">
753 <dt class="heading">Parameters:</dt>
756 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>fn</b>
759 <dd>The function to execute for each item.</dd>
762 <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>
765 <dd>(optional) The scope in which to execute the function.</dd>
785 Roo.util.MixedCollection
791 <tr class="method-row config-row-alt1 expandable notInherited">
792 <td class="micon"><a class="exi" href="#expand"> </a></td>
796 <a id="Roo.util.MixedCollection-method-filter" name=".filter"></a>
797 <div class="fixedFont">
798 <span class="attributes"></span><b class="itemname">filter</b>
800 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>property</i></B>, <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/RegExp <B><i>value</i></B>)
815 <div class="short">Filter the <i>objects</i> in this collection by a specific property.</div>
821 Filter the <i>objects</i> in this collection by a specific property. <br/>Returns a new collection that has been filtered.
828 <dl class="detailList">
829 <dt class="heading">Parameters:</dt>
832 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>property</b>
835 <dd>A property on your objects</dd>
838 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/RegExp</span> <b>value</b>
841 <dd>Either string that the property values <br/>should start with or a RegExp to test against the property</dd>
849 <dl class="detailList">
850 <dt class="heading">Returns:</dt>
852 <dd><span class="fixedFont">MixedCollection</span> The new filtered collection</dd>
868 Roo.util.MixedCollection
874 <tr class="method-row config-row-alt0 expandable notInherited">
875 <td class="micon"><a class="exi" href="#expand"> </a></td>
879 <a id="Roo.util.MixedCollection-method-filterBy" name=".filterBy"></a>
880 <div class="fixedFont">
881 <span class="attributes"></span><b class="itemname">filterBy</b>
883 (<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>)
898 <div class="short">Filter by a function.</div>
904 Filter by a function. * Returns a new collection that has been filtered.<br/>The passed function will be called with each <br/>object in the collection. If the function returns true, the value is included <br/>otherwise it is filtered.
911 <dl class="detailList">
912 <dt class="heading">Parameters:</dt>
915 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>fn</b>
918 <dd>The function to be called, it will receive the args o (the object), k (the key)</dd>
921 <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>
924 <dd>(optional) The scope of the function (defaults to this)</dd>
932 <dl class="detailList">
933 <dt class="heading">Returns:</dt>
935 <dd><span class="fixedFont">MixedCollection</span> The new filtered collection</dd>
951 Roo.util.MixedCollection
957 <tr class="method-row config-row-alt1 expandable notInherited">
958 <td class="micon"><a class="exi" href="#expand"> </a></td>
962 <a id="Roo.util.MixedCollection-method-find" name=".find"></a>
963 <div class="fixedFont">
964 <span class="attributes"></span><b class="itemname">find</b>
966 (<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>)
972 <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a>
981 <div class="short">Returns the first item in the collection which elicits a true return value from the<br/>passed selection function.</div>
987 Returns the first item in the collection which elicits a true return value from the<br/>passed selection function.
994 <dl class="detailList">
995 <dt class="heading">Parameters:</dt>
998 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>fn</b>
1001 <dd>The selection function to execute for each item.</dd>
1004 <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>
1007 <dd>(optional) The scope in which to execute the function.</dd>
1015 <dl class="detailList">
1016 <dt class="heading">Returns:</dt>
1018 <dd><span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> The first item in the collection which returned true from the selection function.</dd>
1032 <td class="msource">
1034 Roo.util.MixedCollection
1040 <tr class="method-row config-row-alt0 expandable notInherited">
1041 <td class="micon"><a class="exi" href="#expand"> </a></td>
1045 <a id="Roo.util.MixedCollection-method-first" name=".first"></a>
1046 <div class="fixedFont">
1047 <span class="attributes"></span><b class="itemname">first</b>
1055 <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a>
1064 <div class="short">Returns the first item in the collection.</div>
1070 Returns the first item in the collection.
1081 <dl class="detailList">
1082 <dt class="heading">Returns:</dt>
1084 <dd><span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> the first item in the collection..</dd>
1098 <td class="msource">
1100 Roo.util.MixedCollection
1106 <tr class="method-row config-row-alt1 expandable notInherited">
1107 <td class="micon"><a class="exi" href="#expand"> </a></td>
1111 <a id="Roo.util.MixedCollection-method-get" name=".get"></a>
1112 <div class="fixedFont">
1113 <span class="attributes"></span><b class="itemname">get</b>
1115 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/Number <B><i>key</i></B>)
1121 <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a>
1130 <div class="short">Returns the item associated with the passed key or index.</div>
1136 Returns the item associated with the passed key or index.
1143 <dl class="detailList">
1144 <dt class="heading">Parameters:</dt>
1147 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/Number</span> <b>key</b>
1150 <dd>The key or index of the item.</dd>
1158 <dl class="detailList">
1159 <dt class="heading">Returns:</dt>
1161 <dd><span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> The item associated with the passed key.</dd>
1175 <td class="msource">
1177 Roo.util.MixedCollection
1183 <tr class="method-row config-row-alt0 expandable notInherited">
1184 <td class="micon"><a class="exi" href="#expand"> </a></td>
1188 <a id="Roo.util.MixedCollection-method-getCount" name=".getCount"></a>
1189 <div class="fixedFont">
1190 <span class="attributes"></span><b class="itemname">getCount</b>
1198 <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a>
1207 <div class="short">Returns the number of items in the collection.</div>
1213 Returns the number of items in the collection.
1224 <dl class="detailList">
1225 <dt class="heading">Returns:</dt>
1227 <dd><span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> the number of items in the collection.</dd>
1241 <td class="msource">
1243 Roo.util.MixedCollection
1249 <tr class="method-row config-row-alt1 expandable notInherited">
1250 <td class="micon"><a class="exi" href="#expand"> </a></td>
1254 <a id="Roo.util.MixedCollection-method-getKey" name=".getKey"></a>
1255 <div class="fixedFont">
1256 <span class="attributes"></span><b class="itemname">getKey</b>
1264 <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a>
1273 <div class="short">MixedCollection has a generic way to fetch keys if you implement getKey.</div>
1279 MixedCollection has a generic way to fetch keys if you implement getKey.<br/><pre><code><br/>// normal way<br/>var mc = new Roo.util.MixedCollection();<br/>mc.add(someEl.dom.id, someEl);<br/>mc.add(otherEl.dom.id, otherEl);<br/>//and so on<br/><br/>// using getKey<br/>var mc = new Roo.util.MixedCollection();<br/>mc.getKey = function(el){<br/> return el.dom.id;<br/>};<br/>mc.add(someEl);<br/>mc.add(otherEl);<br/><br/>// or via the constructor<br/>var mc = new Roo.util.MixedCollection(false, function(el){<br/> return el.dom.id;<br/>});<br/>mc.add(someEl);<br/>mc.add(otherEl);<br/></code></pre>
1286 <dl class="detailList">
1287 <dt class="heading">Parameters:</dt>
1293 <dd>{Object} The item for which to find the key.</dd>
1301 <dl class="detailList">
1302 <dt class="heading">Returns:</dt>
1304 <dd><span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> The key for the passed item.</dd>
1318 <td class="msource">
1320 Roo.util.MixedCollection
1326 <tr class="method-row config-row-alt0 expandable notInherited">
1327 <td class="micon"><a class="exi" href="#expand"> </a></td>
1331 <a id="Roo.util.MixedCollection-method-getRange" name=".getRange"></a>
1332 <div class="fixedFont">
1333 <span class="attributes"></span><b class="itemname">getRange</b>
1335 (<a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>startIndex</i></B>, <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>endIndex</i></B>)
1341 <a href="./Array.html#constructor" roo:cls="Array.html#constructor">Array</a>
1350 <div class="short">Returns a range of items in this collection</div>
1356 Returns a range of items in this collection
1363 <dl class="detailList">
1364 <dt class="heading">Parameters:</dt>
1367 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>startIndex</b>
1370 <dd>(optional) defaults to 0</dd>
1373 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>endIndex</b>
1376 <dd>(optional) default to the last item</dd>
1384 <dl class="detailList">
1385 <dt class="heading">Returns:</dt>
1387 <dd><span class="fixedFont"><a href="./Array.html#constructor" roo:cls="Array.html#constructor">Array</a></span> An array of items</dd>
1401 <td class="msource">
1403 Roo.util.MixedCollection
1409 <tr class="method-row config-row-alt1 expandable notInherited">
1410 <td class="micon"><a class="exi" href="#expand"> </a></td>
1414 <a id="Roo.util.MixedCollection-method-indexOf" name=".indexOf"></a>
1415 <div class="fixedFont">
1416 <span class="attributes"></span><b class="itemname">indexOf</b>
1418 (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>o</i></B>)
1424 <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a>
1433 <div class="short">Returns index within the collection of the passed Object.</div>
1439 Returns index within the collection of the passed Object.
1446 <dl class="detailList">
1447 <dt class="heading">Parameters:</dt>
1450 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>o</b>
1453 <dd>The item to find the index of.</dd>
1461 <dl class="detailList">
1462 <dt class="heading">Returns:</dt>
1464 <dd><span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> index of the item.</dd>
1478 <td class="msource">
1480 Roo.util.MixedCollection
1486 <tr class="method-row config-row-alt0 expandable notInherited">
1487 <td class="micon"><a class="exi" href="#expand"> </a></td>
1491 <a id="Roo.util.MixedCollection-method-indexOfKey" name=".indexOfKey"></a>
1492 <div class="fixedFont">
1493 <span class="attributes"></span><b class="itemname">indexOfKey</b>
1495 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>key</i></B>)
1501 <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a>
1510 <div class="short">Returns index within the collection of the passed key.</div>
1516 Returns index within the collection of the passed key.
1523 <dl class="detailList">
1524 <dt class="heading">Parameters:</dt>
1527 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>key</b>
1530 <dd>The key to find the index of.</dd>
1538 <dl class="detailList">
1539 <dt class="heading">Returns:</dt>
1541 <dd><span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> index of the key.</dd>
1555 <td class="msource">
1557 Roo.util.MixedCollection
1563 <tr class="method-row config-row-alt1 expandable notInherited">
1564 <td class="micon"><a class="exi" href="#expand"> </a></td>
1568 <a id="Roo.util.MixedCollection-method-insert" name=".insert"></a>
1569 <div class="fixedFont">
1570 <span class="attributes"></span><b class="itemname">insert</b>
1572 (<a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>index</i></B>, <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>key</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>o</i></B>)
1578 <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a>
1587 <div class="short">Inserts an item at the specified index in the collection.</div>
1593 Inserts an item at the specified index in the collection.
1600 <dl class="detailList">
1601 <dt class="heading">Parameters:</dt>
1604 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>index</b>
1607 <dd>The index to insert the item at.</dd>
1610 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>key</b>
1613 <dd>The key to associate with the new item, or the item itself.</dd>
1616 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>o</b>
1619 <dd>(optional) If the second parameter was a key, the new item.</dd>
1627 <dl class="detailList">
1628 <dt class="heading">Returns:</dt>
1630 <dd><span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> The item inserted.</dd>
1644 <td class="msource">
1646 Roo.util.MixedCollection
1652 <tr class="method-row config-row-alt0 expandable notInherited">
1653 <td class="micon"><a class="exi" href="#expand"> </a></td>
1657 <a id="Roo.util.MixedCollection-method-item" name=".item"></a>
1658 <div class="fixedFont">
1659 <span class="attributes"></span><b class="itemname">item</b>
1661 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/Number <B><i>key</i></B>)
1667 <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a>
1676 <div class="short">Returns the item associated with the passed key OR index.</div>
1682 Returns the item associated with the passed key OR index. Key has priority over index.
1689 <dl class="detailList">
1690 <dt class="heading">Parameters:</dt>
1693 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/Number</span> <b>key</b>
1696 <dd>The key or index of the item.</dd>
1704 <dl class="detailList">
1705 <dt class="heading">Returns:</dt>
1707 <dd><span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> The item associated with the passed key.</dd>
1721 <td class="msource">
1723 Roo.util.MixedCollection
1729 <tr class="method-row config-row-alt1 expandable notInherited">
1730 <td class="micon"><a class="exi" href="#expand"> </a></td>
1734 <a id="Roo.util.MixedCollection-method-itemAt" name=".itemAt"></a>
1735 <div class="fixedFont">
1736 <span class="attributes"></span><b class="itemname">itemAt</b>
1738 (<a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>index</i></B>)
1744 <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a>
1753 <div class="short">Returns the item at the specified index.</div>
1759 Returns the item at the specified index.
1766 <dl class="detailList">
1767 <dt class="heading">Parameters:</dt>
1770 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>index</b>
1773 <dd>The index of the item.</dd>
1781 <dl class="detailList">
1782 <dt class="heading">Returns:</dt>
1784 <dd><span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> </dd>
1798 <td class="msource">
1800 Roo.util.MixedCollection
1806 <tr class="method-row config-row-alt0 expandable notInherited">
1807 <td class="micon"><a class="exi" href="#expand"> </a></td>
1811 <a id="Roo.util.MixedCollection-method-key" name=".key"></a>
1812 <div class="fixedFont">
1813 <span class="attributes"></span><b class="itemname">key</b>
1815 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/Number <B><i>key</i></B>)
1821 <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a>
1830 <div class="short">Returns the item associated with the passed key.</div>
1836 Returns the item associated with the passed key.
1843 <dl class="detailList">
1844 <dt class="heading">Parameters:</dt>
1847 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/Number</span> <b>key</b>
1850 <dd>The key of the item.</dd>
1858 <dl class="detailList">
1859 <dt class="heading">Returns:</dt>
1861 <dd><span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> The item associated with the passed key.</dd>
1875 <td class="msource">
1877 Roo.util.MixedCollection
1883 <tr class="method-row config-row-alt1 expandable notInherited">
1884 <td class="micon"><a class="exi" href="#expand"> </a></td>
1888 <a id="Roo.util.MixedCollection-method-keySort" name=".keySort"></a>
1889 <div class="fixedFont">
1890 <span class="attributes"></span><b class="itemname">keySort</b>
1892 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>direction</i></B>, <a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a> <B><i>fn</i></B>)
1899 <div class="short">Sorts this collection by keys</div>
1905 Sorts this collection by keys
1912 <dl class="detailList">
1913 <dt class="heading">Parameters:</dt>
1916 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>direction</b>
1919 <dd>(optional) "ASC" or "DESC"</dd>
1922 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>fn</b>
1925 <dd>(optional) a comparison function (defaults to case insensitive string)</dd>
1943 <td class="msource">
1945 Roo.util.MixedCollection
1951 <tr class="method-row config-row-alt0 expandable notInherited">
1952 <td class="micon"><a class="exi" href="#expand"> </a></td>
1956 <a id="Roo.util.MixedCollection-method-last" name=".last"></a>
1957 <div class="fixedFont">
1958 <span class="attributes"></span><b class="itemname">last</b>
1966 <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a>
1975 <div class="short">Returns the last item in the collection.</div>
1981 Returns the last item in the collection.
1992 <dl class="detailList">
1993 <dt class="heading">Returns:</dt>
1995 <dd><span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> the last item in the collection..</dd>
2009 <td class="msource">
2011 Roo.util.MixedCollection
2017 <tr class="method-row config-row-alt1 expandable notInherited">
2018 <td class="micon"><a class="exi" href="#expand"> </a></td>
2022 <a id="Roo.util.MixedCollection-method-remove" name=".remove"></a>
2023 <div class="fixedFont">
2024 <span class="attributes"></span><b class="itemname">remove</b>
2026 (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>o</i></B>)
2032 <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a>
2041 <div class="short">Removed an item from the collection.</div>
2047 Removed an item from the collection.
2054 <dl class="detailList">
2055 <dt class="heading">Parameters:</dt>
2058 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>o</b>
2061 <dd>The item to remove.</dd>
2069 <dl class="detailList">
2070 <dt class="heading">Returns:</dt>
2072 <dd><span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> The item removed.</dd>
2086 <td class="msource">
2088 Roo.util.MixedCollection
2094 <tr class="method-row config-row-alt0 expandable notInherited">
2095 <td class="micon"><a class="exi" href="#expand"> </a></td>
2099 <a id="Roo.util.MixedCollection-method-removeAt" name=".removeAt"></a>
2100 <div class="fixedFont">
2101 <span class="attributes"></span><b class="itemname">removeAt</b>
2103 (<a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>index</i></B>)
2110 <div class="short">Remove an item from a specified index in the collection.</div>
2116 Remove an item from a specified index in the collection.
2123 <dl class="detailList">
2124 <dt class="heading">Parameters:</dt>
2127 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>index</b>
2130 <dd>The index within the collection of the item to remove.</dd>
2148 <td class="msource">
2150 Roo.util.MixedCollection
2156 <tr class="method-row config-row-alt1 expandable notInherited">
2157 <td class="micon"><a class="exi" href="#expand"> </a></td>
2161 <a id="Roo.util.MixedCollection-method-removeKey" name=".removeKey"></a>
2162 <div class="fixedFont">
2163 <span class="attributes"></span><b class="itemname">removeKey</b>
2165 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>key</i></B>)
2172 <div class="short">Removed an item associated with the passed key fom the collection.</div>
2178 Removed an item associated with the passed key fom the collection.
2185 <dl class="detailList">
2186 <dt class="heading">Parameters:</dt>
2189 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>key</b>
2192 <dd>The key of the item to remove.</dd>
2210 <td class="msource">
2212 Roo.util.MixedCollection
2218 <tr class="method-row config-row-alt0 expandable notInherited">
2219 <td class="micon"><a class="exi" href="#expand"> </a></td>
2223 <a id="Roo.util.MixedCollection-method-replace" name=".replace"></a>
2224 <div class="fixedFont">
2225 <span class="attributes"></span><b class="itemname">replace</b>
2227 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>key</i></B>, <B><i>o</i></B>)
2233 <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a>
2242 <div class="short">Replaces an item in the collection.</div>
2248 Replaces an item in the collection.
2255 <dl class="detailList">
2256 <dt class="heading">Parameters:</dt>
2259 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>key</b>
2262 <dd>The key associated with the item to replace, or the item to replace.</dd>
2268 <dd>{Object} o (optional) If the first parameter passed was a key, the item to associate with that key.</dd>
2276 <dl class="detailList">
2277 <dt class="heading">Returns:</dt>
2279 <dd><span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> The new item.</dd>
2293 <td class="msource">
2295 Roo.util.MixedCollection
2301 <tr class="method-row config-row-alt1 expandable notInherited">
2302 <td class="micon"><a class="exi" href="#expand"> </a></td>
2306 <a id="Roo.util.MixedCollection-method-sort" name=".sort"></a>
2307 <div class="fixedFont">
2308 <span class="attributes"></span><b class="itemname">sort</b>
2310 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>direction</i></B>, <a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a> <B><i>fn</i></B>)
2317 <div class="short">Sorts this collection with the passed comparison function</div>
2323 Sorts this collection with the passed comparison function
2330 <dl class="detailList">
2331 <dt class="heading">Parameters:</dt>
2334 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>direction</b>
2337 <dd>(optional) "ASC" or "DESC"</dd>
2340 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>fn</b>
2343 <dd>(optional) comparison function</dd>
2361 <td class="msource">
2363 Roo.util.MixedCollection
2372 <!-- ============================== events summary / details ======================== -->
2375 <a id="Roo.util.MixedCollection-events"></a>
2384 <table cellspacing="0" class="member-table">
2385 <caption>Events</caption>
2388 <th class="sig-header" colspan="2">Event</th>
2389 <th class="msource-header">Defined By</th>
2398 <tr class="method-row expandable config-row-alt0 notInherited">
2399 <td class="micon"><a class="exi" href="#expand"> </a></td>
2402 <a id="Roo.util.MixedCollection-event-*add"></a>
2404 <div class="fixedFont">
2405 <b class="itemname">add</b> (<a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>index</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>o</i></B>, <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>key</i></B>)
2411 <div class="short">Fires when an item is added to the collection.
2417 Fires when an item is added to the collection.
2423 <dl class="detailList">
2424 <dt class="heading">Parameters:</dt>
2427 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>index</b>
2430 <dd>The index at which the item was added.</dd>
2433 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>o</b>
2436 <dd>The item added.</dd>
2439 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>key</b>
2442 <dd>The key associated with the added item.</dd>
2460 <td class="msource">
2461 Roo.util.MixedCollection
2465 <tr class="method-row expandable config-row-alt1 notInherited">
2466 <td class="micon"><a class="exi" href="#expand"> </a></td>
2469 <a id="Roo.util.MixedCollection-event-*clear"></a>
2471 <div class="fixedFont">
2472 <b class="itemname">clear</b> ()
2478 <div class="short">Fires when the collection is cleared.
2484 Fires when the collection is cleared.
2504 <td class="msource">
2505 Roo.util.MixedCollection
2509 <tr class="method-row expandable config-row-alt0 notInherited">
2510 <td class="micon"><a class="exi" href="#expand"> </a></td>
2513 <a id="Roo.util.MixedCollection-event-*remove"></a>
2515 <div class="fixedFont">
2516 <b class="itemname">remove</b> (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>o</i></B>, <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>key</i></B>)
2522 <div class="short">Fires when an item is removed from the collection.
2528 Fires when an item is removed from the collection.
2534 <dl class="detailList">
2535 <dt class="heading">Parameters:</dt>
2538 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>o</b>
2541 <dd>The item being removed.</dd>
2544 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>key</b>
2547 <dd>(optional) The key associated with the removed item.</dd>
2565 <td class="msource">
2566 Roo.util.MixedCollection
2570 <tr class="method-row expandable config-row-alt1 notInherited">
2571 <td class="micon"><a class="exi" href="#expand"> </a></td>
2574 <a id="Roo.util.MixedCollection-event-*replace"></a>
2576 <div class="fixedFont">
2577 <b class="itemname">replace</b> (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>key</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>old</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>new</i></B>)
2583 <div class="short">Fires when an item is replaced in the collection.
2589 Fires when an item is replaced in the collection.
2595 <dl class="detailList">
2596 <dt class="heading">Parameters:</dt>
2599 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>key</b>
2602 <dd>he key associated with the new added.</dd>
2605 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>old</b>
2608 <dd>The item being replaced.</dd>
2611 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>new</b>
2614 <dd>The new item.</dd>
2632 <td class="msource">
2633 Roo.util.MixedCollection
2644 <!-- ============================== footer ================================= -->
2645 <div class="fineprint" style="clear:both">
2647 Documentation generated by <a href="http://www.akbkhome.com" target="_blankt">Introspection Doc Generator</a> on Fri Jul 16 2010 19:32:59 GMT+0800 (HKT)
2649 <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a>