Renderer for {@link goog.ui.ColorMenuButton}s.
extends goog.ui.MenuButtonRenderer| Instance Method Summary | |
createCaption(?goog.ui.ControlContent content, ?goog.dom.DomHelper dom) ⇒ ?ElementOverrides the superclass implementation by wrapping the caption text or DOM structure in a color indicator element. Creates the following DOM structure: The 'goog-color-menu-button-indicator' style should be defined to have a bottom border of nonzero width and a default color that blends into its background. | |
initializeDom(?goog.ui.ColorMenuButton button)Initializes the button's DOM when it enters the document. Overrides the superclass implementation by making sure the button's color indicator is initialized. | |
setValue(?Element element, <Any Type> value)Takes a color menu button control's root element and a value object (which is assumed to be a color), and updates the button's DOM to reflect the new color. Overrides {@link goog.ui.ButtonRenderer#setValue}. | |
| Static Method Summary | |
setCaptionValue(?Element caption, <Any Type> value)Takes a control's content element and a value object (which is assumed to be a color), and updates its DOM to reflect the new color. | |
wrapCaption(?goog.ui.ControlContent content, ?goog.dom.DomHelper dom) ⇒ ?ElementWrap a caption in a div with the color-menu-button-indicator CSS class. | |