Upgrade to ExtJS 4.0.2 - Released 06/09/2011
[extjs.git] / docs / source / Separator2.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-menu-Separator'>/**
19 </span> * @class Ext.menu.Separator
20  * @extends Ext.menu.Item
21  *
22  * Adds a separator bar to a menu, used to divide logical groups of menu items. Generally you will
23  * add one of these by using &quot;-&quot; in your call to add() or in your items config rather than creating one directly.
24  *
25  * {@img Ext.menu.Separator/Ext.menu.Separator.png Ext.menu.Separator component}
26  *
27  * ## Code 
28  *
29  *     Ext.create('Ext.menu.Menu', {
30  *         width: 100,
31  *         height: 100,
32  *         floating: false,  // usually you want this set to True (default)
33  *         renderTo: Ext.getBody(),  // usually rendered by it's containing component
34  *         items: [{
35  *             text: 'icon item',
36  *             iconCls: 'add16'
37  *         },{
38  *             xtype: 'menuseparator'
39  *         },{
40  *            text: 'seperator above',
41  *         },{
42  *            text: 'regular item',
43  *         }]
44  *     }); 
45  *
46  * @markdown
47  */
48 Ext.define('Ext.menu.Separator', {
49     extend: 'Ext.menu.Item',
50     alias: 'widget.menuseparator',
51     
52 <span id='Ext-menu-Separator-cfg-activeCls'>    /**
53 </span>     * @cfg {String} activeCls @hide
54      */
55     
56 <span id='Ext-menu-Separator-cfg-canActivate'>    /**
57 </span>     * @cfg {Boolean} canActivate @hide
58      */
59     canActivate: false,
60     
61 <span id='Ext-menu-Separator-cfg-clickHideDelay'>    /**
62 </span>     * @cfg {Boolean} clickHideDelay @hide
63      */
64      
65 <span id='Ext-menu-Separator-cfg-destroyMenu'>    /**
66 </span>     * @cfg {Boolean} destroyMenu @hide
67      */
68      
69 <span id='Ext-menu-Separator-cfg-disabledCls'>    /**
70 </span>     * @cfg {Boolean} disabledCls @hide
71      */
72      
73     focusable: false,
74      
75 <span id='Ext-menu-Separator-cfg-href'>    /**
76 </span>     * @cfg {String} href @hide
77      */
78     
79 <span id='Ext-menu-Separator-cfg-hrefTarget'>    /**
80 </span>     * @cfg {String} hrefTarget @hide
81      */
82     
83 <span id='Ext-menu-Separator-cfg-hideOnClick'>    /**
84 </span>     * @cfg {Boolean} hideOnClick @hide
85      */
86     hideOnClick: false,
87     
88 <span id='Ext-menu-Separator-cfg-icon'>    /**
89 </span>     * @cfg {String} icon @hide
90      */
91     
92 <span id='Ext-menu-Separator-cfg-iconCls'>    /**
93 </span>     * @cfg {String} iconCls @hide
94      */
95     
96 <span id='Ext-menu-Separator-cfg-menu'>    /**
97 </span>     * @cfg {Mixed} menu @hide
98      */
99     
100 <span id='Ext-menu-Separator-cfg-menuAlign'>    /**
101 </span>     * @cfg {String} menuAlign @hide
102      */
103     
104 <span id='Ext-menu-Separator-cfg-menuExpandDelay'>    /**
105 </span>     * @cfg {Number} menuExpandDelay @hide
106      */
107     
108 <span id='Ext-menu-Separator-cfg-menuHideDelay'>    /**
109 </span>     * @cfg {Number} menuHideDelay @hide
110      */
111     
112 <span id='Ext-menu-Separator-cfg-plain'>    /**
113 </span>     * @cfg {Boolean} plain @hide
114      */
115     plain: true,
116     
117 <span id='Ext-menu-Separator-cfg-separatorCls'>    /**
118 </span>     * @cfg {String} separatorCls
119      * The CSS class used by the separator item to show the incised line.
120      * Defaults to `Ext.baseCSSPrefix + 'menu-item-separator'`.
121      * @markdown
122      */
123     separatorCls: Ext.baseCSSPrefix + 'menu-item-separator',
124     
125 <span id='Ext-menu-Separator-cfg-text'>    /**
126 </span>     * @cfg {String} text @hide
127      */
128     text: '&amp;#160;',
129     
130     onRender: function(ct, pos) {
131         var me = this,
132             sepCls = me.separatorCls;
133             
134         me.cls += ' ' + sepCls;
135         
136         Ext.applyIf(me.renderSelectors, {
137             itemSepEl: '.' + sepCls
138         });
139         
140         me.callParent(arguments);
141     }
142 });</pre>
143 </body>
144 </html>