Upgrade to ExtJS 4.0.1 - Released 05/18/2011
[extjs.git] / docs / source / AbstractFit.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5   <title>The source code</title>
6   <link href="../prettify/prettify.css" type="text/css" rel="stylesheet" />
7   <script type="text/javascript" src="../prettify/prettify.js"></script>
8   <style type="text/css">
9     .highlight { display: block; background-color: #ddd; }
10   </style>
11   <script type="text/javascript">
12     function highlight() {
13       document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
14     }
15   </script>
16 </head>
17 <body onload="prettyPrint(); highlight();">
18   <pre class="prettyprint lang-js"><span id='Ext-layout-container-AbstractFit'>/**
19 </span> * @class Ext.layout.container.AbstractFit
20  * @extends Ext.layout.container.Container
21  * &lt;p&gt;This is a base class for layouts that contain &lt;b&gt;a single item&lt;/b&gt; that automatically expands to fill the layout's
22  * container.  This class is intended to be extended or created via the &lt;tt&gt;layout:'fit'&lt;/tt&gt; {@link Ext.container.Container#layout}
23  * config, and should generally not need to be created directly via the new keyword.&lt;/p&gt;
24  * &lt;p&gt;FitLayout does not have any direct config options (other than inherited ones).  To fit a panel to a container
25  * using FitLayout, simply set layout:'fit' on the container and add a single panel to it.  If the container has
26  * multiple panels, only the first one will be displayed.  Example usage:&lt;/p&gt;
27  * &lt;pre&gt;&lt;code&gt;
28 var p = new Ext.panel.Panel({
29     title: 'Fit Layout',
30     layout:'fit',
31     items: {
32         title: 'Inner Panel',
33         html: '&amp;lt;p&amp;gt;This is the inner panel content&amp;lt;/p&amp;gt;',
34         border: false
35     }
36 });
37 &lt;/code&gt;&lt;/pre&gt;
38  */
39 Ext.define('Ext.layout.container.AbstractFit', {
40
41     /* Begin Definitions */
42
43     extend: 'Ext.layout.container.Container',
44
45     /* End Definitions */
46
47     itemCls: Ext.baseCSSPrefix + 'fit-item',
48     targetCls: Ext.baseCSSPrefix + 'layout-fit',
49     type: 'fit'
50 });</pre>
51 </body>
52 </html>