X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/c930e9176a5a85509c5b0230e2bff5c22a591432..c8256059947f3aa8f5b0a9a2acf55e2142bb4742:/docs/source/ColorMenu.html diff --git a/docs/source/ColorMenu.html b/docs/source/ColorMenu.html index c15b62d5..e1103c75 100644 --- a/docs/source/ColorMenu.html +++ b/docs/source/ColorMenu.html @@ -1,103 +1,120 @@ - -
-/** - * @class Ext.menu.ColorMenu - * @extends Ext.menu.Menu - *- + + + +A menu containing a {@link Ext.ColorPalette} Component.
- *Notes:
* - * @xtype colormenu - */ - Ext.menu.ColorMenu = Ext.extend(Ext.menu.Menu, { - /** - * @cfg {Boolean} enableScrolling - * @hide - */ - enableScrolling : false, - /** - * @cfg {Function} handler - * Optional. A function that will handle the select event of this menu. - * The handler is passed the following parameters:- *
- Although not listed here, the constructor for this class - * accepts all of the configuration options of {@link Ext.ColorPalette}.
- *- If subclassing ColorMenu, any configuration options for the ColorPalette must be - * applied to the initialConfig property of the ColorMenu. - * Applying {@link Ext.ColorPalette ColorPalette} configuration settings to - * this will not affect the ColorPalette's configuration.
- *- */ - /** - * @cfg {Object} scope - * The scope (this reference) in which the- *
- - *
palette
: ColorPaletteThe {@link #palette Ext.ColorPalette}.- - *
color
: StringThe 6-digit color hex code (without the # symbol).{@link #handler}
- * function will be called. Defaults to this ColorMenu instance. - */ - - /** - * @cfg {Boolean} hideOnClick - * False to continue showing the menu after a color is selected, defaults to true. - */ - hideOnClick : true, - - /** - * @cfg {Number} maxHeight - * @hide - */ - /** - * @cfg {Number} scrollIncrement - * @hide - */ - /** - * @property palette - * @type ColorPalette - * The {@link Ext.ColorPalette} instance for this ColorMenu - */ - - - /** - * @event click - * @hide - */ - - /** - * @event itemclick - * @hide - */ - - initComponent : function(){ - Ext.apply(this, { - plain: true, - showSeparator: false, - items: this.palette = new Ext.ColorPalette(this.initialConfig) - }); - this.palette.purgeListeners(); - Ext.menu.ColorMenu.superclass.initComponent.call(this); - /** - * @event select - * Fires when a color is selected from the {@link #palette Ext.ColorPalette} - * @param {Ext.ColorPalette} palette The {@link #palette Ext.ColorPalette} - * @param {String} color The 6-digit color hex code (without the # symbol) - */ - this.relayEvents(this.palette, ['select']); - this.on('select', this.menuHide, this); - if(this.handler){ - this.on('select', this.handler, this.scope || this); - } - }, - - menuHide : function(){ - if(this.hideOnClick){ - this.hide(true); - } - } -}); -Ext.reg('colormenu', Ext.menu.ColorMenu); -
/*! + * Ext JS Library 3.2.1 + * Copyright(c) 2006-2010 Ext JS, Inc. + * licensing@extjs.com + * http://www.extjs.com/license + */ +/** + * @class Ext.menu.ColorMenu + * @extends Ext.menu.Menu + *+ \ No newline at end of fileA menu containing a {@link Ext.ColorPalette} Component.
+ *Notes:
* + * @xtype colormenu + */ + Ext.menu.ColorMenu = Ext.extend(Ext.menu.Menu, { + /** + * @cfg {Boolean} enableScrolling + * @hide + */ + enableScrolling : false, + /** + * @cfg {Function} handler + * Optional. A function that will handle the select event of this menu. + * The handler is passed the following parameters:+ *
- Although not listed here, the constructor for this class + * accepts all of the configuration options of {@link Ext.ColorPalette}.
+ *- If subclassing ColorMenu, any configuration options for the ColorPalette must be + * applied to the initialConfig property of the ColorMenu. + * Applying {@link Ext.ColorPalette ColorPalette} configuration settings to + * this will not affect the ColorPalette's configuration.
+ *+ */ + /** + * @cfg {Object} scope + * The scope (this reference) in which the+ *
- + *
palette
: ColorPaletteThe {@link #palette Ext.ColorPalette}.- + *
color
: StringThe 6-digit color hex code (without the # symbol).{@link #handler}
+ * function will be called. Defaults to this ColorMenu instance. + */ + + /** + * @cfg {Boolean} hideOnClick + * False to continue showing the menu after a color is selected, defaults to true. + */ + hideOnClick : true, + + cls : 'x-color-menu', + + /** + * @cfg {String} paletteId + * An id to assign to the underlying color palette. Defaults to null. + */ + paletteId : null, + + /** + * @cfg {Number} maxHeight + * @hide + */ + /** + * @cfg {Number} scrollIncrement + * @hide + */ + /** + * @property palette + * @type ColorPalette + * The {@link Ext.ColorPalette} instance for this ColorMenu + */ + + + /** + * @event click + * @hide + */ + + /** + * @event itemclick + * @hide + */ + + initComponent : function(){ + Ext.apply(this, { + plain: true, + showSeparator: false, + items: this.palette = new Ext.ColorPalette(Ext.applyIf({ + id: this.paletteId + }, this.initialConfig)) + }); + this.palette.purgeListeners(); + Ext.menu.ColorMenu.superclass.initComponent.call(this); + /** + * @event select + * Fires when a color is selected from the {@link #palette Ext.ColorPalette} + * @param {Ext.ColorPalette} palette The {@link #palette Ext.ColorPalette} + * @param {String} color The 6-digit color hex code (without the # symbol) + */ + this.relayEvents(this.palette, ['select']); + this.on('select', this.menuHide, this); + if(this.handler){ + this.on('select', this.handler, this.scope || this); + } + }, + + menuHide : function(){ + if(this.hideOnClick){ + this.hide(true); + } + } +}); +Ext.reg('colormenu', Ext.menu.ColorMenu); +