Upgrade to ExtJS 3.2.0 - Released 03/30/2010
[extjs.git] / docs / output / Ext.menu.BaseItem.html
index 8fb4237..4e704ca 100644 (file)
@@ -1,4 +1,4 @@
-<div xmlns:ext="http://www.extjs.com" class="body-wrap"><div class="inheritance res-block"><pre class="res-block-inner"><a href="output/Ext.util.Observable.html" ext:member="" ext:cls="Ext.util.Observable">Observable</a>&#13;&nbsp;&nbsp;<img src="resources/elbow-end.gif"><a href="output/Ext.Component.html" ext:member="" ext:cls="Ext.Component">Component</a>&#13;&nbsp;&nbsp;&nbsp;&nbsp;<img src="resources/elbow-end.gif">BaseItem</pre></div><h1>Class <a href="source/BaseItem.html#cls-Ext.menu.BaseItem">Ext.menu.BaseItem</a></h1><table cellspacing="0"><tr><td class="label">Package:</td><td class="hd-info">Ext.menu</td></tr><tr><td class="label">Defined In:</td><td class="hd-info">BaseItem.js</td></tr><tr><td class="label">Class:</td><td class="hd-info"><a href="source/BaseItem.html#cls-Ext.menu.BaseItem">BaseItem</a></td></tr><tr><td class="label">Subclasses:</td><td class="hd-info"><a href="output/Ext.menu.Item.html" ext:cls="Ext.menu.Item">Item</a>,&#13;<a href="output/Ext.menu.Separator.html" ext:cls="Ext.menu.Separator">Separator</a>,&#13;<a href="output/Ext.menu.TextItem.html" ext:cls="Ext.menu.TextItem">TextItem</a></td></tr><tr><td class="label">Extends:</td><td class="hd-info"><a href="output/Ext.Component.html" ext:cls="Ext.Component" ext:member="">Component</a></td></tr></table><div class="description">The base class for all items that render into menus.  BaseItem provides default rendering, activated state
+<div class="body-wrap" xmlns:ext="http://www.extjs.com"><div class="top-tools"><a class="inner-link" href="#Ext.menu.BaseItem-props"><img src="../resources/images/default/s.gif" class="item-icon icon-prop">Properties</a>&#13;<a class="inner-link" href="#Ext.menu.BaseItem-methods"><img src="../resources/images/default/s.gif" class="item-icon icon-method">Methods</a>&#13;<a class="inner-link" href="#Ext.menu.BaseItem-events"><img src="../resources/images/default/s.gif" class="item-icon icon-event">Events</a>&#13;<a class="inner-link" href="#Ext.menu.BaseItem-configs"><img src="../resources/images/default/s.gif" class="item-icon icon-config">Config Options</a>&#13;<a class="bookmark" href="../docs/?class=Ext.menu.BaseItem"><img src="../resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a>&#13;</div><div class="inheritance res-block"><pre class="res-block-inner"><a href="output/Ext.util.Observable.html" ext:member="" ext:cls="Ext.util.Observable">Observable</a>&#13;&nbsp;&nbsp;<img src="resources/elbow-end.gif"><a href="output/Ext.Component.html" ext:member="" ext:cls="Ext.Component">Component</a>&#13;&nbsp;&nbsp;&nbsp;&nbsp;<img src="resources/elbow-end.gif">BaseItem</pre></div><h1>Class <a href="source/BaseItem.html#cls-Ext.menu.BaseItem">Ext.menu.BaseItem</a></h1><table cellspacing="0"><tr><td class="label">Package:</td><td class="hd-info">Ext.menu</td></tr><tr><td class="label">Defined In:</td><td class="hd-info"><a href="source/BaseItem.html#cls-Ext.menu.BaseItem">BaseItem.js</a></td></tr><tr><td class="label">Class:</td><td class="hd-info"><a href="source/BaseItem.html#cls-Ext.menu.BaseItem">BaseItem</a></td></tr><tr><td class="label">Subclasses:</td><td class="hd-info"><a href="output/Ext.menu.Item.html" ext:cls="Ext.menu.Item">Item</a>,&#13;<a href="output/Ext.menu.Separator.html" ext:cls="Ext.menu.Separator">Separator</a>,&#13;<a href="output/Ext.menu.TextItem.html" ext:cls="Ext.menu.TextItem">TextItem</a></td></tr><tr><td class="label">Extends:</td><td class="hd-info"><a href="output/Ext.Component.html" ext:cls="Ext.Component" ext:member="">Component</a></td></tr></table><div class="description">The base class for all items that render into menus.  BaseItem provides default rendering, activated state
 management and base configuration options shared by all menu components.</div><div class="hr"></div><a id="Ext.menu.BaseItem-configs"></a><h2>Config Options</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Config Options</th><th class="msource-header">Defined By</th></tr><tr class="config-row  "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.menu.BaseItem-activeClass"></a><b><a href="source/BaseItem.html#cfg-Ext.menu.BaseItem-activeClass">activeClass</a></b> : String<div class="mdesc">The CSS class to use when the item becomes activated (defaults to "x-menu-item-active")</div></td><td class="msource">BaseItem</td></tr><tr class="config-row  inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Component-allowDomMove"></a><b><a href="source/Component.html#cfg-Ext.Component-allowDomMove">allowDomMove</a></b> : Boolean<div class="mdesc">Whether the component can move the Dom node when rendering (defaults to true).</div></td><td class="msource"><a href="output/Ext.Component.html#allowDomMove" ext:member="#allowDomMove" ext:cls="Ext.Component">Component</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Component-applyTo"></a><b><a href="source/Component.html#cfg-Ext.Component-applyTo">applyTo</a></b> : Mixed<div class="mdesc"><div class="short">Specify the id of the element, a DOM element or an existing Element corresponding to a DIV
 that is already present in...</div><div class="long"><p>Specify the id of the element, a DOM element or an existing Element corresponding to a DIV
 that is already present in the document that specifies some structural markup for this
