tvheadend/vendor/ext-3.4.1/docs/source/Panel.html
Adam Sutton bafcfff42d webui: restructure webui/extjs source files
I want to keep the 3rd-party packages away from the main source
where possible.
2013-06-03 17:11:01 +01:00

1813 lines
84 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The source code</title>
<link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="../resources/prettify/prettify.js"></script>
<style type="text/css">
.highlight { display: block; background-color: #ddd; }
</style>
<script type="text/javascript">
function highlight() {
document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
}
</script>
</head>
<body onload="prettyPrint(); highlight();">
<pre class="prettyprint lang-js"><span id='Ext-Panel-method-constructor'><span id='Ext-Panel'>/**
</span></span> * @class Ext.Panel
* @extends Ext.Container
* &lt;p&gt;Panel is a container that has specific functionality and structural components that make
* it the perfect building block for application-oriented user interfaces.&lt;/p&gt;
* &lt;p&gt;Panels are, by virtue of their inheritance from {@link Ext.Container}, capable
* of being configured with a {@link Ext.Container#layout layout}, and containing child Components.&lt;/p&gt;
* &lt;p&gt;When either specifying child {@link Ext.Component#items items} of a Panel, or dynamically {@link Ext.Container#add adding} Components
* to a Panel, remember to consider how you wish the Panel to arrange those child elements, and whether
* those child elements need to be sized using one of Ext's built-in &lt;code&gt;&lt;b&gt;{@link Ext.Container#layout layout}&lt;/b&gt;&lt;/code&gt; schemes. By
* default, Panels use the {@link Ext.layout.ContainerLayout ContainerLayout} scheme. This simply renders
* child components, appending them one after the other inside the Container, and &lt;b&gt;does not apply any sizing&lt;/b&gt;
* at all.&lt;/p&gt;
* &lt;p&gt;A Panel may also contain {@link #bbar bottom} and {@link #tbar top} toolbars, along with separate
* {@link #header}, {@link #footer} and {@link #body} sections (see {@link #frame} for additional
* information).&lt;/p&gt;
* &lt;p&gt;Panel also provides built-in {@link #collapsible expandable and collapsible behavior}, along with
* a variety of {@link #tools prebuilt tool buttons} that can be wired up to provide other customized
* behavior. Panels can be easily dropped into any {@link Ext.Container Container} or layout, and the
* layout and rendering pipeline is {@link Ext.Container#add completely managed by the framework}.&lt;/p&gt;
* @constructor
* @param {Object} config The config object
* @xtype panel
*/
Ext.Panel = Ext.extend(Ext.Container, {
<span id='Ext-Panel-property-header'> /**
</span> * The Panel's header {@link Ext.Element Element}. Read-only.
* &lt;p&gt;This Element is used to house the {@link #title} and {@link #tools}&lt;/p&gt;
* &lt;br&gt;&lt;p&gt;&lt;b&gt;Note&lt;/b&gt;: see the Note for &lt;code&gt;{@link Ext.Component#el el}&lt;/code&gt; also.&lt;/p&gt;
* @type Ext.Element
* @property header
*/
<span id='Ext-Panel-property-body'> /**
</span> * The Panel's body {@link Ext.Element Element} which may be used to contain HTML content.
* The content may be specified in the {@link #html} config, or it may be loaded using the
* {@link autoLoad} config, or through the Panel's {@link #getUpdater Updater}. Read-only.
* &lt;p&gt;If this is used to load visible HTML elements in either way, then
* the Panel may not be used as a Layout for hosting nested Panels.&lt;/p&gt;
* &lt;p&gt;If this Panel is intended to be used as the host of a Layout (See {@link #layout}
* then the body Element must not be loaded or changed - it is under the control
* of the Panel's Layout.
* &lt;br&gt;&lt;p&gt;&lt;b&gt;Note&lt;/b&gt;: see the Note for &lt;code&gt;{@link Ext.Component#el el}&lt;/code&gt; also.&lt;/p&gt;
* @type Ext.Element
* @property body
*/
<span id='Ext-Panel-property-bwrap'> /**
</span> * The Panel's bwrap {@link Ext.Element Element} used to contain other Panel elements
* (tbar, body, bbar, footer). See {@link #bodyCfg}. Read-only.
* @type Ext.Element
* @property bwrap
*/
<span id='Ext-Panel-property-collapsed'> /**
</span> * True if this panel is collapsed. Read-only.
* @type Boolean
* @property collapsed
*/
<span id='Ext-Panel-cfg-bodyCfg'> /**
</span> * @cfg {Object} bodyCfg
* &lt;p&gt;A {@link Ext.DomHelper DomHelper} element specification object may be specified for any
* Panel Element.&lt;/p&gt;
* &lt;p&gt;By default, the Default element in the table below will be used for the html markup to
* create a child element with the commensurate Default class name (&lt;code&gt;baseCls&lt;/code&gt; will be
* replaced by &lt;code&gt;{@link #baseCls}&lt;/code&gt;):&lt;/p&gt;
* &lt;pre&gt;
* Panel Default Default Custom Additional Additional
* Element element class element class style
* ======== ========================== ========= ============== ===========
* {@link #header} div {@link #baseCls}+'-header' {@link #headerCfg} headerCssClass headerStyle
* {@link #bwrap} div {@link #baseCls}+'-bwrap' {@link #bwrapCfg} bwrapCssClass bwrapStyle
* + tbar div {@link #baseCls}+'-tbar' {@link #tbarCfg} tbarCssClass tbarStyle
* + {@link #body} div {@link #baseCls}+'-body' {@link #bodyCfg} {@link #bodyCssClass} {@link #bodyStyle}
* + bbar div {@link #baseCls}+'-bbar' {@link #bbarCfg} bbarCssClass bbarStyle
* + {@link #footer} div {@link #baseCls}+'-footer' {@link #footerCfg} footerCssClass footerStyle
* &lt;/pre&gt;
* &lt;p&gt;Configuring a Custom element may be used, for example, to force the {@link #body} Element
* to use a different form of markup than is created by default. An example of this might be
* to {@link Ext.Element#createChild create a child} Panel containing a custom content, such as
* a header, or forcing centering of all Panel content by having the body be a &amp;lt;center&amp;gt;
* element:&lt;/p&gt;
* &lt;pre&gt;&lt;code&gt;
new Ext.Panel({
title: 'Message Title',
renderTo: Ext.getBody(),
width: 200, height: 130,
&lt;b&gt;bodyCfg&lt;/b&gt;: {
tag: 'center',
cls: 'x-panel-body', // Default class not applied if Custom element specified
html: 'Message'
},
footerCfg: {
tag: 'h2',
cls: 'x-panel-footer', // same as the Default class
html: 'footer html'
},
footerCssClass: 'custom-footer', // additional css class, see {@link Ext.element#addClass addClass}
footerStyle: 'background-color:red' // see {@link #bodyStyle}
});
* &lt;/code&gt;&lt;/pre&gt;
* &lt;p&gt;The example above also explicitly creates a &lt;code&gt;{@link #footer}&lt;/code&gt; with custom markup and
* styling applied.&lt;/p&gt;
*/
<span id='Ext-Panel-cfg-headerCfg'> /**
</span> * @cfg {Object} headerCfg
* &lt;p&gt;A {@link Ext.DomHelper DomHelper} element specification object specifying the element structure
* of this Panel's {@link #header} Element. See &lt;code&gt;{@link #bodyCfg}&lt;/code&gt; also.&lt;/p&gt;
*/
<span id='Ext-Panel-cfg-bwrapCfg'> /**
</span> * @cfg {Object} bwrapCfg
* &lt;p&gt;A {@link Ext.DomHelper DomHelper} element specification object specifying the element structure
* of this Panel's {@link #bwrap} Element. See &lt;code&gt;{@link #bodyCfg}&lt;/code&gt; also.&lt;/p&gt;
*/
<span id='Ext-Panel-cfg-tbarCfg'> /**
</span> * @cfg {Object} tbarCfg
* &lt;p&gt;A {@link Ext.DomHelper DomHelper} element specification object specifying the element structure
* of this Panel's {@link #tbar} Element. See &lt;code&gt;{@link #bodyCfg}&lt;/code&gt; also.&lt;/p&gt;
*/
<span id='Ext-Panel-cfg-bbarCfg'> /**
</span> * @cfg {Object} bbarCfg
* &lt;p&gt;A {@link Ext.DomHelper DomHelper} element specification object specifying the element structure
* of this Panel's {@link #bbar} Element. See &lt;code&gt;{@link #bodyCfg}&lt;/code&gt; also.&lt;/p&gt;
*/
<span id='Ext-Panel-cfg-footerCfg'> /**
</span> * @cfg {Object} footerCfg
* &lt;p&gt;A {@link Ext.DomHelper DomHelper} element specification object specifying the element structure
* of this Panel's {@link #footer} Element. See &lt;code&gt;{@link #bodyCfg}&lt;/code&gt; also.&lt;/p&gt;
*/
<span id='Ext-Panel-cfg-closable'> /**
</span> * @cfg {Boolean} closable
* Panels themselves do not directly support being closed, but some Panel subclasses do (like
* {@link Ext.Window}) or a Panel Class within an {@link Ext.TabPanel}. Specify &lt;code&gt;true&lt;/code&gt;
* to enable closing in such situations. Defaults to &lt;code&gt;false&lt;/code&gt;.
*/
<span id='Ext-Panel-property-footer'> /**
</span> * The Panel's footer {@link Ext.Element Element}. Read-only.
* &lt;p&gt;This Element is used to house the Panel's &lt;code&gt;{@link #buttons}&lt;/code&gt; or &lt;code&gt;{@link #fbar}&lt;/code&gt;.&lt;/p&gt;
* &lt;br&gt;&lt;p&gt;&lt;b&gt;Note&lt;/b&gt;: see the Note for &lt;code&gt;{@link Ext.Component#el el}&lt;/code&gt; also.&lt;/p&gt;
* @type Ext.Element
* @property footer
*/
<span id='Ext-Panel-cfg-applyTo'> /**
</span> * @cfg {Mixed} applyTo
* &lt;p&gt;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 panel-specific structural markup. When &lt;code&gt;applyTo&lt;/code&gt; is used,
* constituent parts of the panel can be specified by CSS class name within the main element, and the panel
* will automatically create those components from that markup. Any required components not specified in the
* markup will be autogenerated if necessary.&lt;/p&gt;
* &lt;p&gt;The following class names are supported (baseCls will be replaced by {@link #baseCls}):&lt;/p&gt;
* &lt;ul&gt;&lt;li&gt;baseCls + '-header'&lt;/li&gt;
* &lt;li&gt;baseCls + '-header-text'&lt;/li&gt;
* &lt;li&gt;baseCls + '-bwrap'&lt;/li&gt;
* &lt;li&gt;baseCls + '-tbar'&lt;/li&gt;
* &lt;li&gt;baseCls + '-body'&lt;/li&gt;
* &lt;li&gt;baseCls + '-bbar'&lt;/li&gt;
* &lt;li&gt;baseCls + '-footer'&lt;/li&gt;&lt;/ul&gt;
* &lt;p&gt;Using this config, a call to render() is not required. If applyTo is specified, any value passed for
* {@link #renderTo} will be ignored and the target element's parent node will automatically be used as the
* panel's container.&lt;/p&gt;
*/
<span id='Ext-Panel-cfg-tbar'> /**
</span> * @cfg {Object/Array} tbar
* &lt;p&gt;The top toolbar of the panel. This can be a {@link Ext.Toolbar} object, a toolbar config, or an array of
* buttons/button configs to be added to the toolbar. Note that this is not available as a property after render.
* To access the top toolbar after render, use {@link #getTopToolbar}.&lt;/p&gt;
* &lt;p&gt;&lt;b&gt;Note:&lt;/b&gt; Although a Toolbar may contain Field components, these will &lt;b&gt;not&lt;/b&gt; be updated by a load
* of an ancestor FormPanel. A Panel's toolbars are not part of the standard Container-&gt;Component hierarchy, and
* so are not scanned to collect form items. However, the values &lt;b&gt;will&lt;/b&gt; be submitted because form
* submission parameters are collected from the DOM tree.&lt;/p&gt;
*/
<span id='Ext-Panel-cfg-bbar'> /**
</span> * @cfg {Object/Array} bbar
* &lt;p&gt;The bottom toolbar of the panel. This can be a {@link Ext.Toolbar} object, a toolbar config, or an array of
* buttons/button configs to be added to the toolbar. Note that this is not available as a property after render.
* To access the bottom toolbar after render, use {@link #getBottomToolbar}.&lt;/p&gt;
* &lt;p&gt;&lt;b&gt;Note:&lt;/b&gt; Although a Toolbar may contain Field components, these will &lt;b&gt;not&lt;/b&gt; be updated by a load
* of an ancestor FormPanel. A Panel's toolbars are not part of the standard Container-&gt;Component hierarchy, and
* so are not scanned to collect form items. However, the values &lt;b&gt;will&lt;/b&gt; be submitted because form
* submission parameters are collected from the DOM tree.&lt;/p&gt;
*/
<span id='Ext-Panel-cfg-fbar'> /** @cfg {Object/Array} fbar
</span> * &lt;p&gt;A {@link Ext.Toolbar Toolbar} object, a Toolbar config, or an array of
* {@link Ext.Button Button}s/{@link Ext.Button Button} configs, describing a {@link Ext.Toolbar Toolbar} to be rendered into this Panel's footer element.&lt;/p&gt;
* &lt;p&gt;After render, the &lt;code&gt;fbar&lt;/code&gt; property will be an {@link Ext.Toolbar Toolbar} instance.&lt;/p&gt;
* &lt;p&gt;If &lt;code&gt;{@link #buttons}&lt;/code&gt; are specified, they will supersede the &lt;code&gt;fbar&lt;/code&gt; configuration property.&lt;/p&gt;
* The Panel's &lt;code&gt;{@link #buttonAlign}&lt;/code&gt; configuration affects the layout of these items, for example:
* &lt;pre&gt;&lt;code&gt;
var w = new Ext.Window({
height: 250,
width: 500,
bbar: new Ext.Toolbar({
items: [{
text: 'bbar Left'
},'-&gt;',{
text: 'bbar Right'
}]
}),
{@link #buttonAlign}: 'left', // anything but 'center' or 'right' and you can use '-', and '-&gt;'
// to control the alignment of fbar items
fbar: [{
text: 'fbar Left'
},'-&gt;',{
text: 'fbar Right'
}]
}).show();
* &lt;/code&gt;&lt;/pre&gt;
* &lt;p&gt;&lt;b&gt;Note:&lt;/b&gt; Although a Toolbar may contain Field components, these will &lt;b&gt;not&lt;/b&gt; be updated by a load
* of an ancestor FormPanel. A Panel's toolbars are not part of the standard Container-&gt;Component hierarchy, and
* so are not scanned to collect form items. However, the values &lt;b&gt;will&lt;/b&gt; be submitted because form
* submission parameters are collected from the DOM tree.&lt;/p&gt;
*/
<span id='Ext-Panel-cfg-header'> /**
</span> * @cfg {Boolean} header
* &lt;code&gt;true&lt;/code&gt; to create the Panel's header element explicitly, &lt;code&gt;false&lt;/code&gt; to skip creating
* it. If a &lt;code&gt;{@link #title}&lt;/code&gt; is set the header will be created automatically, otherwise it will not.
* If a &lt;code&gt;{@link #title}&lt;/code&gt; is set but &lt;code&gt;header&lt;/code&gt; is explicitly set to &lt;code&gt;false&lt;/code&gt;, the header
* will not be rendered.
*/
<span id='Ext-Panel-cfg-footer'> /**
</span> * @cfg {Boolean} footer
* &lt;code&gt;true&lt;/code&gt; to create the footer element explicitly, false to skip creating it. The footer
* will be created automatically if &lt;code&gt;{@link #buttons}&lt;/code&gt; or a &lt;code&gt;{@link #fbar}&lt;/code&gt; have
* been configured. See &lt;code&gt;{@link #bodyCfg}&lt;/code&gt; for an example.
*/
<span id='Ext-Panel-cfg-title'> /**
</span> * @cfg {String} title
* The title text to be used as innerHTML (html tags are accepted) to display in the panel
* &lt;code&gt;{@link #header}&lt;/code&gt; (defaults to ''). When a &lt;code&gt;title&lt;/code&gt; is specified the
* &lt;code&gt;{@link #header}&lt;/code&gt; element will automatically be created and displayed unless
* {@link #header} is explicitly set to &lt;code&gt;false&lt;/code&gt;. If you do not want to specify a
* &lt;code&gt;title&lt;/code&gt; at config time, but you may want one later, you must either specify a non-empty
* &lt;code&gt;title&lt;/code&gt; (a blank space ' ' will do) or &lt;code&gt;header:true&lt;/code&gt; so that the container
* element will get created.
*/
<span id='Ext-Panel-cfg-buttons'> /**
</span> * @cfg {Array} buttons
* &lt;code&gt;buttons&lt;/code&gt; will be used as &lt;code&gt;{@link Ext.Container#items items}&lt;/code&gt; for the toolbar in
* the footer (&lt;code&gt;{@link #fbar}&lt;/code&gt;). Typically the value of this configuration property will be
* an array of {@link Ext.Button}s or {@link Ext.Button} configuration objects.
* If an item is configured with &lt;code&gt;minWidth&lt;/code&gt; or the Panel is configured with &lt;code&gt;minButtonWidth&lt;/code&gt;,
* that width will be applied to the item.
*/
<span id='Ext-Panel-cfg-autoLoad'> /**
</span> * @cfg {Object/String/Function} autoLoad
* A valid url spec according to the Updater {@link Ext.Updater#update} method.
* If autoLoad is not null, the panel will attempt to load its contents
* immediately upon render.&lt;p&gt;
* The URL will become the default URL for this panel's {@link #body} element,
* so it may be {@link Ext.Element#refresh refresh}ed at any time.&lt;/p&gt;
*/
<span id='Ext-Panel-cfg-frame'> /**
</span> * @cfg {Boolean} frame
* &lt;code&gt;false&lt;/code&gt; by default to render with plain 1px square borders. &lt;code&gt;true&lt;/code&gt; to render with
* 9 elements, complete with custom rounded corners (also see {@link Ext.Element#boxWrap}).
* &lt;p&gt;The template generated for each condition is depicted below:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;
*
// frame = false
&amp;lt;div id=&quot;developer-specified-id-goes-here&quot; class=&quot;x-panel&quot;&gt;
&amp;lt;div class=&quot;x-panel-header&quot;&gt;&amp;lt;span class=&quot;x-panel-header-text&quot;&gt;Title: (frame:false)&amp;lt;/span&gt;&amp;lt;/div&gt;
&amp;lt;div class=&quot;x-panel-bwrap&quot;&gt;
&amp;lt;div class=&quot;x-panel-body&quot;&gt;&amp;lt;p&gt;html value goes here&amp;lt;/p&gt;&amp;lt;/div&gt;
&amp;lt;/div&gt;
&amp;lt;/div&gt;
// frame = true (create 9 elements)
&amp;lt;div id=&quot;developer-specified-id-goes-here&quot; class=&quot;x-panel&quot;&gt;
&amp;lt;div class=&quot;x-panel-tl&quot;&gt;&amp;lt;div class=&quot;x-panel-tr&quot;&gt;&amp;lt;div class=&quot;x-panel-tc&quot;&gt;
&amp;lt;div class=&quot;x-panel-header&quot;&gt;&amp;lt;span class=&quot;x-panel-header-text&quot;&gt;Title: (frame:true)&amp;lt;/span&gt;&amp;lt;/div&gt;
&amp;lt;/div&gt;&amp;lt;/div&gt;&amp;lt;/div&gt;
&amp;lt;div class=&quot;x-panel-bwrap&quot;&gt;
&amp;lt;div class=&quot;x-panel-ml&quot;&gt;&amp;lt;div class=&quot;x-panel-mr&quot;&gt;&amp;lt;div class=&quot;x-panel-mc&quot;&gt;
&amp;lt;div class=&quot;x-panel-body&quot;&gt;&amp;lt;p&gt;html value goes here&amp;lt;/p&gt;&amp;lt;/div&gt;
&amp;lt;/div&gt;&amp;lt;/div&gt;&amp;lt;/div&gt;
&amp;lt;div class=&quot;x-panel-bl&quot;&gt;&amp;lt;div class=&quot;x-panel-br&quot;&gt;&amp;lt;div class=&quot;x-panel-bc&quot;/&gt;
&amp;lt;/div&gt;&amp;lt;/div&gt;&amp;lt;/div&gt;
&amp;lt;/div&gt;
* &lt;/code&gt;&lt;/pre&gt;
*/
<span id='Ext-Panel-cfg-border'> /**
</span> * @cfg {Boolean} border
* True to display the borders of the panel's body element, false to hide them (defaults to true). By default,
* the border is a 2px wide inset border, but this can be further altered by setting {@link #bodyBorder} to false.
*/
<span id='Ext-Panel-cfg-bodyBorder'> /**
</span> * @cfg {Boolean} bodyBorder
* True to display an interior border on the body element of the panel, false to hide it (defaults to true).
* This only applies when {@link #border} == true. If border == true and bodyBorder == false, the border will display
* as a 1px wide inset border, giving the entire body element an inset appearance.
*/
<span id='Ext-Panel-cfg-bodyCssClass'> /**
</span> * @cfg {String/Object/Function} bodyCssClass
* Additional css class selector to be applied to the {@link #body} element in the format expected by
* {@link Ext.Element#addClass} (defaults to null). See {@link #bodyCfg}.
*/
<span id='Ext-Panel-cfg-bodyStyle'> /**
</span> * @cfg {String/Object/Function} bodyStyle
* Custom CSS styles to be applied to the {@link #body} element in the format expected by
* {@link Ext.Element#applyStyles} (defaults to null). See {@link #bodyCfg}.
*/
<span id='Ext-Panel-cfg-iconCls'> /**
</span> * @cfg {String} iconCls
* The CSS class selector that specifies a background image to be used as the header icon (defaults to '').
* &lt;p&gt;An example of specifying a custom icon class would be something like:
* &lt;/p&gt;&lt;pre&gt;&lt;code&gt;
// specify the property in the config for the class:
...
iconCls: 'my-icon'
// css class that specifies background image to be used as the icon image:
.my-icon { background-image: url(../images/my-icon.gif) 0 6px no-repeat !important; }
&lt;/code&gt;&lt;/pre&gt;
*/
<span id='Ext-Panel-cfg-collapsible'> /**
</span> * @cfg {Boolean} collapsible
* True to make the panel collapsible and have the expand/collapse toggle button automatically rendered into
* the header tool button area, false to keep the panel statically sized with no button (defaults to false).
*/
<span id='Ext-Panel-cfg-tools'> /**
</span> * @cfg {Array} tools
* An array of tool button configs to be added to the header tool area. When rendered, each tool is
* stored as an {@link Ext.Element Element} referenced by a public property called &lt;code&gt;&lt;b&gt;&lt;/b&gt;tools.&lt;i&gt;&amp;lt;tool-type&amp;gt;&lt;/i&gt;&lt;/code&gt;
* &lt;p&gt;Each tool config may contain the following properties:
* &lt;div class=&quot;mdetail-params&quot;&gt;&lt;ul&gt;
* &lt;li&gt;&lt;b&gt;id&lt;/b&gt; : String&lt;div class=&quot;sub-desc&quot;&gt;&lt;b&gt;Required.&lt;/b&gt; The type
* of tool to create. By default, this assigns a CSS class of the form &lt;code&gt;x-tool-&lt;i&gt;&amp;lt;tool-type&amp;gt;&lt;/i&gt;&lt;/code&gt; to the
* resulting tool Element. Ext provides CSS rules, and an icon sprite containing images for the tool types listed below.
* The developer may implement custom tools by supplying alternate CSS rules and background images:
* &lt;ul&gt;
* &lt;div class=&quot;x-tool x-tool-toggle&quot; style=&quot;float:left; margin-right:5;&quot;&gt; &lt;/div&gt;&lt;div&gt;&lt;code&gt; toggle&lt;/code&gt; (Created by default when {@link #collapsible} is &lt;code&gt;true&lt;/code&gt;)&lt;/div&gt;
* &lt;div class=&quot;x-tool x-tool-close&quot; style=&quot;float:left; margin-right:5;&quot;&gt; &lt;/div&gt;&lt;div&gt;&lt;code&gt; close&lt;/code&gt;&lt;/div&gt;
* &lt;div class=&quot;x-tool x-tool-minimize&quot; style=&quot;float:left; margin-right:5;&quot;&gt; &lt;/div&gt;&lt;div&gt;&lt;code&gt; minimize&lt;/code&gt;&lt;/div&gt;
* &lt;div class=&quot;x-tool x-tool-maximize&quot; style=&quot;float:left; margin-right:5;&quot;&gt; &lt;/div&gt;&lt;div&gt;&lt;code&gt; maximize&lt;/code&gt;&lt;/div&gt;
* &lt;div class=&quot;x-tool x-tool-restore&quot; style=&quot;float:left; margin-right:5;&quot;&gt; &lt;/div&gt;&lt;div&gt;&lt;code&gt; restore&lt;/code&gt;&lt;/div&gt;
* &lt;div class=&quot;x-tool x-tool-gear&quot; style=&quot;float:left; margin-right:5;&quot;&gt; &lt;/div&gt;&lt;div&gt;&lt;code&gt; gear&lt;/code&gt;&lt;/div&gt;
* &lt;div class=&quot;x-tool x-tool-pin&quot; style=&quot;float:left; margin-right:5;&quot;&gt; &lt;/div&gt;&lt;div&gt;&lt;code&gt; pin&lt;/code&gt;&lt;/div&gt;
* &lt;div class=&quot;x-tool x-tool-unpin&quot; style=&quot;float:left; margin-right:5;&quot;&gt; &lt;/div&gt;&lt;div&gt;&lt;code&gt; unpin&lt;/code&gt;&lt;/div&gt;
* &lt;div class=&quot;x-tool x-tool-right&quot; style=&quot;float:left; margin-right:5;&quot;&gt; &lt;/div&gt;&lt;div&gt;&lt;code&gt; right&lt;/code&gt;&lt;/div&gt;
* &lt;div class=&quot;x-tool x-tool-left&quot; style=&quot;float:left; margin-right:5;&quot;&gt; &lt;/div&gt;&lt;div&gt;&lt;code&gt; left&lt;/code&gt;&lt;/div&gt;
* &lt;div class=&quot;x-tool x-tool-up&quot; style=&quot;float:left; margin-right:5;&quot;&gt; &lt;/div&gt;&lt;div&gt;&lt;code&gt; up&lt;/code&gt;&lt;/div&gt;
* &lt;div class=&quot;x-tool x-tool-down&quot; style=&quot;float:left; margin-right:5;&quot;&gt; &lt;/div&gt;&lt;div&gt;&lt;code&gt; down&lt;/code&gt;&lt;/div&gt;
* &lt;div class=&quot;x-tool x-tool-refresh&quot; style=&quot;float:left; margin-right:5;&quot;&gt; &lt;/div&gt;&lt;div&gt;&lt;code&gt; refresh&lt;/code&gt;&lt;/div&gt;
* &lt;div class=&quot;x-tool x-tool-minus&quot; style=&quot;float:left; margin-right:5;&quot;&gt; &lt;/div&gt;&lt;div&gt;&lt;code&gt; minus&lt;/code&gt;&lt;/div&gt;
* &lt;div class=&quot;x-tool x-tool-plus&quot; style=&quot;float:left; margin-right:5;&quot;&gt; &lt;/div&gt;&lt;div&gt;&lt;code&gt; plus&lt;/code&gt;&lt;/div&gt;
* &lt;div class=&quot;x-tool x-tool-help&quot; style=&quot;float:left; margin-right:5;&quot;&gt; &lt;/div&gt;&lt;div&gt;&lt;code&gt; help&lt;/code&gt;&lt;/div&gt;
* &lt;div class=&quot;x-tool x-tool-search&quot; style=&quot;float:left; margin-right:5;&quot;&gt; &lt;/div&gt;&lt;div&gt;&lt;code&gt; search&lt;/code&gt;&lt;/div&gt;
* &lt;div class=&quot;x-tool x-tool-save&quot; style=&quot;float:left; margin-right:5;&quot;&gt; &lt;/div&gt;&lt;div&gt;&lt;code&gt; save&lt;/code&gt;&lt;/div&gt;
* &lt;div class=&quot;x-tool x-tool-print&quot; style=&quot;float:left; margin-right:5;&quot;&gt; &lt;/div&gt;&lt;div&gt;&lt;code&gt; print&lt;/code&gt;&lt;/div&gt;
* &lt;/ul&gt;&lt;/div&gt;&lt;/li&gt;
* &lt;li&gt;&lt;b&gt;handler&lt;/b&gt; : Function&lt;div class=&quot;sub-desc&quot;&gt;&lt;b&gt;Required.&lt;/b&gt; The function to
* call when clicked. Arguments passed are:&lt;ul&gt;
* &lt;li&gt;&lt;b&gt;event&lt;/b&gt; : Ext.EventObject&lt;div class=&quot;sub-desc&quot;&gt;The click event.&lt;/div&gt;&lt;/li&gt;
* &lt;li&gt;&lt;b&gt;toolEl&lt;/b&gt; : Ext.Element&lt;div class=&quot;sub-desc&quot;&gt;The tool Element.&lt;/div&gt;&lt;/li&gt;
* &lt;li&gt;&lt;b&gt;panel&lt;/b&gt; : Ext.Panel&lt;div class=&quot;sub-desc&quot;&gt;The host Panel&lt;/div&gt;&lt;/li&gt;
* &lt;li&gt;&lt;b&gt;tc&lt;/b&gt; : Object&lt;div class=&quot;sub-desc&quot;&gt;The tool configuration object&lt;/div&gt;&lt;/li&gt;
* &lt;/ul&gt;&lt;/div&gt;&lt;/li&gt;
* &lt;li&gt;&lt;b&gt;stopEvent&lt;/b&gt; : Boolean&lt;div class=&quot;sub-desc&quot;&gt;Defaults to true. Specify as false to allow click event to propagate.&lt;/div&gt;&lt;/li&gt;
* &lt;li&gt;&lt;b&gt;scope&lt;/b&gt; : Object&lt;div class=&quot;sub-desc&quot;&gt;The scope in which to call the handler.&lt;/div&gt;&lt;/li&gt;
* &lt;li&gt;&lt;b&gt;qtip&lt;/b&gt; : String/Object&lt;div class=&quot;sub-desc&quot;&gt;A tip string, or
* a config argument to {@link Ext.QuickTip#register}&lt;/div&gt;&lt;/li&gt;
* &lt;li&gt;&lt;b&gt;hidden&lt;/b&gt; : Boolean&lt;div class=&quot;sub-desc&quot;&gt;True to initially render hidden.&lt;/div&gt;&lt;/li&gt;
* &lt;li&gt;&lt;b&gt;on&lt;/b&gt; : Object&lt;div class=&quot;sub-desc&quot;&gt;A listener config object specifiying
* event listeners in the format of an argument to {@link #addListener}&lt;/div&gt;&lt;/li&gt;
* &lt;/ul&gt;&lt;/div&gt;
* &lt;p&gt;Note that, apart from the toggle tool which is provided when a panel is collapsible, these
* tools only provide the visual button. Any required functionality must be provided by adding
* handlers that implement the necessary behavior.&lt;/p&gt;
* &lt;p&gt;Example usage:&lt;/p&gt;
* &lt;pre&gt;&lt;code&gt;
tools:[{
id:'refresh',
qtip: 'Refresh form Data',
// hidden:true,
handler: function(event, toolEl, panel){
// refresh logic
}
},
{
id:'help',
qtip: 'Get Help',
handler: function(event, toolEl, panel){
// whatever
}
}]
&lt;/code&gt;&lt;/pre&gt;
* &lt;p&gt;For the custom id of &lt;code&gt;'help'&lt;/code&gt; define two relevant css classes with a link to
* a 15x15 image:&lt;/p&gt;
* &lt;pre&gt;&lt;code&gt;
.x-tool-help {background-image: url(images/help.png);}
.x-tool-help-over {background-image: url(images/help_over.png);}
// if using an image sprite:
.x-tool-help {background-image: url(images/help.png) no-repeat 0 0;}
.x-tool-help-over {background-position:-15px 0;}
&lt;/code&gt;&lt;/pre&gt;
*/
<span id='Ext-Panel-cfg-toolTemplate'> /**
</span> * @cfg {Ext.Template/Ext.XTemplate} toolTemplate
* &lt;p&gt;A Template used to create {@link #tools} in the {@link #header} Element. Defaults to:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;
new Ext.Template('&amp;lt;div class=&quot;x-tool x-tool-{id}&quot;&gt;&amp;amp;#160;&amp;lt;/div&gt;')&lt;/code&gt;&lt;/pre&gt;
* &lt;p&gt;This may may be overridden to provide a custom DOM structure for tools based upon a more
* complex XTemplate. The template's data is a single tool configuration object (Not the entire Array)
* as specified in {@link #tools}. In the following example an &amp;lt;a&gt; tag is used to provide a
* visual indication when hovering over the tool:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;
var win = new Ext.Window({
tools: [{
id: 'download',
href: '/MyPdfDoc.pdf'
}],
toolTemplate: new Ext.XTemplate(
'&amp;lt;tpl if=&quot;id==\'download\'&quot;&gt;',
'&amp;lt;a class=&quot;x-tool x-tool-pdf&quot; href=&quot;{href}&quot;&gt;&amp;lt;/a&gt;',
'&amp;lt;/tpl&gt;',
'&amp;lt;tpl if=&quot;id!=\'download\'&quot;&gt;',
'&amp;lt;div class=&quot;x-tool x-tool-{id}&quot;&gt;&amp;amp;#160;&amp;lt;/div&gt;',
'&amp;lt;/tpl&gt;'
),
width:500,
height:300,
closeAction:'hide'
});&lt;/code&gt;&lt;/pre&gt;
* &lt;p&gt;Note that the CSS class 'x-tool-pdf' should have an associated style rule which provides an
* appropriate background image, something like:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
a.x-tool-pdf {background-image: url(../shared/extjs/images/pdf.gif)!important;}
&lt;/code&gt;&lt;/pre&gt;
*/
<span id='Ext-Panel-cfg-hideCollapseTool'> /**
</span> * @cfg {Boolean} hideCollapseTool
* &lt;code&gt;true&lt;/code&gt; to hide the expand/collapse toggle button when &lt;code&gt;{@link #collapsible} == true&lt;/code&gt;,
* &lt;code&gt;false&lt;/code&gt; to display it (defaults to &lt;code&gt;false&lt;/code&gt;).
*/
<span id='Ext-Panel-cfg-titleCollapse'> /**
</span> * @cfg {Boolean} titleCollapse
* &lt;code&gt;true&lt;/code&gt; to allow expanding and collapsing the panel (when &lt;code&gt;{@link #collapsible} = true&lt;/code&gt;)
* by clicking anywhere in the header bar, &lt;code&gt;false&lt;/code&gt;) to allow it only by clicking to tool button
* (defaults to &lt;code&gt;false&lt;/code&gt;)). If this panel is a child item of a border layout also see the
* {@link Ext.layout.BorderLayout.Region BorderLayout.Region}
* &lt;code&gt;{@link Ext.layout.BorderLayout.Region#floatable floatable}&lt;/code&gt; config option.
*/
<span id='Ext-Panel-cfg-floating'> /**
</span> * @cfg {Mixed} floating
* &lt;p&gt;This property is used to configure the underlying {@link Ext.Layer}. Acceptable values for this
* configuration property are:&lt;/p&gt;&lt;div class=&quot;mdetail-params&quot;&gt;&lt;ul&gt;
* &lt;li&gt;&lt;b&gt;&lt;code&gt;false&lt;/code&gt;&lt;/b&gt; : &lt;b&gt;Default.&lt;/b&gt;&lt;div class=&quot;sub-desc&quot;&gt;Display the panel inline where it is
* rendered.&lt;/div&gt;&lt;/li&gt;
* &lt;li&gt;&lt;b&gt;&lt;code&gt;true&lt;/code&gt;&lt;/b&gt; : &lt;div class=&quot;sub-desc&quot;&gt;Float the panel (absolute position it with automatic
* shimming and shadow).&lt;ul&gt;
* &lt;div class=&quot;sub-desc&quot;&gt;Setting floating to true will create an Ext.Layer for this panel and display the
* panel at negative offsets so that it is hidden.&lt;/div&gt;
* &lt;div class=&quot;sub-desc&quot;&gt;Since the panel will be absolute positioned, the position must be set explicitly
* &lt;i&gt;after&lt;/i&gt; render (e.g., &lt;code&gt;myPanel.setPosition(100,100);&lt;/code&gt;).&lt;/div&gt;
* &lt;div class=&quot;sub-desc&quot;&gt;&lt;b&gt;Note&lt;/b&gt;: when floating a panel you should always assign a fixed width,
* otherwise it will be auto width and will expand to fill to the right edge of the viewport.&lt;/div&gt;
* &lt;/ul&gt;&lt;/div&gt;&lt;/li&gt;
* &lt;li&gt;&lt;b&gt;&lt;code&gt;{@link Ext.Layer object}&lt;/code&gt;&lt;/b&gt; : &lt;div class=&quot;sub-desc&quot;&gt;The specified object will be used
* as the configuration object for the {@link Ext.Layer} that will be created.&lt;/div&gt;&lt;/li&gt;
* &lt;/ul&gt;&lt;/div&gt;
*/
<span id='Ext-Panel-cfg-shadow'> /**
</span> * @cfg {Boolean/String} shadow
* &lt;code&gt;true&lt;/code&gt; (or a valid Ext.Shadow {@link Ext.Shadow#mode} value) to display a shadow behind the
* panel, &lt;code&gt;false&lt;/code&gt; to display no shadow (defaults to &lt;code&gt;'sides'&lt;/code&gt;). Note that this option
* only applies when &lt;code&gt;{@link #floating} = true&lt;/code&gt;.
*/
<span id='Ext-Panel-cfg-shadowOffset'> /**
</span> * @cfg {Number} shadowOffset
* The number of pixels to offset the shadow if displayed (defaults to &lt;code&gt;4&lt;/code&gt;). Note that this
* option only applies when &lt;code&gt;{@link #floating} = true&lt;/code&gt;.
*/
<span id='Ext-Panel-cfg-shim'> /**
</span> * @cfg {Boolean} shim
* &lt;code&gt;false&lt;/code&gt; to disable the iframe shim in browsers which need one (defaults to &lt;code&gt;true&lt;/code&gt;).
* Note that this option only applies when &lt;code&gt;{@link #floating} = true&lt;/code&gt;.
*/
<span id='Ext-Panel-cfg-keys'> /**
</span> * @cfg {Object/Array} keys
* A {@link Ext.KeyMap} config object (in the format expected by {@link Ext.KeyMap#addBinding}
* used to assign custom key handling to this panel (defaults to &lt;code&gt;null&lt;/code&gt;).
*/
<span id='Ext-Panel-cfg-draggable'> /**
</span> * @cfg {Boolean/Object} draggable
* &lt;p&gt;&lt;code&gt;true&lt;/code&gt; to enable dragging of this Panel (defaults to &lt;code&gt;false&lt;/code&gt;).&lt;/p&gt;
* &lt;p&gt;For custom drag/drop implementations, an &lt;b&gt;Ext.Panel.DD&lt;/b&gt; config could also be passed
* in this config instead of &lt;code&gt;true&lt;/code&gt;. Ext.Panel.DD is an internal, undocumented class which
* moves a proxy Element around in place of the Panel's element, but provides no other behaviour
* during dragging or on drop. It is a subclass of {@link Ext.dd.DragSource}, so behaviour may be
* added by implementing the interface methods of {@link Ext.dd.DragDrop} e.g.:
* &lt;pre&gt;&lt;code&gt;
new Ext.Panel({
title: 'Drag me',
x: 100,
y: 100,
renderTo: Ext.getBody(),
floating: true,
frame: true,
width: 400,
height: 200,
draggable: {
// Config option of Ext.Panel.DD class.
// It&amp;#39;s a floating Panel, so do not show a placeholder proxy in the original position.
insertProxy: false,
// Called for each mousemove event while dragging the DD object.
onDrag : function(e){
// Record the x,y position of the drag proxy so that we can
// position the Panel at end of drag.
var pel = this.proxy.getEl();
this.x = pel.getLeft(true);
this.y = pel.getTop(true);
// Keep the Shadow aligned if there is one.
var s = this.panel.getEl().shadow;
if (s) {
s.realign(this.x, this.y, pel.getWidth(), pel.getHeight());
}
},
// Called on the mouseup event.
endDrag : function(e){
this.panel.setPosition(this.x, this.y);
}
}
}).show();
&lt;/code&gt;&lt;/pre&gt;
*/
<span id='Ext-Panel-cfg-disabled'> /**
</span> * @cfg {Boolean} disabled
* Render this panel disabled (default is &lt;code&gt;false&lt;/code&gt;). An important note when using the disabled
* config on panels is that IE will often fail to initialize the disabled mask element correectly if
* the panel's layout has not yet completed by the time the Panel is disabled during the render process.
* If you experience this issue, you may need to instead use the {@link #afterlayout} event to initialize
* the disabled state:
* &lt;pre&gt;&lt;code&gt;
new Ext.Panel({
...
listeners: {
'afterlayout': {
fn: function(p){
p.disable();
},
single: true // important, as many layouts can occur
}
}
});
&lt;/code&gt;&lt;/pre&gt;
*/
<span id='Ext-Panel-cfg-autoHeight'> /**
</span> * @cfg {Boolean} autoHeight
* &lt;code&gt;true&lt;/code&gt; to use height:'auto', &lt;code&gt;false&lt;/code&gt; to use fixed height (defaults to &lt;code&gt;false&lt;/code&gt;).
* &lt;b&gt;Note&lt;/b&gt;: Setting &lt;code&gt;autoHeight: true&lt;/code&gt; means that the browser will manage the panel's height
* based on its contents, and that Ext will not manage it at all. If the panel is within a layout that
* manages dimensions (&lt;code&gt;fit&lt;/code&gt;, &lt;code&gt;border&lt;/code&gt;, etc.) then setting &lt;code&gt;autoHeight: true&lt;/code&gt;
* can cause issues with scrolling and will not generally work as expected since the panel will take
* on the height of its contents rather than the height required by the Ext layout.
*/
<span id='Ext-Panel-cfg-baseCls'> /**
</span> * @cfg {String} baseCls
* The base CSS class to apply to this panel's element (defaults to &lt;code&gt;'x-panel'&lt;/code&gt;).
* &lt;p&gt;Another option available by default is to specify &lt;code&gt;'x-plain'&lt;/code&gt; which strips all styling
* except for required attributes for Ext layouts to function (e.g. overflow:hidden).
* See &lt;code&gt;{@link #unstyled}&lt;/code&gt; also.&lt;/p&gt;
*/
baseCls : 'x-panel',
<span id='Ext-Panel-cfg-collapsedCls'> /**
</span> * @cfg {String} collapsedCls
* A CSS class to add to the panel's element after it has been collapsed (defaults to
* &lt;code&gt;'x-panel-collapsed'&lt;/code&gt;).
*/
collapsedCls : 'x-panel-collapsed',
<span id='Ext-Panel-cfg-maskDisabled'> /**
</span> * @cfg {Boolean} maskDisabled
* &lt;code&gt;true&lt;/code&gt; to mask the panel when it is {@link #disabled}, &lt;code&gt;false&lt;/code&gt; to not mask it (defaults
* to &lt;code&gt;true&lt;/code&gt;). Either way, the panel will always tell its contained elements to disable themselves
* when it is disabled, but masking the panel can provide an additional visual cue that the panel is
* disabled.
*/
maskDisabled : true,
<span id='Ext-Panel-cfg-animCollapse'> /**
</span> * @cfg {Boolean} animCollapse
* &lt;code&gt;true&lt;/code&gt; to animate the transition when the panel is collapsed, &lt;code&gt;false&lt;/code&gt; to skip the
* animation (defaults to &lt;code&gt;true&lt;/code&gt; if the {@link Ext.Fx} class is available, otherwise &lt;code&gt;false&lt;/code&gt;).
*/
animCollapse : Ext.enableFx,
<span id='Ext-Panel-cfg-headerAsText'> /**
</span> * @cfg {Boolean} headerAsText
* &lt;code&gt;true&lt;/code&gt; to display the panel &lt;code&gt;{@link #title}&lt;/code&gt; in the &lt;code&gt;{@link #header}&lt;/code&gt;,
* &lt;code&gt;false&lt;/code&gt; to hide it (defaults to &lt;code&gt;true&lt;/code&gt;).
*/
headerAsText : true,
<span id='Ext-Panel-cfg-buttonAlign'> /**
</span> * @cfg {String} buttonAlign
* The alignment of any {@link #buttons} added to this panel. Valid values are &lt;code&gt;'right'&lt;/code&gt;,
* &lt;code&gt;'left'&lt;/code&gt; and &lt;code&gt;'center'&lt;/code&gt; (defaults to &lt;code&gt;'right'&lt;/code&gt;).
*/
buttonAlign : 'right',
<span id='Ext-Panel-cfg-collapsed'> /**
</span> * @cfg {Boolean} collapsed
* &lt;code&gt;true&lt;/code&gt; to render the panel collapsed, &lt;code&gt;false&lt;/code&gt; to render it expanded (defaults to
* &lt;code&gt;false&lt;/code&gt;).
*/
collapsed : false,
<span id='Ext-Panel-cfg-collapseFirst'> /**
</span> * @cfg {Boolean} collapseFirst
* &lt;code&gt;true&lt;/code&gt; to make sure the collapse/expand toggle button always renders first (to the left of)
* any other tools in the panel's title bar, &lt;code&gt;false&lt;/code&gt; to render it last (defaults to &lt;code&gt;true&lt;/code&gt;).
*/
collapseFirst : true,
<span id='Ext-Panel-cfg-minButtonWidth'> /**
</span> * @cfg {Number} minButtonWidth
* Minimum width in pixels of all {@link #buttons} in this panel (defaults to &lt;code&gt;75&lt;/code&gt;)
*/
minButtonWidth : 75,
<span id='Ext-Panel-cfg-unstyled'> /**
</span> * @cfg {Boolean} unstyled
* Overrides the &lt;code&gt;{@link #baseCls}&lt;/code&gt; setting to &lt;code&gt;{@link #baseCls} = 'x-plain'&lt;/code&gt; which renders
* the panel unstyled except for required attributes for Ext layouts to function (e.g. overflow:hidden).
*/
<span id='Ext-Panel-cfg-elements'> /**
</span> * @cfg {String} elements
* A comma-delimited list of panel elements to initialize when the panel is rendered. Normally, this list will be
* generated automatically based on the items added to the panel at config time, but sometimes it might be useful to
* make sure a structural element is rendered even if not specified at config time (for example, you may want
* to add a button or toolbar dynamically after the panel has been rendered). Adding those elements to this
* list will allocate the required placeholders in the panel when it is rendered. Valid values are&lt;div class=&quot;mdetail-params&quot;&gt;&lt;ul&gt;
* &lt;li&gt;&lt;code&gt;header&lt;/code&gt;&lt;/li&gt;
* &lt;li&gt;&lt;code&gt;tbar&lt;/code&gt; (top bar)&lt;/li&gt;
* &lt;li&gt;&lt;code&gt;body&lt;/code&gt;&lt;/li&gt;
* &lt;li&gt;&lt;code&gt;bbar&lt;/code&gt; (bottom bar)&lt;/li&gt;
* &lt;li&gt;&lt;code&gt;footer&lt;/code&gt;&lt;/li&gt;
* &lt;/ul&gt;&lt;/div&gt;
* Defaults to '&lt;code&gt;body&lt;/code&gt;'.
*/
elements : 'body',
<span id='Ext-Panel-cfg-preventBodyReset'> /**
</span> * @cfg {Boolean} preventBodyReset
* Defaults to &lt;code&gt;false&lt;/code&gt;. When set to &lt;code&gt;true&lt;/code&gt;, an extra css class &lt;code&gt;'x-panel-normal'&lt;/code&gt;
* will be added to the panel's element, effectively applying css styles suggested by the W3C
* (see http://www.w3.org/TR/CSS21/sample.html) to the Panel's &lt;b&gt;body&lt;/b&gt; element (not the header,
* footer, etc.).
*/
preventBodyReset : false,
<span id='Ext-Panel-cfg-padding'> /**
</span> * @cfg {Number/String} padding
* A shortcut for setting a padding style on the body element. The value can either be
* a number to be applied to all sides, or a normal css string describing padding.
* Defaults to &lt;tt&gt;undefined&lt;/tt&gt;.
*
*/
padding: undefined,
<span id='Ext-Panel-cfg-resizeEvent'> /** @cfg {String} resizeEvent
</span> * The event to listen to for resizing in layouts. Defaults to &lt;tt&gt;'bodyresize'&lt;/tt&gt;.
*/
resizeEvent: 'bodyresize',
<span id='Ext-Panel-property-toolTarget'> // protected - these could be used to customize the behavior of the window,
</span> // but changing them would not be useful without further mofifications and
// could lead to unexpected or undesirable results.
toolTarget : 'header',
<span id='Ext-Panel-property-collapseEl'> collapseEl : 'bwrap',
</span><span id='Ext-Panel-property-slideAnchor'> slideAnchor : 't',
</span><span id='Ext-Panel-cfg-disabledClass'> disabledClass : '',
</span>
<span id='Ext-Panel-property-deferHeight'> // private, notify box this class will handle heights
</span> deferHeight : true,
<span id='Ext-Panel-property-expandDefaults'> // private
</span> expandDefaults: {
duration : 0.25
},
<span id='Ext-Panel-property-collapseDefaults'> // private
</span> collapseDefaults : {
duration : 0.25
},
<span id='Ext-Panel-method-initComponent'> // private
</span> initComponent : function(){
Ext.Panel.superclass.initComponent.call(this);
this.addEvents(
<span id='Ext-Panel-event-bodyresize'> /**
</span> * @event bodyresize
* Fires after the Panel has been resized.
* @param {Ext.Panel} p the Panel which has been resized.
* @param {Number} width The Panel body's new width.
* @param {Number} height The Panel body's new height.
*/
'bodyresize',
<span id='Ext-Panel-event-titlechange'> /**
</span> * @event titlechange
* Fires after the Panel title has been {@link #title set} or {@link #setTitle changed}.
* @param {Ext.Panel} p the Panel which has had its title changed.
* @param {String} The new title.
*/
'titlechange',
<span id='Ext-Panel-event-iconchange'> /**
</span> * @event iconchange
* Fires after the Panel icon class has been {@link #iconCls set} or {@link #setIconClass changed}.
* @param {Ext.Panel} p the Panel which has had its {@link #iconCls icon class} changed.
* @param {String} newIcon The new icon class.
* @param {String} oldIcon The old icon class.
*/
'iconchange',
<span id='Ext-Panel-event-collapse'> /**
</span> * @event collapse
* Fires after the Panel has been collapsed.
* @param {Ext.Panel} p the Panel that has been collapsed.
*/
'collapse',
<span id='Ext-Panel-event-expand'> /**
</span> * @event expand
* Fires after the Panel has been expanded.
* @param {Ext.Panel} p The Panel that has been expanded.
*/
'expand',
<span id='Ext-Panel-event-beforecollapse'> /**
</span> * @event beforecollapse
* Fires before the Panel is collapsed. A handler can return false to cancel the collapse.
* @param {Ext.Panel} p the Panel being collapsed.
* @param {Boolean} animate True if the collapse is animated, else false.
*/
'beforecollapse',
<span id='Ext-Panel-event-beforeexpand'> /**
</span> * @event beforeexpand
* Fires before the Panel is expanded. A handler can return false to cancel the expand.
* @param {Ext.Panel} p The Panel being expanded.
* @param {Boolean} animate True if the expand is animated, else false.
*/
'beforeexpand',
<span id='Ext-Panel-event-beforeclose'> /**
</span> * @event beforeclose
* Fires before the Panel is closed. Note that Panels do not directly support being closed, but some
* Panel subclasses do (like {@link Ext.Window}) or a Panel within a Ext.TabPanel. This event only
* applies to such subclasses.
* A handler can return false to cancel the close.
* @param {Ext.Panel} p The Panel being closed.
*/
'beforeclose',
<span id='Ext-Panel-event-close'> /**
</span> * @event close
* Fires after the Panel is closed. Note that Panels do not directly support being closed, but some
* Panel subclasses do (like {@link Ext.Window}) or a Panel within a Ext.TabPanel.
* @param {Ext.Panel} p The Panel that has been closed.
*/
'close',
<span id='Ext-Panel-event-activate'> /**
</span> * @event activate
* Fires after the Panel has been visually activated.
* Note that Panels do not directly support being activated, but some Panel subclasses
* do (like {@link Ext.Window}). Panels which are child Components of a TabPanel fire the
* activate and deactivate events under the control of the TabPanel.
* @param {Ext.Panel} p The Panel that has been activated.
*/
'activate',
<span id='Ext-Panel-event-deactivate'> /**
</span> * @event deactivate
* Fires after the Panel has been visually deactivated.
* Note that Panels do not directly support being deactivated, but some Panel subclasses
* do (like {@link Ext.Window}). Panels which are child Components of a TabPanel fire the
* activate and deactivate events under the control of the TabPanel.
* @param {Ext.Panel} p The Panel that has been deactivated.
*/
'deactivate'
);
if(this.unstyled){
this.baseCls = 'x-plain';
}
this.toolbars = [];
// shortcuts
if(this.tbar){
this.elements += ',tbar';
this.topToolbar = this.createToolbar(this.tbar);
this.tbar = null;
}
if(this.bbar){
this.elements += ',bbar';
this.bottomToolbar = this.createToolbar(this.bbar);
this.bbar = null;
}
if(this.header === true){
this.elements += ',header';
this.header = null;
}else if(this.headerCfg || (this.title &amp;&amp; this.header !== false)){
this.elements += ',header';
}
if(this.footerCfg || this.footer === true){
this.elements += ',footer';
this.footer = null;
}
if(this.buttons){
this.fbar = this.buttons;
this.buttons = null;
}
if(this.fbar){
this.createFbar(this.fbar);
}
if(this.autoLoad){
this.on('render', this.doAutoLoad, this, {delay:10});
}
},
<span id='Ext-Panel-method-createFbar'> // private
</span> createFbar : function(fbar){
var min = this.minButtonWidth;
this.elements += ',footer';
this.fbar = this.createToolbar(fbar, {
buttonAlign: this.buttonAlign,
toolbarCls: 'x-panel-fbar',
enableOverflow: false,
defaults: function(c){
return {
minWidth: c.minWidth || min
};
}
});
// @compat addButton and buttons could possibly be removed
// @target 4.0
<span id='Ext-Panel-property-buttons'> /**
</span> * This Panel's Array of buttons as created from the &lt;code&gt;{@link #buttons}&lt;/code&gt;
* config property. Read only.
* @type Array
* @property buttons
*/
this.fbar.items.each(function(c){
c.minWidth = c.minWidth || this.minButtonWidth;
}, this);
this.buttons = this.fbar.items.items;
},
<span id='Ext-Panel-method-createToolbar'> // private
</span> createToolbar: function(tb, options){
var result;
// Convert array to proper toolbar config
if(Ext.isArray(tb)){
tb = {
items: tb
};
}
result = tb.events ? Ext.apply(tb, options) : this.createComponent(Ext.apply({}, tb, options), 'toolbar');
this.toolbars.push(result);
return result;
},
<span id='Ext-Panel-method-createElement'> // private
</span> createElement : function(name, pnode){
if(this[name]){
pnode.appendChild(this[name].dom);
return;
}
if(name === 'bwrap' || this.elements.indexOf(name) != -1){
if(this[name+'Cfg']){
this[name] = Ext.fly(pnode).createChild(this[name+'Cfg']);
}else{
var el = document.createElement('div');
el.className = this[name+'Cls'];
this[name] = Ext.get(pnode.appendChild(el));
}
if(this[name+'CssClass']){
this[name].addClass(this[name+'CssClass']);
}
if(this[name+'Style']){
this[name].applyStyles(this[name+'Style']);
}
}
},
<span id='Ext-Panel-method-onRender'> // private
</span> onRender : function(ct, position){
Ext.Panel.superclass.onRender.call(this, ct, position);
this.createClasses();
var el = this.el,
d = el.dom,
bw,
ts;
if(this.collapsible &amp;&amp; !this.hideCollapseTool){
this.tools = this.tools ? this.tools.slice(0) : [];
this.tools[this.collapseFirst?'unshift':'push']({
id: 'toggle',
handler : this.toggleCollapse,
scope: this
});
}
if(this.tools){
ts = this.tools;
this.elements += (this.header !== false) ? ',header' : '';
}
this.tools = {};
el.addClass(this.baseCls);
if(d.firstChild){ // existing markup
this.header = el.down('.'+this.headerCls);
this.bwrap = el.down('.'+this.bwrapCls);
var cp = this.bwrap ? this.bwrap : el;
this.tbar = cp.down('.'+this.tbarCls);
this.body = cp.down('.'+this.bodyCls);
this.bbar = cp.down('.'+this.bbarCls);
this.footer = cp.down('.'+this.footerCls);
this.fromMarkup = true;
}
if (this.preventBodyReset === true) {
el.addClass('x-panel-reset');
}
if(this.cls){
el.addClass(this.cls);
}
if(this.buttons){
this.elements += ',footer';
}
// This block allows for maximum flexibility and performance when using existing markup
// framing requires special markup
if(this.frame){
el.insertHtml('afterBegin', String.format(Ext.Element.boxMarkup, this.baseCls));
this.createElement('header', d.firstChild.firstChild.firstChild);
this.createElement('bwrap', d);
// append the mid and bottom frame to the bwrap
bw = this.bwrap.dom;
var ml = d.childNodes[1], bl = d.childNodes[2];
bw.appendChild(ml);
bw.appendChild(bl);
var mc = bw.firstChild.firstChild.firstChild;
this.createElement('tbar', mc);
this.createElement('body', mc);
this.createElement('bbar', mc);
this.createElement('footer', bw.lastChild.firstChild.firstChild);
if(!this.footer){
this.bwrap.dom.lastChild.className += ' x-panel-nofooter';
}
/*
* Store a reference to this element so:
* a) We aren't looking it up all the time
* b) The last element is reported incorrectly when using a loadmask
*/
this.ft = Ext.get(this.bwrap.dom.lastChild);
this.mc = Ext.get(mc);
}else{
this.createElement('header', d);
this.createElement('bwrap', d);
// append the mid and bottom frame to the bwrap
bw = this.bwrap.dom;
this.createElement('tbar', bw);
this.createElement('body', bw);
this.createElement('bbar', bw);
this.createElement('footer', bw);
if(!this.header){
this.body.addClass(this.bodyCls + '-noheader');
if(this.tbar){
this.tbar.addClass(this.tbarCls + '-noheader');
}
}
}
if(Ext.isDefined(this.padding)){
this.body.setStyle('padding', this.body.addUnits(this.padding));
}
if(this.border === false){
this.el.addClass(this.baseCls + '-noborder');
this.body.addClass(this.bodyCls + '-noborder');
if(this.header){
this.header.addClass(this.headerCls + '-noborder');
}
if(this.footer){
this.footer.addClass(this.footerCls + '-noborder');
}
if(this.tbar){
this.tbar.addClass(this.tbarCls + '-noborder');
}
if(this.bbar){
this.bbar.addClass(this.bbarCls + '-noborder');
}
}
if(this.bodyBorder === false){
this.body.addClass(this.bodyCls + '-noborder');
}
this.bwrap.enableDisplayMode('block');
if(this.header){
this.header.unselectable();
// for tools, we need to wrap any existing header markup
if(this.headerAsText){
this.header.dom.innerHTML =
'&lt;span class=&quot;' + this.headerTextCls + '&quot;&gt;'+this.header.dom.innerHTML+'&lt;/span&gt;';
if(this.iconCls){
this.setIconClass(this.iconCls);
}
}
}
if(this.floating){
this.makeFloating(this.floating);
}
if(this.collapsible &amp;&amp; this.titleCollapse &amp;&amp; this.header){
this.mon(this.header, 'click', this.toggleCollapse, this);
this.header.setStyle('cursor', 'pointer');
}
if(ts){
this.addTool.apply(this, ts);
}
// Render Toolbars.
if(this.fbar){
this.footer.addClass('x-panel-btns');
this.fbar.ownerCt = this;
this.fbar.render(this.footer);
this.footer.createChild({cls:'x-clear'});
}
if(this.tbar &amp;&amp; this.topToolbar){
this.topToolbar.ownerCt = this;
this.topToolbar.render(this.tbar);
}
if(this.bbar &amp;&amp; this.bottomToolbar){
this.bottomToolbar.ownerCt = this;
this.bottomToolbar.render(this.bbar);
}
},
<span id='Ext-Panel-method-setIconClass'> /**
</span> * Sets the CSS class that provides the icon image for this panel. This method will replace any existing
* icon class if one has already been set and fire the {@link #iconchange} event after completion.
* @param {String} cls The new CSS class name
*/
setIconClass : function(cls){
var old = this.iconCls;
this.iconCls = cls;
if(this.rendered &amp;&amp; this.header){
if(this.frame){
this.header.addClass('x-panel-icon');
this.header.replaceClass(old, this.iconCls);
}else{
var hd = this.header,
img = hd.child('img.x-panel-inline-icon');
if(img){
Ext.fly(img).replaceClass(old, this.iconCls);
}else{
var hdspan = hd.child('span.' + this.headerTextCls);
if (hdspan) {
Ext.DomHelper.insertBefore(hdspan.dom, {
tag:'img', alt: '', src: Ext.BLANK_IMAGE_URL, cls:'x-panel-inline-icon '+this.iconCls
});
}
}
}
}
this.fireEvent('iconchange', this, cls, old);
},
<span id='Ext-Panel-method-makeFloating'> // private
</span> makeFloating : function(cfg){
this.floating = true;
this.el = new Ext.Layer(Ext.apply({}, cfg, {
shadow: Ext.isDefined(this.shadow) ? this.shadow : 'sides',
shadowOffset: this.shadowOffset,
constrain:false,
shim: this.shim === false ? false : undefined
}), this.el);
},
<span id='Ext-Panel-method-getTopToolbar'> /**
</span> * Returns the {@link Ext.Toolbar toolbar} from the top (&lt;code&gt;{@link #tbar}&lt;/code&gt;) section of the panel.
* @return {Ext.Toolbar} The toolbar
*/
getTopToolbar : function(){
return this.topToolbar;
},
<span id='Ext-Panel-method-getBottomToolbar'> /**
</span> * Returns the {@link Ext.Toolbar toolbar} from the bottom (&lt;code&gt;{@link #bbar}&lt;/code&gt;) section of the panel.
* @return {Ext.Toolbar} The toolbar
*/
getBottomToolbar : function(){
return this.bottomToolbar;
},
<span id='Ext-Panel-method-getFooterToolbar'> /**
</span> * Returns the {@link Ext.Toolbar toolbar} from the footer (&lt;code&gt;{@link #fbar}&lt;/code&gt;) section of the panel.
* @return {Ext.Toolbar} The toolbar
*/
getFooterToolbar : function() {
return this.fbar;
},
<span id='Ext-Panel-method-addButton'> /**
</span> * Adds a button to this panel. Note that this method must be called prior to rendering. The preferred
* approach is to add buttons via the {@link #buttons} config.
* @param {String/Object} config A valid {@link Ext.Button} config. A string will become the text for a default
* button config, an object will be treated as a button config object.
* @param {Function} handler The function to be called on button {@link Ext.Button#click}
* @param {Object} scope The scope (&lt;code&gt;this&lt;/code&gt; reference) in which the button handler function is executed. Defaults to the Button.
* @return {Ext.Button} The button that was added
*/
addButton : function(config, handler, scope){
if(!this.fbar){
this.createFbar([]);
}
if(handler){
if(Ext.isString(config)){
config = {text: config};
}
config = Ext.apply({
handler: handler,
scope: scope
}, config);
}
return this.fbar.add(config);
},
<span id='Ext-Panel-method-addTool'> // private
</span> addTool : function(){
if(!this.rendered){
if(!this.tools){
this.tools = [];
}
Ext.each(arguments, function(arg){
this.tools.push(arg);
}, this);
return;
}
// nowhere to render tools!
if(!this[this.toolTarget]){
return;
}
if(!this.toolTemplate){
// initialize the global tool template on first use
var tt = new Ext.Template(
'&lt;div class=&quot;x-tool x-tool-{id}&quot;&gt;&amp;#160;&lt;/div&gt;'
);
tt.disableFormats = true;
tt.compile();
Ext.Panel.prototype.toolTemplate = tt;
}
for(var i = 0, a = arguments, len = a.length; i &lt; len; i++) {
var tc = a[i];
if(!this.tools[tc.id]){
var overCls = 'x-tool-'+tc.id+'-over';
var t = this.toolTemplate.insertFirst(this[this.toolTarget], tc, true);
this.tools[tc.id] = t;
t.enableDisplayMode('block');
this.mon(t, 'click', this.createToolHandler(t, tc, overCls, this));
if(tc.on){
this.mon(t, tc.on);
}
if(tc.hidden){
t.hide();
}
if(tc.qtip){
if(Ext.isObject(tc.qtip)){
Ext.QuickTips.register(Ext.apply({
target: t.id
}, tc.qtip));
} else {
t.dom.qtip = tc.qtip;
}
}
t.addClassOnOver(overCls);
}
}
},
<span id='Ext-Panel-method-onLayout'> onLayout : function(shallow, force){
</span> Ext.Panel.superclass.onLayout.apply(this, arguments);
if(this.hasLayout &amp;&amp; this.toolbars.length &gt; 0){
Ext.each(this.toolbars, function(tb){
tb.doLayout(undefined, force);
});
this.syncHeight();
}
},
<span id='Ext-Panel-method-syncHeight'> syncHeight : function(){
</span> var h = this.toolbarHeight,
bd = this.body,
lsh = this.lastSize.height,
sz;
if(this.autoHeight || !Ext.isDefined(lsh) || lsh == 'auto'){
return;
}
if(h != this.getToolbarHeight()){
h = Math.max(0, lsh - this.getFrameHeight());
bd.setHeight(h);
sz = bd.getSize();
this.toolbarHeight = this.getToolbarHeight();
this.onBodyResize(sz.width, sz.height);
}
},
<span id='Ext-Panel-method-onShow'> // private
</span> onShow : function(){
if(this.floating){
return this.el.show();
}
Ext.Panel.superclass.onShow.call(this);
},
<span id='Ext-Panel-method-onHide'> // private
</span> onHide : function(){
if(this.floating){
return this.el.hide();
}
Ext.Panel.superclass.onHide.call(this);
},
<span id='Ext-Panel-method-createToolHandler'> // private
</span> createToolHandler : function(t, tc, overCls, panel){
return function(e){
t.removeClass(overCls);
if(tc.stopEvent !== false){
e.stopEvent();
}
if(tc.handler){
tc.handler.call(tc.scope || t, e, t, panel, tc);
}
};
},
<span id='Ext-Panel-method-afterRender'> // private
</span> afterRender : function(){
if(this.floating &amp;&amp; !this.hidden){
this.el.show();
}
if(this.title){
this.setTitle(this.title);
}
Ext.Panel.superclass.afterRender.call(this); // do sizing calcs last
if (this.collapsed) {
this.collapsed = false;
this.collapse(false);
}
this.initEvents();
},
<span id='Ext-Panel-method-getKeyMap'> // private
</span> getKeyMap : function(){
if(!this.keyMap){
this.keyMap = new Ext.KeyMap(this.el, this.keys);
}
return this.keyMap;
},
<span id='Ext-Panel-method-initEvents'> // private
</span> initEvents : function(){
if(this.keys){
this.getKeyMap();
}
if(this.draggable){
this.initDraggable();
}
if(this.toolbars.length &gt; 0){
Ext.each(this.toolbars, function(tb){
tb.doLayout();
tb.on({
scope: this,
afterlayout: this.syncHeight,
remove: this.syncHeight
});
}, this);
this.syncHeight();
}
},
<span id='Ext-Panel-method-initDraggable'> // private
</span> initDraggable : function(){
<span id='Ext-Panel-property-dd'> /**
</span> * &lt;p&gt;If this Panel is configured {@link #draggable}, this property will contain
* an instance of {@link Ext.dd.DragSource} which handles dragging the Panel.&lt;/p&gt;
* The developer must provide implementations of the abstract methods of {@link Ext.dd.DragSource}
* in order to supply behaviour for each stage of the drag/drop process. See {@link #draggable}.
* @type Ext.dd.DragSource
* @property dd
*/
this.dd = new Ext.Panel.DD(this, Ext.isBoolean(this.draggable) ? null : this.draggable);
},
<span id='Ext-Panel-method-beforeEffect'> // private
</span> beforeEffect : function(anim){
if(this.floating){
this.el.beforeAction();
}
if(anim !== false){
this.el.addClass('x-panel-animated');
}
},
<span id='Ext-Panel-method-afterEffect'> // private
</span> afterEffect : function(anim){
this.syncShadow();
this.el.removeClass('x-panel-animated');
},
<span id='Ext-Panel-method-createEffect'> // private - wraps up an animation param with internal callbacks
</span> createEffect : function(a, cb, scope){
var o = {
scope:scope,
block:true
};
if(a === true){
o.callback = cb;
return o;
}else if(!a.callback){
o.callback = cb;
}else { // wrap it up
o.callback = function(){
cb.call(scope);
Ext.callback(a.callback, a.scope);
};
}
return Ext.applyIf(o, a);
},
<span id='Ext-Panel-method-collapse'> /**
</span> * Collapses the panel body so that it becomes hidden. Fires the {@link #beforecollapse} event which will
* cancel the collapse action if it returns false.
* @param {Boolean} animate True to animate the transition, else false (defaults to the value of the
* {@link #animCollapse} panel config)
* @return {Ext.Panel} this
*/
collapse : function(animate){
if(this.collapsed || this.el.hasFxBlock() || this.fireEvent('beforecollapse', this, animate) === false){
return;
}
var doAnim = animate === true || (animate !== false &amp;&amp; this.animCollapse);
this.beforeEffect(doAnim);
this.onCollapse(doAnim, animate);
return this;
},
<span id='Ext-Panel-method-onCollapse'> // private
</span> onCollapse : function(doAnim, animArg){
if(doAnim){
this[this.collapseEl].slideOut(this.slideAnchor,
Ext.apply(this.createEffect(animArg||true, this.afterCollapse, this),
this.collapseDefaults));
}else{
this[this.collapseEl].hide(this.hideMode);
this.afterCollapse(false);
}
},
<span id='Ext-Panel-method-afterCollapse'> // private
</span> afterCollapse : function(anim){
this.collapsed = true;
this.el.addClass(this.collapsedCls);
if(anim !== false){
this[this.collapseEl].hide(this.hideMode);
}
this.afterEffect(anim);
// Reset lastSize of all sub-components so they KNOW they are in a collapsed container
this.cascade(function(c) {
if (c.lastSize) {
c.lastSize = { width: undefined, height: undefined };
}
});
this.fireEvent('collapse', this);
},
<span id='Ext-Panel-method-expand'> /**
</span> * Expands the panel body so that it becomes visible. Fires the {@link #beforeexpand} event which will
* cancel the expand action if it returns false.
* @param {Boolean} animate True to animate the transition, else false (defaults to the value of the
* {@link #animCollapse} panel config)
* @return {Ext.Panel} this
*/
expand : function(animate){
if(!this.collapsed || this.el.hasFxBlock() || this.fireEvent('beforeexpand', this, animate) === false){
return;
}
var doAnim = animate === true || (animate !== false &amp;&amp; this.animCollapse);
this.el.removeClass(this.collapsedCls);
this.beforeEffect(doAnim);
this.onExpand(doAnim, animate);
return this;
},
<span id='Ext-Panel-method-onExpand'> // private
</span> onExpand : function(doAnim, animArg){
if(doAnim){
this[this.collapseEl].slideIn(this.slideAnchor,
Ext.apply(this.createEffect(animArg||true, this.afterExpand, this),
this.expandDefaults));
}else{
this[this.collapseEl].show(this.hideMode);
this.afterExpand(false);
}
},
<span id='Ext-Panel-method-afterExpand'> // private
</span> afterExpand : function(anim){
this.collapsed = false;
if(anim !== false){
this[this.collapseEl].show(this.hideMode);
}
this.afterEffect(anim);
if (this.deferLayout) {
delete this.deferLayout;
this.doLayout(true);
}
this.fireEvent('expand', this);
},
<span id='Ext-Panel-method-toggleCollapse'> /**
</span> * Shortcut for performing an {@link #expand} or {@link #collapse} based on the current state of the panel.
* @param {Boolean} animate True to animate the transition, else false (defaults to the value of the
* {@link #animCollapse} panel config)
* @return {Ext.Panel} this
*/
toggleCollapse : function(animate){
this[this.collapsed ? 'expand' : 'collapse'](animate);
return this;
},
<span id='Ext-Panel-method-onDisable'> // private
</span> onDisable : function(){
if(this.rendered &amp;&amp; this.maskDisabled){
this.el.mask();
}
Ext.Panel.superclass.onDisable.call(this);
},
<span id='Ext-Panel-method-onEnable'> // private
</span> onEnable : function(){
if(this.rendered &amp;&amp; this.maskDisabled){
this.el.unmask();
}
Ext.Panel.superclass.onEnable.call(this);
},
<span id='Ext-Panel-method-onResize'> // private
</span> onResize : function(adjWidth, adjHeight, rawWidth, rawHeight){
var w = adjWidth,
h = adjHeight;
if(Ext.isDefined(w) || Ext.isDefined(h)){
if(!this.collapsed){
// First, set the the Panel's body width.
// If we have auto-widthed it, get the resulting full offset width so we can size the Toolbars to match
// The Toolbars must not buffer this resize operation because we need to know their heights.
if(Ext.isNumber(w)){
this.body.setWidth(w = this.adjustBodyWidth(w - this.getFrameWidth()));
} else if (w == 'auto') {
w = this.body.setWidth('auto').dom.offsetWidth;
} else {
w = this.body.dom.offsetWidth;
}
if(this.tbar){
this.tbar.setWidth(w);
if(this.topToolbar){
this.topToolbar.setSize(w);
}
}
if(this.bbar){
this.bbar.setWidth(w);
if(this.bottomToolbar){
this.bottomToolbar.setSize(w);
// The bbar does not move on resize without this.
if (Ext.isIE9m) {
this.bbar.setStyle('position', 'static');
this.bbar.setStyle('position', '');
}
}
}
if(this.footer){
this.footer.setWidth(w);
if(this.fbar){
this.fbar.setSize(Ext.isIE9m ? (w - this.footer.getFrameWidth('lr')) : 'auto');
}
}
// At this point, the Toolbars must be layed out for getFrameHeight to find a result.
if(Ext.isNumber(h)){
h = Math.max(0, h - this.getFrameHeight());
//h = Math.max(0, h - (this.getHeight() - this.body.getHeight()));
this.body.setHeight(h);
}else if(h == 'auto'){
this.body.setHeight(h);
}
if(this.disabled &amp;&amp; this.el._mask){
this.el._mask.setSize(this.el.dom.clientWidth, this.el.getHeight());
}
}else{
// Adds an event to set the correct height afterExpand. This accounts for the deferHeight flag in panel
this.queuedBodySize = {width: w, height: h};
if(!this.queuedExpand &amp;&amp; this.allowQueuedExpand !== false){
this.queuedExpand = true;
this.on('expand', function(){
delete this.queuedExpand;
this.onResize(this.queuedBodySize.width, this.queuedBodySize.height);
}, this, {single:true});
}
}
this.onBodyResize(w, h);
}
this.syncShadow();
Ext.Panel.superclass.onResize.call(this, adjWidth, adjHeight, rawWidth, rawHeight);
},
<span id='Ext-Panel-method-onBodyResize'> // private
</span> onBodyResize: function(w, h){
this.fireEvent('bodyresize', this, w, h);
},
<span id='Ext-Panel-method-getToolbarHeight'> // private
</span> getToolbarHeight: function(){
var h = 0;
if(this.rendered){
Ext.each(this.toolbars, function(tb){
h += tb.getHeight();
}, this);
}
return h;
},
<span id='Ext-Panel-method-adjustBodyHeight'> // deprecate
</span> adjustBodyHeight : function(h){
return h;
},
<span id='Ext-Panel-method-adjustBodyWidth'> // private
</span> adjustBodyWidth : function(w){
return w;
},
<span id='Ext-Panel-method-onPosition'> // private
</span> onPosition : function(){
this.syncShadow();
},
<span id='Ext-Panel-method-getFrameWidth'> /**
</span> * Returns the width in pixels of the framing elements of this panel (not including the body width). To
* retrieve the body width see {@link #getInnerWidth}.
* @return {Number} The frame width
*/
getFrameWidth : function(){
var w = this.el.getFrameWidth('lr') + this.bwrap.getFrameWidth('lr');
if(this.frame){
var l = this.bwrap.dom.firstChild;
w += (Ext.fly(l).getFrameWidth('l') + Ext.fly(l.firstChild).getFrameWidth('r'));
w += this.mc.getFrameWidth('lr');
}
return w;
},
<span id='Ext-Panel-method-getFrameHeight'> /**
</span> * Returns the height in pixels of the framing elements of this panel (including any top and bottom bars and
* header and footer elements, but not including the body height). To retrieve the body height see {@link #getInnerHeight}.
* @return {Number} The frame height
*/
getFrameHeight : function() {
var h = this.el.getFrameWidth('tb') + this.bwrap.getFrameWidth('tb');
h += (this.tbar ? this.tbar.getHeight() : 0) +
(this.bbar ? this.bbar.getHeight() : 0);
if(this.frame){
h += this.el.dom.firstChild.offsetHeight + this.ft.dom.offsetHeight + this.mc.getFrameWidth('tb');
}else{
h += (this.header ? this.header.getHeight() : 0) +
(this.footer ? this.footer.getHeight() : 0);
}
return h;
},
<span id='Ext-Panel-method-getInnerWidth'> /**
</span> * Returns the width in pixels of the body element (not including the width of any framing elements).
* For the frame width see {@link #getFrameWidth}.
* @return {Number} The body width
*/
getInnerWidth : function(){
return this.getSize().width - this.getFrameWidth();
},
<span id='Ext-Panel-method-getInnerHeight'> /**
</span> * Returns the height in pixels of the body element (not including the height of any framing elements).
* For the frame height see {@link #getFrameHeight}.
* @return {Number} The body height
*/
getInnerHeight : function(){
return this.body.getHeight();
/* Deprecate
return this.getSize().height - this.getFrameHeight();
*/
},
<span id='Ext-Panel-method-syncShadow'> // private
</span> syncShadow : function(){
if(this.floating){
this.el.sync(true);
}
},
<span id='Ext-Panel-method-getLayoutTarget'> // private
</span> getLayoutTarget : function(){
return this.body;
},
<span id='Ext-Panel-method-getContentTarget'> // private
</span> getContentTarget : function(){
return this.body;
},
<span id='Ext-Panel-method-setTitle'> /**
</span> * &lt;p&gt;Sets the title text for the panel and optionally the {@link #iconCls icon class}.&lt;/p&gt;
* &lt;p&gt;In order to be able to set the title, a header element must have been created
* for the Panel. This is triggered either by configuring the Panel with a non-blank &lt;code&gt;{@link #title}&lt;/code&gt;,
* or configuring it with &lt;code&gt;&lt;b&gt;{@link #header}: true&lt;/b&gt;&lt;/code&gt;.&lt;/p&gt;
* @param {String} title The title text to set
* @param {String} iconCls (optional) {@link #iconCls iconCls} A user-defined CSS class that provides the icon image for this panel
*/
setTitle : function(title, iconCls){
this.title = title;
if(this.header &amp;&amp; this.headerAsText){
this.header.child('span').update(title);
}
if(iconCls){
this.setIconClass(iconCls);
}
this.fireEvent('titlechange', this, title);
return this;
},
<span id='Ext-Panel-method-getUpdater'> /**
</span> * Get the {@link Ext.Updater} for this panel. Enables you to perform Ajax updates of this panel's body.
* @return {Ext.Updater} The Updater
*/
getUpdater : function(){
return this.body.getUpdater();
},
<span id='Ext-Panel-method-load'> /**
</span> * Loads this content panel immediately with content returned from an XHR call.
* @param {Object/String/Function} config A config object containing any of the following options:
&lt;pre&gt;&lt;code&gt;
panel.load({
url: 'your-url.php',
params: {param1: 'foo', param2: 'bar'}, // or a URL encoded string
callback: yourFunction,
scope: yourObject, // optional scope for the callback
discardUrl: false,
nocache: false,
text: 'Loading...',
timeout: 30,
scripts: false
});
&lt;/code&gt;&lt;/pre&gt;
* The only required property is url. The optional properties nocache, text and scripts
* are shorthand for disableCaching, indicatorText and loadScripts and are used to set their
* associated property on this panel Updater instance.
* @return {Ext.Panel} this
*/
load : function(){
var um = this.body.getUpdater();
um.update.apply(um, arguments);
return this;
},
<span id='Ext-Panel-method-beforeDestroy'> // private
</span> beforeDestroy : function(){
Ext.Panel.superclass.beforeDestroy.call(this);
if(this.header){
this.header.removeAllListeners();
}
if(this.tools){
for(var k in this.tools){
Ext.destroy(this.tools[k]);
}
}
if(this.toolbars.length &gt; 0){
Ext.each(this.toolbars, function(tb){
tb.un('afterlayout', this.syncHeight, this);
tb.un('remove', this.syncHeight, this);
}, this);
}
if(Ext.isArray(this.buttons)){
while(this.buttons.length) {
Ext.destroy(this.buttons[0]);
}
}
if(this.rendered){
Ext.destroy(
this.ft,
this.header,
this.footer,
this.tbar,
this.bbar,
this.body,
this.mc,
this.bwrap,
this.dd
);
if (this.fbar) {
Ext.destroy(
this.fbar,
this.fbar.el
);
}
}
Ext.destroy(this.toolbars);
},
<span id='Ext-Panel-method-createClasses'> // private
</span> createClasses : function(){
this.headerCls = this.baseCls + '-header';
this.headerTextCls = this.baseCls + '-header-text';
this.bwrapCls = this.baseCls + '-bwrap';
this.tbarCls = this.baseCls + '-tbar';
this.bodyCls = this.baseCls + '-body';
this.bbarCls = this.baseCls + '-bbar';
this.footerCls = this.baseCls + '-footer';
},
<span id='Ext-Panel-method-createGhost'> // private
</span> createGhost : function(cls, useShim, appendTo){
var el = document.createElement('div');
el.className = 'x-panel-ghost ' + (cls ? cls : '');
if(this.header){
el.appendChild(this.el.dom.firstChild.cloneNode(true));
}
Ext.fly(el.appendChild(document.createElement('ul'))).setHeight(this.bwrap.getHeight());
el.style.width = this.el.dom.offsetWidth + 'px';;
if(!appendTo){
this.container.dom.appendChild(el);
}else{
Ext.getDom(appendTo).appendChild(el);
}
if(useShim !== false &amp;&amp; this.el.useShim !== false){
var layer = new Ext.Layer({shadow:false, useDisplay:true, constrain:false}, el);
layer.show();
return layer;
}else{
return new Ext.Element(el);
}
},
<span id='Ext-Panel-method-doAutoLoad'> // private
</span> doAutoLoad : function(){
var u = this.body.getUpdater();
if(this.renderer){
u.setRenderer(this.renderer);
}
u.update(Ext.isObject(this.autoLoad) ? this.autoLoad : {url: this.autoLoad});
},
<span id='Ext-Panel-method-getTool'> /**
</span> * Retrieve a tool by id.
* @param {String} id
* @return {Object} tool
*/
getTool : function(id) {
return this.tools[id];
}
<span id='Ext-Panel-cfg-autoEl'>/**
</span> * @cfg {String} autoEl @hide
*/
});
Ext.reg('panel', Ext.Panel);
</pre>
</body>
</html>