search

goog.ui.Palette

Provided By
Extends
All Implemented Interfaces
All Known Direct Subclasses

A palette is a grid of DOM nodes that the user can highlight or select via the keyboard or the mouse. The selection state of the palette is controlled an ACTION event. Event listeners may retrieve the selected item using the #getSelectedItem or #getSelectedIndex method.

Use this class as the base for components like color palettes or emoticon pickers. Use #setContent to set/change the items in the palette after construction. See palette.html demo for example usage.

new Palette( items, opt_renderer, opt_domHelper )

Parameters
items(Array<(Node|null)>|null)

Array of DOM nodes to be displayed as items in the palette grid (limited to one per cell).

opt_renderer(goog.ui.PaletteRenderer|null)=

Renderer used to render or decorate the palette; defaults to goog.ui.PaletteRenderer.

opt_domHelper(goog.dom.DomHelper|null)=

Optional DOM helper, used for document interaction.

Instance Methods

Instance Properties

Classes

Enumerations