@@ -44,7 +44,10 @@ different DOM elements. Example usage:</p><pre><code>{
     }
 }</code></pre></div></div></td><td class="msource"><a href="output/Ext.Component.html#autoEl" ext:member="#autoEl" ext:cls="Ext.Component">Component</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Component-autoShow"></a><b><a href="source/Component.html#cfg-Ext.Component-autoShow">autoShow</a></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"><a href="output/Ext.Component.html#autoShow" ext:member="#autoShow" ext:cls="Ext.Component">Component</a></td></tr><tr class="config-row  "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.menu.BaseItem-canActivate"></a><b><a href="source/BaseItem.html#cfg-Ext.menu.BaseItem-canActivate">canActivate</a></b> : Boolean<div class="mdesc">True if this item can be visually activated (defaults to false)</div></td><td class="msource">BaseItem</td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Component-clearCls"></a><b><a href="source/Component.html#cfg-Ext.Component-clearCls">clearCls</a></b> : String<div class="mdesc"><div class="short">The CSS class used to to apply to the special clearing div rendered
+them on render (defaults to false).</div></div></td><td class="msource"><a href="output/Ext.Component.html#autoShow" ext:member="#autoShow" ext:cls="Ext.Component">Component</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Component-bubbleEvents"></a><b><a href="source/Component.html#cfg-Ext.Component-bubbleEvents">bubbleEvents</a></b> : Array<div class="mdesc"><div class="short">An array of events that, when fired, should be bubbled to any parent container.
+See Ext.util.Observable.enableBubble....</div><div class="long"><p>An array of events that, when fired, should be bubbled to any parent container.
+See <a href="output/Ext.util.Observable.html#Ext.util.Observable-enableBubble" ext:member="enableBubble" ext:cls="Ext.util.Observable">Ext.util.Observable.enableBubble</a>.
+Defaults to <tt>[]</tt>.</div></div></td><td class="msource"><a href="output/Ext.Component.html#bubbleEvents" ext:member="#bubbleEvents" ext:cls="Ext.Component">Component</a></td></tr><tr class="config-row  "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.menu.BaseItem-canActivate"></a><b><a href="source/BaseItem.html#cfg-Ext.menu.BaseItem-canActivate">canActivate</a></b> : Boolean<div class="mdesc">True if this item can be visually activated (defaults to false)</div></td><td class="msource">BaseItem</td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Component-clearCls"></a><b><a href="source/Component.html#cfg-Ext.Component-clearCls">clearCls</a></b> : String<div class="mdesc"><div class="short">The CSS class used to to apply to the special clearing div rendered
 directly after each form field wrapper to provide...</div><div class="long"><p>The CSS class used to to apply to the special clearing div rendered
 directly after each form field wrapper to provide field clearing (defaults to
 <tt>'x-form-clear-left'</tt>).</p>
