Upgrade to ExtJS 4.0.7 - Released 10/19/2011
[extjs.git] / src / toolbar / Spacer.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  * A simple element that adds extra horizontal space between items in a toolbar.
17  * By default a 2px wide space is added via CSS specification:
18  *
19  *     .x-toolbar .x-toolbar-spacer {
20  *         width: 2px;
21  *     }
22  *
23  * Example:
24  *
25  *     @example
26  *     Ext.create('Ext.panel.Panel', {
27  *         title: 'Toolbar Spacer Example',
28  *         width: 300,
29  *         height: 200,
30  *         tbar : [
31  *             'Item 1',
32  *             { xtype: 'tbspacer' }, // or ' '
33  *             'Item 2',
34  *             // space width is also configurable via javascript
35  *             { xtype: 'tbspacer', width: 50 }, // add a 50px space
36  *             'Item 3'
37  *         ],
38  *         renderTo: Ext.getBody()
39  *     });
40  */
41 Ext.define('Ext.toolbar.Spacer', {
42     extend: 'Ext.Component',
43     alias: 'widget.tbspacer',
44     alternateClassName: 'Ext.Toolbar.Spacer',
45     baseCls: Ext.baseCSSPrefix + 'toolbar-spacer',
46     focusable: false
47 });