commit extjs-2.2.1
[extjs.git] / docs / output / Ext.ComponentMgr.html
1         <div class="body-wrap">
2         <div class="top-tools">
3             <a class="inner-link" href="#Ext.ComponentMgr-props"><img src="../resources/images/default/s.gif" class="item-icon icon-prop">Properties</a>
4             <a class="inner-link" href="#Ext.ComponentMgr-methods"><img src="../resources/images/default/s.gif" class="item-icon icon-method">Methods</a>
5             <a class="inner-link" href="#Ext.ComponentMgr-events"><img src="../resources/images/default/s.gif" class="item-icon icon-event">Events</a>
6                         <a class="bookmark" href="../docs/?class=Ext.ComponentMgr"><img src="../resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a>
7         </div>
8                 <h1>Class Ext.ComponentMgr</h1>
9         <table cellspacing="0">
10             <tr><td class="label">Package:</td><td class="hd-info">Ext</td></tr>
11             <tr><td class="label">Defined In:</td><td class="hd-info"><a href="../src/ComponentMgr.js" target="_blank">ComponentMgr.js</a></td></tr>
12             <tr><td class="label">Class:</td><td class="hd-info">ComponentMgr</td></tr>
13                                     <tr><td class="label">Extends:</td><td class="hd-info">Object</td></tr>
14                     </table>
15         <div class="description">
16             *
17 <p>Provides a registry of all Components (instances of <a ext:cls="Ext.Component" href="output/Ext.Component.html">Ext.Component</a> or any subclass
18 thereof) on a page so that they can be easily accessed by component id (see <a ext:cls="Ext.ComponentMgr" ext:member="get" href="output/Ext.ComponentMgr.html#get">get</a>, or
19 the convenience method <a ext:cls="Ext" ext:member="getCmp" href="output/Ext.html#getCmp">Ext.getCmp</a>).</p>
20 <p>This object also provides a registry of available Component <i>classes</i>
21 indexed by a mnemonic code known as the Component's <a ext:cls="Ext.Component" ext:member="xtype" href="output/Ext.Component.html#xtype">xtype</a>.
22 The <tt>xtype</tt> provides a way to avoid instantiating child Components
23 when creating a full, nested config object for a complete Ext page.</p>
24 <p>A child Component may be specified simply as a <i>config object</i>
25 as long as the correct xtype is specified so that if and when the Component
26 needs rendering, the correct type can be looked up for lazy instantiation.</p>
27 <p>For a list of all available xtypes, see <a ext:cls="Ext.Component" href="output/Ext.Component.html">Ext.Component</a>.</p><br><br><i>This class is a singleton and cannot be created directly.</i>        </div>
28         
29         <div class="hr"></div>
30                 <a id="Ext.ComponentMgr-props"></a>
31         <h2>Public Properties</h2>
32                 <table cellspacing="0" class="member-table">
33             <tr>
34                 <th class="sig-header" colspan="2">Property</th>
35                 <th class="msource-header">Defined By</th>
36             </tr>
37                 <tr class="property-row expandable">\r
38         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
39         <td class="sig">\r
40         <a id="Ext.ComponentMgr-all"></a>\r
41             <b>all</b> : MixedCollection            <div class="mdesc">\r
42                         <div class="short">The MixedCollection used internally for the component cache. An example usage may be subscribing to
43 events on the Mix...</div>\r
44             <div class="long">\r
45                 The MixedCollection used internally for the component cache. An example usage may be subscribing to
46 events on the MixedCollection to monitor addition or removal.  Read-only.            </div>\r
47                         </div>\r
48         </td>\r
49         <td class="msource">ComponentMgr</td>\r
50     </tr>\r
51             </table>
52                 <a id="Ext.ComponentMgr-methods"></a>
53         <h2>Public Methods</h2>
54                 <table cellspacing="0" class="member-table">
55             <tr>
56                 <th class="sig-header" colspan="2">Method</th>
57                 <th class="msource-header">Defined By</th>
58             </tr>
59                 <tr class="method-row expandable">\r
60         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
61         <td class="sig">\r
62         <a id="Ext.ComponentMgr-create"></a>\r
63             <b>create</b>(&nbsp;<code>config {Object}</code>, <code>defaultType {Constructor}</code>&nbsp;) : Ext.Component            <div class="mdesc">\r
64                         <div class="short">Creates a new Component from the specified config object using the
65 config object's xtype to determine the class to in...</div>\r
66             <div class="long">\r
67                 Creates a new Component from the specified config object using the
68 config object's <a ext:cls="Ext.component" ext:member="xtype" href="output/Ext.component.html#xtype">xtype</a> to determine the class to instantiate.    <div class="mdetail-params">\r
69         <strong>Parameters:</strong>\r
70         <ul><li><code>{Object}</code> : config<div class="sub-desc">A configuration object for the Component you wish to create.</div></li><li><code>{Constructor}</code> : defaultType<div class="sub-desc">The constructor to provide the default Component type if
71 the config object does not contain an xtype. (Optional if the config contains an xtype).</div></li>        </ul>\r
72         <strong>Returns:</strong>\r
73         <ul>\r
74             <li><code>Ext.Component</code><div class="sub-desc">The newly instantiated Component.</div></li>\r
75         </ul>\r
76     </div>\r
77                 </div>\r
78                         </div>\r
79         </td>\r
80         <td class="msource">ComponentMgr</td>\r
81     </tr>\r
82         <tr class="method-row alt expandable">\r
83         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
84         <td class="sig">\r
85         <a id="Ext.ComponentMgr-get"></a>\r
86             <b>get</b>(&nbsp;<code>String id</code>&nbsp;) : Ext.Component            <div class="mdesc">\r
87                         <div class="short">Returns a component by id</div>\r
88             <div class="long">\r
89                 Returns a component by id    <div class="mdetail-params">\r
90         <strong>Parameters:</strong>\r
91         <ul><li><code>id</code> : String<div class="sub-desc">The component id</div></li>        </ul>\r
92         <strong>Returns:</strong>\r
93         <ul>\r
94             <li><code>Ext.Component</code></li>\r
95         </ul>\r
96     </div>\r
97                 </div>\r
98                         </div>\r
99         </td>\r
100         <td class="msource">ComponentMgr</td>\r
101     </tr>\r
102         <tr class="method-row expandable">\r
103         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
104         <td class="sig">\r
105         <a id="Ext.ComponentMgr-onAvailable"></a>\r
106             <b>onAvailable</b>(&nbsp;<code>String id</code>, <code>Function fn</code>, <code>Object scope</code>&nbsp;) : void            <div class="mdesc">\r
107                         <div class="short">Registers a function that will be called when a specified component is added to ComponentMgr</div>\r
108             <div class="long">\r
109                 Registers a function that will be called when a specified component is added to ComponentMgr    <div class="mdetail-params">\r
110         <strong>Parameters:</strong>\r
111         <ul><li><code>id</code> : String<div class="sub-desc">The component id</div></li><li><code>fn</code> : Function<div class="sub-desc">The callback function</div></li><li><code>scope</code> : Object<div class="sub-desc">The scope of the callback</div></li>        </ul>\r
112         <strong>Returns:</strong>\r
113         <ul>\r
114             <li><code>void</code></li>\r
115         </ul>\r
116     </div>\r
117                 </div>\r
118                         </div>\r
119         </td>\r
120         <td class="msource">ComponentMgr</td>\r
121     </tr>\r
122         <tr class="method-row alt expandable">\r
123         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
124         <td class="sig">\r
125         <a id="Ext.ComponentMgr-register"></a>\r
126             <b>register</b>(&nbsp;<code>Ext.Component c</code>&nbsp;) : void            <div class="mdesc">\r
127                         <div class="short">Registers a component.</div>\r
128             <div class="long">\r
129                 Registers a component.    <div class="mdetail-params">\r
130         <strong>Parameters:</strong>\r
131         <ul><li><code>c</code> : Ext.Component<div class="sub-desc">The component</div></li>        </ul>\r
132         <strong>Returns:</strong>\r
133         <ul>\r
134             <li><code>void</code></li>\r
135         </ul>\r
136     </div>\r
137                 </div>\r
138                         </div>\r
139         </td>\r
140         <td class="msource">ComponentMgr</td>\r
141     </tr>\r
142         <tr class="method-row expandable">\r
143         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
144         <td class="sig">\r
145         <a id="Ext.ComponentMgr-registerType"></a>\r
146             <b>registerType</b>(&nbsp;<code>String xtype</code>, <code>Constructor cls</code>&nbsp;) : void            <div class="mdesc">\r
147                         <div class="short">Registers a new Component constructor, keyed by a new
148 Ext.Component.xtype.
149 Use this method to register new subclasses...</div>\r
150             <div class="long">\r
151                 <p>Registers a new Component constructor, keyed by a new
152 <a ext:cls="Ext.Component" ext:member="xtype" href="output/Ext.Component.html#xtype">Ext.Component.xtype</a>.</p>
153 <p>Use this method to register new subclasses of <a ext:cls="Ext.Component" href="output/Ext.Component.html">Ext.Component</a> so
154 that lazy instantiation may be used when specifying child Components.
155 see <a ext:cls="Ext.Container" ext:member="items" href="output/Ext.Container.html#items">Ext.Container.items</a></p>    <div class="mdetail-params">\r
156         <strong>Parameters:</strong>\r
157         <ul><li><code>xtype</code> : String<div class="sub-desc">The mnemonic string by which the Component class
158 may be looked up.</div></li><li><code>cls</code> : Constructor<div class="sub-desc">The new Component class.</div></li>        </ul>\r
159         <strong>Returns:</strong>\r
160         <ul>\r
161             <li><code>void</code></li>\r
162         </ul>\r
163     </div>\r
164                 </div>\r
165                         </div>\r
166         </td>\r
167         <td class="msource">ComponentMgr</td>\r
168     </tr>\r
169         <tr class="method-row alt expandable">\r
170         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
171         <td class="sig">\r
172         <a id="Ext.ComponentMgr-unregister"></a>\r
173             <b>unregister</b>(&nbsp;<code>Ext.Component c</code>&nbsp;) : void            <div class="mdesc">\r
174                         <div class="short">Unregisters a component.</div>\r
175             <div class="long">\r
176                 Unregisters a component.    <div class="mdetail-params">\r
177         <strong>Parameters:</strong>\r
178         <ul><li><code>c</code> : Ext.Component<div class="sub-desc">The component</div></li>        </ul>\r
179         <strong>Returns:</strong>\r
180         <ul>\r
181             <li><code>void</code></li>\r
182         </ul>\r
183     </div>\r
184                 </div>\r
185                         </div>\r
186         </td>\r
187         <td class="msource">ComponentMgr</td>\r
188     </tr>\r
189             </table>
190                 <a id="Ext.ComponentMgr-events"></a>
191         <h2>Public Events</h2>
192         <div class="no-members">This class has no public events.</div>
193         </div>