@@ -52,7 +55,7 @@ directly after each form field wrapper to provide field clearing (defaults to
 which has been configured to use the <b><a href="output/Ext.layout.FormLayout.html" ext:cls="Ext.layout.FormLayout">FormLayout</a></b> layout
 manager (e.g. <a href="output/Ext.form.FormPanel.html" ext:cls="Ext.form.FormPanel">Ext.form.FormPanel</a> or specifying <tt>layout:'form'</tt>) and either a
 <tt><a href="output/Ext.Component.html#Ext.Component-fieldLabel" ext:member="fieldLabel" ext:cls="Ext.Component">fieldLabel</a></tt> is specified or <tt>isFormField=true</tt> is specified.</p><br>
-<p>See <a href="output/Ext.layout.FormLayout.html" ext:cls="Ext.layout.FormLayout">Ext.layout.FormLayout</a>.<a href="output/Ext.layout.FormLayout.html#Ext.layout.FormLayout-fieldTpl" ext:member="fieldTpl" ext:cls="Ext.layout.FormLayout">fieldTpl</a> also.</p></div></div></td><td class="msource"><a href="output/Ext.Component.html#clearCls" ext:member="#clearCls" ext:cls="Ext.Component">Component</a></td></tr><tr class="config-row  "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.menu.BaseItem-clickHideDelay"></a><b><a href="source/BaseItem.html#cfg-Ext.menu.BaseItem-clickHideDelay">clickHideDelay</a></b> : Number<div class="mdesc">Length of time in milliseconds to wait before hiding after a click (defaults to 100)</div></td><td class="msource">BaseItem</td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Component-cls"></a><b><a href="source/Component.html#cfg-Ext.Component-cls">cls</a></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
+<p>See <a href="output/Ext.layout.FormLayout.html" ext:cls="Ext.layout.FormLayout">Ext.layout.FormLayout</a>.<a href="output/Ext.layout.FormLayout.html#Ext.layout.FormLayout-fieldTpl" ext:member="fieldTpl" ext:cls="Ext.layout.FormLayout">fieldTpl</a> also.</p></div></div></td><td class="msource"><a href="output/Ext.Component.html#clearCls" ext:member="#clearCls" ext:cls="Ext.Component">Component</a></td></tr><tr class="config-row  "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.menu.BaseItem-clickHideDelay"></a><b><a href="source/BaseItem.html#cfg-Ext.menu.BaseItem-clickHideDelay">clickHideDelay</a></b> : Number<div class="mdesc">Length of time in milliseconds to wait before hiding after a click (defaults to 1)</div></td><td class="msource">BaseItem</td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Component-cls"></a><b><a href="source/Component.html#cfg-Ext.Component-cls">cls</a></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 ...</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"><a href="output/Ext.Component.html#cls" ext:member="#cls" ext:cls="Ext.Component">Component</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Component-contentEl"></a><b><a href="source/Component.html#cfg-Ext.Component-contentEl">contentEl</a></b> : String<div class="mdesc"><div class="short">Optional. Specify an existing HTML element, or the id of an existing HTML element to use as the content
 for this comp...</div><div class="long"><p>Optional. Specify an existing HTML element, or the <code>id</code> of an existing HTML element to use as the content
@@ -536,38 +539,38 @@ should usually not need to be called directly.<div class="mdetail-params"><stron
     :
                                         Ext.Component<div class="mdesc"><div class="short">Enable this component and fire the 'enable' event.</div><div class="long">Enable this component and fire the 'enable' event.<div class="mdetail-params"><strong>Parameters:</strong><ul><li>None.</li></ul><strong>Returns:</strong><ul><li><code>Ext.Component</code><div class="sub-desc">this</div></li></ul></div></div></div></td><td class="msource"><a href="output/Ext.Component.html#enable" ext:member="#enable" ext:cls="Ext.Component">Component</a></td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.Observable-enableBubble"></a><b><a href="source/Observable-more.html#method-Ext.util.Observable-enableBubble">enableBubble</a></b>(&nbsp;<code>String/Array&nbsp;events</code>&nbsp;)
     :
-                                        void<div class="mdesc"><div class="short">Enables events fired by this Observable to bubble up an owner hierarchy by calling&#13;
-this.getBubbleTarget() if present...</div><div class="long"><p>Enables events fired by this Observable to bubble up an owner hierarchy by calling\r
-<code>this.getBubbleTarget()</code> if present. There is no implementation in the Observable base class.</p>\r
-<p>This is commonly used by Ext.Components to bubble events to owner Containers. See <a href="output/Ext.Component.getBubbleTarget.html" ext:cls="Ext.Component.getBubbleTarget">Ext.Component.getBubbleTarget</a>. The default\r
-implementation in Ext.Component returns the Component's immediate owner. But if a known target is required, this can be overridden to\r
-access the required target more quickly.</p>\r
-<p>Example:</p><pre><code>Ext.override(Ext.form.Field, {\r
-    <i>//  Add functionality to Field&#39;s initComponent to enable the change event to bubble\r</i>
-    initComponent : Ext.form.Field.prototype.initComponent.createSequence(<b>function</b>() {\r
-        this.enableBubble(<em>'change'</em>);\r
-    }),\r
-\r
-    <i>//  We know that we want Field&#39;s events to bubble directly to the FormPanel.\r</i>
-    getBubbleTarget : <b>function</b>() {\r
-        <b>if</b> (!this.formPanel) {\r
-            this.formPanel = this.findParentByType(<em>'form'</em>);\r
-        }\r
-        <b>return</b> this.formPanel;\r
-    }\r
-});\r
-\r
-<b>var</b> myForm = <b>new</b> Ext.formPanel({\r
-    title: <em>'User Details'</em>,\r
-    items: [{\r
-        ...\r
-    }],\r
-    listeners: {\r
-        change: <b>function</b>() {\r
-            <i>// Title goes red <b>if</b> form has been modified.\r</i>
-            myForm.header.setStyle(<em>'color'</em>, <em>'red'</em>);\r
-        }\r
-    }\r
+                                        void<div class="mdesc"><div class="short">Enables events fired by this Observable to bubble up an owner hierarchy by calling
+this.getBubbleTarget() if present....</div><div class="long"><p>Enables events fired by this Observable to bubble up an owner hierarchy by calling
+<code>this.getBubbleTarget()</code> if present. There is no implementation in the Observable base class.</p>
+<p>This is commonly used by Ext.Components to bubble events to owner Containers. See <a href="output/Ext.Component.getBubbleTarget.html" ext:cls="Ext.Component.getBubbleTarget">Ext.Component.getBubbleTarget</a>. The default
+implementation in Ext.Component returns the Component's immediate owner. But if a known target is required, this can be overridden to
+access the required target more quickly.</p>
+<p>Example:</p><pre><code>Ext.override(Ext.form.Field, {
+    <i>//  Add functionality to Field&#39;s initComponent to enable the change event to bubble</i>
+    initComponent : Ext.form.Field.prototype.initComponent.createSequence(<b>function</b>() {
+        this.enableBubble(<em>'change'</em>);
+    }),
+
+    <i>//  We know that we want Field&#39;s events to bubble directly to the FormPanel.</i>
+    getBubbleTarget : <b>function</b>() {
+        <b>if</b> (!this.formPanel) {
+            this.formPanel = this.findParentByType(<em>'form'</em>);
+        }
+        <b>return</b> this.formPanel;
+    }
+});
+
+<b>var</b> myForm = <b>new</b> Ext.formPanel({
+    title: <em>'User Details'</em>,
+    items: [{
+        ...
+    }],
+    listeners: {
+        change: <b>function</b>() {
+            <i>// Title goes red <b>if</b> form has been modified.</i>
+            myForm.header.setStyle(<em>'color'</em>, <em>'red'</em>);
+        }
+    }
 });</code></pre><div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>events</code> : String/Array<div class="sub-desc">The event name to bubble, or an Array of event names.</div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource"><a href="output/Ext.util.Observable.html#enableBubble" ext:member="#enableBubble" ext:cls="Ext.util.Observable">Observable</a></td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Component-findParentBy"></a><b><a href="source/Component.html#method-Ext.Component-findParentBy">findParentBy</a></b>(&nbsp;<code>Function&nbsp;fn</code>&nbsp;)
     :
                                         Ext.Container<div class="mdesc"><div class="short">Find a container above this component at any level by a custom function. If the passed function returns