📄 ext.component.html.svn-base
字号:
<div class="body-wrap"> <div class="top-tools"> <a class="inner-link" href="#Ext.Component-props"><img src="../resources/images/default/s.gif" class="item-icon icon-prop">Properties</a> <a class="inner-link" href="#Ext.Component-methods"><img src="../resources/images/default/s.gif" class="item-icon icon-method">Methods</a> <a class="inner-link" href="#Ext.Component-events"><img src="../resources/images/default/s.gif" class="item-icon icon-event">Events</a> <a class="inner-link" href="#Ext.Component-configs"><img src="../resources/images/default/s.gif" class="item-icon icon-config">Config Options</a> <a class="bookmark" href="../docs/?class=Ext.Component"><img src="../resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a> </div> <div class="inheritance res-block"><pre class="res-block-inner"><a ext:cls="Ext.util.Observable" ext:member="" href="output/Ext.util.Observable.html">Observable</a> <img src="resources/elbow-end.gif"/>Component</pre></div> <h1>Class Ext.Component</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">Component.js</td></tr> <tr><td class="label">Class:</td><td class="hd-info">Component</td></tr> <tr><td class="label">Subclasses:</td><td class="hd-info"><a ext:cls="Ext.BoxComponent" href="output/Ext.BoxComponent.html">BoxComponent</a>, <a ext:cls="Ext.Button" href="output/Ext.Button.html">Button</a>, <a ext:cls="Ext.ColorPalette" href="output/Ext.ColorPalette.html">ColorPalette</a>, <a ext:cls="Ext.DatePicker" href="output/Ext.DatePicker.html">DatePicker</a>, <a ext:cls="Ext.Editor" href="output/Ext.Editor.html">Editor</a>, <a ext:cls="Ext.menu.BaseItem" href="output/Ext.menu.BaseItem.html">BaseItem</a></td></tr> <tr><td class="label">Extends:</td><td class="hd-info"><a ext:cls="Ext.util.Observable" ext:member="" href="output/Ext.util.Observable.html">Observable</a></td></tr> </table> <div class="description"> <p>Base class for all Ext components. All subclasses of Component can automatically participate in the standardExt component lifecycle of creation, rendering and destruction. They also have automatic support for basic hide/showand enable/disable behavior. Component allows any subclass to be lazy-rendered into any <a ext:cls="Ext.Container" href="output/Ext.Container.html">Ext.Container</a> andto be automatically registered with the <a ext:cls="Ext.ComponentMgr" href="output/Ext.ComponentMgr.html">Ext.ComponentMgr</a> so that it can be referenced at any time via<a ext:cls="Ext" ext:member="getCmp" href="output/Ext.html#getCmp">Ext.getCmp</a>. All visual widgets that require rendering into a layout should subclass Component (or<a ext:cls="Ext.BoxComponent" href="output/Ext.BoxComponent.html">Ext.BoxComponent</a> if managed box model handling is required).</p><p>Every component has a specific xtype, which is its Ext-specific type name, along with methods for checking thextype like <a ext:cls="Ext.Component" ext:member="getXType" href="output/Ext.Component.html#getXType">getXType</a> and <a ext:cls="Ext.Component" ext:member="isXType" href="output/Ext.Component.html#isXType">isXType</a>. This is the list of all valid xtypes:</p><pre>xtype Class------------- ------------------box Ext.BoxComponentbutton Ext.Buttoncolorpalette Ext.ColorPalettecomponent Ext.Componentcontainer Ext.Containercycle Ext.CycleButtondataview Ext.DataViewdatepicker Ext.DatePickereditor Ext.Editoreditorgrid Ext.grid.EditorGridPanelgrid Ext.grid.GridPanelpaging Ext.PagingToolbarpanel Ext.Panelprogress Ext.ProgressBarpropertygrid Ext.grid.PropertyGridslider Ext.Slidersplitbutton Ext.SplitButtonstatusbar Ext.StatusBartabpanel Ext.TabPaneltreepanel Ext.tree.TreePanelviewport Ext.Viewportwindow Ext.WindowToolbar components---------------------------------------toolbar Ext.Toolbartbbutton Ext.Toolbar.Buttontbfill Ext.Toolbar.Filltbitem Ext.Toolbar.Itemtbseparator Ext.Toolbar.Separatortbspacer Ext.Toolbar.Spacertbsplit Ext.Toolbar.SplitButtontbtext Ext.Toolbar.TextItemForm components---------------------------------------form Ext.FormPanelcheckbox Ext.form.Checkboxcombo Ext.form.ComboBoxdatefield Ext.form.DateFieldfield Ext.form.Fieldfieldset Ext.form.FieldSethidden Ext.form.Hiddenhtmleditor Ext.form.HtmlEditorlabel Ext.form.Labelnumberfield Ext.form.NumberFieldradio Ext.form.Radiotextarea Ext.form.TextAreatextfield Ext.form.TextFieldtimefield Ext.form.TimeFieldtrigger Ext.form.TriggerField</pre> </div> <div class="hr"></div> <a id="Ext.Component-configs"></a> <h2>Config Options</h2> <table cellspacing="0" class="member-table"> <tr> <th class="sig-header" colspan="2">Config Options</th> <th class="msource-header">Defined By</th> </tr> <tr class="config-row">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.Component-allowDomMove"></a>
<b>allowDomMove</b> : Boolean <div class="mdesc">
Whether the component can move the Dom node when rendering (defaults to true). </div>
</td>
<td class="msource">Component</td>
</tr>
<tr class="config-row alt expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.Component-applyTo"></a>
<b>applyTo</b> : Mixed <div class="mdesc">
<div class="short">The id of the node, a DOM node or an existing Element corresponding to a DIV that is already present in the document ...</div>
<div class="long">
The id of the node, a DOM node or an existing Element corresponding to a DIV that is already present in the document that specifies some structural markup for this component. When applyTo is used, constituent parts of the component can also be specified by id or CSS class name within the main element, and the component being created may attempt to create its subcomponents from that markup if applicable. Using this config, a call to render() is not required. If applyTo is specified, any value passed for <a ext:cls="Ext.Component" ext:member="renderTo" href="output/Ext.Component.html#renderTo">renderTo</a> will be ignored and the target element's parent node will automatically be used as the component's container. </div>
</div>
</td>
<td class="msource">Component</td>
</tr>
<tr class="config-row expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.Component-autoEl"></a>
<b>autoEl</b> : String/Object <div class="mdesc">
<div class="short">A tag name or DomHelper spec to create an element with. This is intended to create shorthand utility components inlin...</div>
<div class="long">
A tag name or DomHelper spec to create an element with. This is intended to create shorthand utility components inline via JSON. It should not be used for higher level components which already create their own elements. Example usage: <pre><code>{xtype:<em>'box'</em>, autoEl: <em>'div'</em>, cls:<em>'my-class'</em>}{xtype:<em>'box'</em>, autoEl: {tag:<em>'blockquote'</em>, html:<em>'autoEl is cool!'</em>}} // <b>with</b> DomHelper</code></pre> </div>
</div>
</td>
<td class="msource">Component</td>
</tr>
<tr class="config-row alt expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.Component-autoShow"></a>
<b>autoShow</b> : Boolean <div class="mdesc">
<div class="short">True if the component should check for hidden classes (e.g. 'x-hidden' or 'x-hide-display') and remove them on render...</div>
<div class="long">
True if the component should check for hidden classes (e.g. 'x-hidden' or 'x-hide-display') and remove them on render (defaults to false). </div>
</div>
</td>
<td class="msource">Component</td>
</tr>
<tr class="config-row expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.Component-cls"></a>
<b>cls</b> : String <div class="mdesc">
<div class="short">An optional extra CSS class that will be added to this component's Element (defaults to ''). This can be useful for a...</div>
<div class="long">
An optional extra CSS class that will be added to this component's Element (defaults to ''). This can be useful for adding customized styles to the component or any of its children using standard CSS rules. </div>
</div>
</td>
<td class="msource">Component</td>
</tr>
<tr class="config-row alt expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.Component-ctCls"></a>
<b>ctCls</b> : String <div class="mdesc">
<div class="short">An optional extra CSS class that will be added to this component's container (defaults to ''). This can be useful for...</div>
<div class="long">
An optional extra CSS class that will be added to this component's container (defaults to ''). This can be useful for adding customized styles to the container or any of its children using standard CSS rules. </div>
</div>
</td>
<td class="msource">Component</td>
</tr>
<tr class="config-row">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.Component-disabledClass"></a>
<b>disabledClass</b> : String <div class="mdesc">
CSS class added to the component when it is disabled (defaults to "x-item-disabled"). </div>
</td>
<td class="msource">Component</td>
</tr>
<tr class="config-row alt expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.Component-hideMode"></a>
<b>hideMode</b> : String <div class="mdesc">
<div class="short">How this component should hidden. Supported values are "visibility" (css visibility), "offsets" (negative offset posi...</div>
<div class="long">
How this component should hidden. Supported values are "visibility" (css visibility), "offsets" (negative offset position) and "display" (css display) - defaults to "display". </div>
</div>
</td>
<td class="msource">Component</td>
</tr>
<tr class="config-row expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.Component-hideParent"></a>
<b>hideParent</b> : Boolean <div class="mdesc">
<div class="short">True to hide and show the component's container when hide/show is called on the component, false to hide and show the...</div>
<div class="long">
True to hide and show the component's container when hide/show is called on the component, false to hide and show the component itself (defaults to false). For example, this can be used as a shortcut for a hide button on a window by setting hide:true on the button when adding it to its parent container. </div>
</div>
</td>
<td class="msource">Component</td>
</tr>
<tr class="config-row alt">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.Component-id"></a>
<b>id</b> : String <div class="mdesc">
The unique id of this component (defaults to an auto-assigned id). </div>
</td>
<td class="msource">Component</td>
</tr>
<tr class="config-row inherited expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.Component-listeners"></a>
<b>listeners</b> : Object <div class="mdesc">
<div class="short">A config object containing one or more event handlers to be added to this object during initialization. This should b...</div>
<div class="long">
A config object containing one or more event handlers to be added to this object during initialization. This should be a valid listeners config object as specified in the <a ext:cls="Ext.util.Observable" ext:member="addListener" href="output/Ext.util.Observable.html#addListener">addListener</a> example for attaching multiple handlers at once. </div>
</div>
</td>
<td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#listeners" href="output/Ext.util.Observable.html#listeners">Observable</a></td>
</tr>
<tr class="config-row alt expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.Component-overCls"></a>
<b>overCls</b> : String <div class="mdesc">
<div class="short">An optional extra CSS class that will be added to this component's Element when the mouse moves over the Element, and...</div>
<div class="long">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -