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