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"> |
---|
38 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
39 | <td class="sig"> |
---|
40 | <a id="Ext.ComponentMgr-all"></a> |
---|
41 | <b>all</b> : MixedCollection <div class="mdesc"> |
---|
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> |
---|
44 | <div class="long"> |
---|
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> |
---|
47 | </div> |
---|
48 | </td> |
---|
49 | <td class="msource">ComponentMgr</td> |
---|
50 | </tr> |
---|
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"> |
---|
60 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
61 | <td class="sig"> |
---|
62 | <a id="Ext.ComponentMgr-create"></a> |
---|
63 | <b>create</b>( <code>config {Object}</code>, <code>defaultType {Constructor}</code> ) : Ext.Component <div class="mdesc"> |
---|
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> |
---|
66 | <div class="long"> |
---|
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"> |
---|
69 | <strong>Parameters:</strong> |
---|
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> |
---|
72 | <strong>Returns:</strong> |
---|
73 | <ul> |
---|
74 | <li><code>Ext.Component</code><div class="sub-desc">The newly instantiated Component.</div></li> |
---|
75 | </ul> |
---|
76 | </div> |
---|
77 | </div> |
---|
78 | </div> |
---|
79 | </td> |
---|
80 | <td class="msource">ComponentMgr</td> |
---|
81 | </tr> |
---|
82 | <tr class="method-row alt expandable"> |
---|
83 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
84 | <td class="sig"> |
---|
85 | <a id="Ext.ComponentMgr-get"></a> |
---|
86 | <b>get</b>( <code>String id</code> ) : Ext.Component <div class="mdesc"> |
---|
87 | <div class="short">Returns a component by id</div> |
---|
88 | <div class="long"> |
---|
89 | Returns a component by id <div class="mdetail-params"> |
---|
90 | <strong>Parameters:</strong> |
---|
91 | <ul><li><code>id</code> : String<div class="sub-desc">The component id</div></li> </ul> |
---|
92 | <strong>Returns:</strong> |
---|
93 | <ul> |
---|
94 | <li><code>Ext.Component</code></li> |
---|
95 | </ul> |
---|
96 | </div> |
---|
97 | </div> |
---|
98 | </div> |
---|
99 | </td> |
---|
100 | <td class="msource">ComponentMgr</td> |
---|
101 | </tr> |
---|
102 | <tr class="method-row expandable"> |
---|
103 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
104 | <td class="sig"> |
---|
105 | <a id="Ext.ComponentMgr-onAvailable"></a> |
---|
106 | <b>onAvailable</b>( <code>String id</code>, <code>Function fn</code>, <code>Object scope</code> ) : void <div class="mdesc"> |
---|
107 | <div class="short">Registers a function that will be called when a specified component is added to ComponentMgr</div> |
---|
108 | <div class="long"> |
---|
109 | Registers a function that will be called when a specified component is added to ComponentMgr <div class="mdetail-params"> |
---|
110 | <strong>Parameters:</strong> |
---|
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> |
---|
112 | <strong>Returns:</strong> |
---|
113 | <ul> |
---|
114 | <li><code>void</code></li> |
---|
115 | </ul> |
---|
116 | </div> |
---|
117 | </div> |
---|
118 | </div> |
---|
119 | </td> |
---|
120 | <td class="msource">ComponentMgr</td> |
---|
121 | </tr> |
---|
122 | <tr class="method-row alt expandable"> |
---|
123 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
124 | <td class="sig"> |
---|
125 | <a id="Ext.ComponentMgr-register"></a> |
---|
126 | <b>register</b>( <code>Ext.Component c</code> ) : void <div class="mdesc"> |
---|
127 | <div class="short">Registers a component.</div> |
---|
128 | <div class="long"> |
---|
129 | Registers a component. <div class="mdetail-params"> |
---|
130 | <strong>Parameters:</strong> |
---|
131 | <ul><li><code>c</code> : Ext.Component<div class="sub-desc">The component</div></li> </ul> |
---|
132 | <strong>Returns:</strong> |
---|
133 | <ul> |
---|
134 | <li><code>void</code></li> |
---|
135 | </ul> |
---|
136 | </div> |
---|
137 | </div> |
---|
138 | </div> |
---|
139 | </td> |
---|
140 | <td class="msource">ComponentMgr</td> |
---|
141 | </tr> |
---|
142 | <tr class="method-row expandable"> |
---|
143 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
144 | <td class="sig"> |
---|
145 | <a id="Ext.ComponentMgr-registerType"></a> |
---|
146 | <b>registerType</b>( <code>String xtype</code>, <code>Constructor cls</code> ) : void <div class="mdesc"> |
---|
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> |
---|
150 | <div class="long"> |
---|
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"> |
---|
156 | <strong>Parameters:</strong> |
---|
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> |
---|
159 | <strong>Returns:</strong> |
---|
160 | <ul> |
---|
161 | <li><code>void</code></li> |
---|
162 | </ul> |
---|
163 | </div> |
---|
164 | </div> |
---|
165 | </div> |
---|
166 | </td> |
---|
167 | <td class="msource">ComponentMgr</td> |
---|
168 | </tr> |
---|
169 | <tr class="method-row alt expandable"> |
---|
170 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
171 | <td class="sig"> |
---|
172 | <a id="Ext.ComponentMgr-unregister"></a> |
---|
173 | <b>unregister</b>( <code>Ext.Component c</code> ) : void <div class="mdesc"> |
---|
174 | <div class="short">Unregisters a component.</div> |
---|
175 | <div class="long"> |
---|
176 | Unregisters a component. <div class="mdetail-params"> |
---|
177 | <strong>Parameters:</strong> |
---|
178 | <ul><li><code>c</code> : Ext.Component<div class="sub-desc">The component</div></li> </ul> |
---|
179 | <strong>Returns:</strong> |
---|
180 | <ul> |
---|
181 | <li><code>void</code></li> |
---|
182 | </ul> |
---|
183 | </div> |
---|
184 | </div> |
---|
185 | </div> |
---|
186 | </td> |
---|
187 | <td class="msource">ComponentMgr</td> |
---|
188 | </tr> |
---|
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> |
---|