X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/7a654f8d43fdb43d78b63d90528bed6e86b608cc..refs/heads/master:/docs/source/Cycle.html diff --git a/docs/source/Cycle.html b/docs/source/Cycle.html index f1d35d6e..68e7bc45 100644 --- a/docs/source/Cycle.html +++ b/docs/source/Cycle.html @@ -1,39 +1,47 @@ -
+ +\ No newline at end of file +}); * @class Ext.button.Cycle - * @extends Ext.button.Split - * A specialized SplitButton that contains a menu of {@link Ext.menu.CheckItem} elements. The button automatically + + + + +The source code + + + + + + +* A specialized SplitButton that contains a menu of {@link Ext.menu.CheckItem} elements. The button automatically * cycles through each menu item on click, raising the button's {@link #change} event (or calling the button's * {@link #changeHandler} function, if supplied) for the active menu item. Clicking on the arrow section of the - * button displays the dropdown menu just like a normal SplitButton. - * {@img Ext.button.Cycle/Ext.button.Cycle.png Ext.button.Cycle component} - * Example usage: - * <pre><code> -Ext.create('Ext.button.Cycle', { - showText: true, - prependText: 'View as ', - renderTo: Ext.getBody(), - menu: { - id: 'view-type-menu', - items: [{ - text:'text only', - iconCls:'view-text', - checked:true - },{ - text:'HTML', - iconCls:'view-html' - }] - }, - changeHandler:function(cycleBtn, activeItem){ - Ext.Msg.alert('Change View', activeItem.text); - } -}); -</code></pre> - * @constructor - * Create a new split button - * @param {Object} config The config object - * @xtype cycle + * button displays the dropdown menu just like a normal SplitButton. Example usage: + * + * @example + * Ext.create('Ext.button.Cycle', { + * showText: true, + * prependText: 'View as ', + * renderTo: Ext.getBody(), + * menu: { + * id: 'view-type-menu', + * items: [{ + * text: 'text only', + * iconCls: 'view-text', + * checked: true + * },{ + * text: 'HTML', + * iconCls: 'view-html' + * }] + * }, + * changeHandler: function(cycleBtn, activeItem) { + * Ext.Msg.alert('Change View', activeItem.text); + * } + * }); */ - Ext.define('Ext.button.Cycle', { /* Begin Definitions */ @@ -45,35 +53,41 @@ Ext.define('Ext.button.Cycle', { /* End Definitions */ - * @cfg {Array} items <p>Deprecated as of 4.0. Use the {@link #menu} config instead. All menu items will be created - * as {@link Ext.menu.CheckItem CheckItem}s.</p> - * <p>An array of {@link Ext.menu.CheckItem} <b>config</b> objects to be used when creating the - * button's menu items (e.g., {text:'Foo', iconCls:'foo-icon'}) + * @cfg {Object[]} items + * An array of {@link Ext.menu.CheckItem} **config** objects to be used when creating the button's menu items (e.g., + * `{text:'Foo', iconCls:'foo-icon'}`) + * + * @deprecated 4.0 Use the {@link #menu} config instead. All menu items will be created as + * {@link Ext.menu.CheckItem CheckItems}. */ - * @cfg {Boolean} showText True to display the active item's text as the button text (defaults to false). - * The Button will show its configured {@link #text} if this. config is omitted. + * @cfg {Boolean} [showText=false] + * True to display the active item's text as the button text. The Button will show its + * configured {@link #text} if this config is omitted. */ - * @cfg {String} prependText A static string to prepend before the active item's text when displayed as the - * button's text (only applies when showText = true, defaults to '') + * @cfg {String} [prependText=''] + * A static string to prepend before the active item's text when displayed as the button's text (only applies when + * showText = true). */ - * @cfg {Function} changeHandler A callback function that will be invoked each time the active menu - * item in the button's menu has changed. If this callback is not supplied, the SplitButton will instead - * fire the {@link #change} event on active item change. The changeHandler function will be called with the - * following argument list: (SplitButton this, Ext.menu.CheckItem item) + * @cfg {Function} changeHandler + * A callback function that will be invoked each time the active menu item in the button's menu has changed. If this + * callback is not supplied, the SplitButton will instead fire the {@link #change} event on active item change. The + * changeHandler function will be called with the following argument list: (SplitButton this, Ext.menu.CheckItem + * item) */ - * @cfg {String} forceIcon A css class which sets an image to be used as the static icon for this button. This - * icon will always be displayed regardless of which item is selected in the dropdown list. This overrides the - * default behavior of changing the button's icon to match the selected item's icon on change. + * @cfg {String} forceIcon + * A css class which sets an image to be used as the static icon for this button. This icon will always be displayed + * regardless of which item is selected in the dropdown list. This overrides the default behavior of changing the + * button's icon to match the selected item's icon on change. */ - * @property menu - * @type Menu - * The {@link Ext.menu.Menu Menu} object used to display the {@link Ext.menu.CheckItem CheckItems} representing the available choices. + * @property {Ext.menu.Menu} menu + * The {@link Ext.menu.Menu Menu} object used to display the {@link Ext.menu.CheckItem CheckItems} representing the + * available choices. */ // private @@ -91,10 +105,10 @@ Ext.define('Ext.button.Cycle', { return me.text; }, -