Upgrade to ExtJS 4.0.2 - Released 06/09/2011
[extjs.git] / examples / ux / layout / component / form / ItemSelector.js
1 /*
2
3 This file is part of Ext JS 4
4
5 Copyright (c) 2011 Sencha Inc
6
7 Contact:  http://www.sencha.com/contact
8
9 GNU General Public License Usage
10 This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file.  Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.
11
12 If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact.
13
14 */
15 /**
16  * @private
17  * @class Ext.ux.layout.component.form.ItemSelector
18  * @extends Ext.layout.component.field.Field
19  * Layout class for {@link Ext.ux.form.ItemSelector} fields.
20  * @private
21  */
22 Ext.define('Ext.ux.layout.component.form.ItemSelector', {
23     extend: 'Ext.layout.component.field.Field',
24     alias: ['layout.itemselectorfield'],
25
26     type: 'itemselectorfield',
27
28     /**
29      * @cfg {Number} height The height of the field. Defaults to 200.
30      */
31     defaultHeight: 200,
32
33     sizeBodyContents: function(width, height) {
34         var me = this;
35
36         if (!Ext.isNumber(height)) {
37             height = me.defaultHeight;
38         }
39
40         me.owner.innerCt.setSize(width, height);
41     }
42 });