A keyboard accessible palette, for picking a color/emoticon/etc.
A mixin for a grid showing various entities, so the user can pick a certain entity.
See the dijit/_PaletteMixin reference documentation for more information.
The currently focused cell (if the palette itself has focus), or otherwise the cell to be focused when the palette itself gets focus. Different from value, which represents the selected (i.e. clicked) cell.
Index of the currently selected cell. Initially, none selected
True if mouse was pressed while over this widget, and hasn't been released yet
Subclasses may define a cssStateNodes property that lists sub-nodes within the widget that need CSS classes applied on mouse hover/press and focus.
Each entry in this optional hash is a an attach-point name (like "upArrowButton") mapped to a CSS class name (like "dijitUpArrowButton"). Example:
{ "upArrowButton": "dijitUpArrowButton", "downArrowButton": "dijitDownArrowButton" }
The above will set the CSS class dijitUpArrowButton to the this.upArrowButton DOMNode when it
is hovered, etc.
Number of milliseconds before a held key or button becomes typematic
Constructor for Object created for each cell of the palette. dyeClass should implement the dijit/_PaletteMixin.__Dye interface.
Fraction of time used to change the typematic timer between events 1.0 means that each typematic event fires at defaultTimeout intervals Less than 1.0 means that each typematic event fires at an increasing faster rate
Handler for CSS event on this.domNode. Sets hovering and active properties depending on mouse state, which triggers _setStateClass() to set appropriate CSS classes for this.domNode.
Parameter | Type | Description |
---|---|---|
event | Event |
Return instance of dijit.Dye for specified cell of palette
Parameter | Type | Description |
---|---|---|
value | undefined | |
row | undefined | |
col | undefined | |
title | undefined |
Get JS object for given cell DOMNode
Parameter | Type | Description |
---|---|---|
cell | DomNode |
This is the callback for typematic. It changes the focus and the highlighed cell.
Parameter | Type | Description |
---|---|---|
increment | undefined | How much the key is navigated. |
typeCount | undefined | How many times typematic has fired. |
Subclass must call _preparePalette() from postCreate(), passing in the tooltip for each cell
Parameter | Type | Description |
---|---|---|
choices | String[][] | id's for each cell of the palette, used to create Dye JS object for each cell |
titles | String[] | Localized tooltip for each cell |
Sets which node is the focused cell.
At any point in time there's exactly one cell with tabIndex != -1. If focus is inside the palette then focus is on that cell.
After calling this method, arrow key handlers and mouse click handlers should focus the cell in a setTimeout().
Parameter | Type | Description |
---|---|---|
node | DomNode |
Update the visual state of the widget by setting the css classes on this.domNode (or this.stateNode if defined) by combining this.baseClass with various suffixes that represent the current widget state(s).
In the case where a widget has multiple states, it sets the class based on all possible combinations. For example, an invalid form widget that is being hovered will be "dijitInput dijitInputInvalid dijitInputHover dijitInputInvalidHover".
The widget may have one or more of the following states, determined by this.state, this.checked, this.valid, and this.selected:
In addition, it may have one or more of the following states, based on this.disabled and flags set in _onMouse (this.active, this.hovering) and from focus manager (this.focused):
This selects a cell. It triggers the onChange event.
Parameter | Type | Description |
---|---|---|
value | String | Value of the cell to select |
priorityChange | Boolean |
Optional Optional parameter used to tell the select whether or not to fire onChange event. |
Handler for hover/active mouse event on widget's subnode
Parameter | Type | Description |
---|---|---|
node | undefined | |
clazz | undefined | |
evt | undefined |
Track mouse/focus events on specified node and set CSS class on that node to indicate current state. Usually not called directly, but via cssStateNodes attribute.
Given class=foo, will set the following CSS class on the node
Note that it won't set any classes if the widget is disabled.
Parameter | Type | Description |
---|---|---|
node | DomNode | Should be a sub-node of the widget, not the top node (this.domNode), since the top node is handled specially and automatically just by mixing in this class. |
clazz | String | CSS class name (ex: dijitSliderUpArrow) |
Focus this widget. Puts focus on the most recently focused cell.
Handler for click, enter key & space key. Selects the cell.
Parameter | Type | Description |
---|---|---|
evt | Event | The event. |
Callback when a cell is selected.
Parameter | Type | Description |
---|---|---|
value | String | Value corresponding to cell. |