SwatObject
└─SwatUIObject
└─SwatWidget
└─SwatControl
└─SwatInputControl
└─SwatSimpleColorEntry
public class SwatSimpleColorEntry
extends SwatInputControl
| Field Summary | |
|---|---|
| string | Access key. |
| array | Array of colors to display in this color selector. |
| string | Selected color. |
| Fields inherited from Swat.SwatInputControl | |
|---|---|
| required | |
| Constructor Summary | |
|---|---|
SwatSimpleColorEntry(string id) Creates a new simple color selection widget. |
|
| Method Summary | |
|---|---|
| void | display() Displays this simple color selector widget. |
| protected array | Gets the array of CSS classes that are applied to this simple color entry widget. |
| protected string | Gets simple color selector inline JavaScript. |
| string | getState() Gets the current state of this simple color selector widget. |
| void | setState(string state) Sets the current state of this simple color selector widget. |
| Methods inherited from Swat.SwatInputControl | |
|---|---|
| getForm, init | |
| Methods inherited from Swat.SwatControl | |
|---|---|
| addMessage, getNote, printWidgetTree | |
| Methods inherited from Swat.SwatWidget | |
|---|---|
| addCompositeWidget, addMessage, confirmCompositeWidgets, copy, createCompositeWidgets, display, displayHtmlHeadEntries, getCSSClassNames, getCompositeWidget, getCompositeWidgets, getFocusableHtmlId, getHtmlHeadEntrySet, getMessages, hasMessage, init, isDisplayed, isInitialized, isProcessed, isSensitive, printWidgetTree, process, replaceWithContainer | |
| Methods inherited from Swat.SwatUIObject | |
|---|---|
| addComment, addJavaScript, addStyleSheet, addTangoAttribution, copy, getCSSClassNames, getCSSClassString, getFirstAncestor, getHtmlHeadEntrySet, getInlineJavaScript, getUniqueId, isVisible | |
public string $access_key = null
Access key
Access key for this simple color control, for keyboard nagivation.
public array $colors = array(...)
Array of colors to display in this color selector
The array is flat and contains three or six digit hex color codes.
The default palette is the
Tango Project color palette.
public string $value = null
Selected color
The selected color in three or six digit hexidecimal representation.
public SwatSimpleColorEntry(string id)
Creates a new simple color selection widget
id - a non-visible unique id for this widget.public void display()
Displays this simple color selector widget
protected array getCSSClassNames()
Gets the array of CSS classes that are applied to this simple color entry widget
protected string getInlineJavaScript()
Gets simple color selector inline JavaScript
The JavaScript is the majority of the simple color selector code
public string getState()
Gets the current state of this simple color selector widget
public void setState(string state)
Sets the current state of this simple color selector widget
state - the new state of this simple color selector widget.
Simple color selector widget.
This color selector displays a simple palette to the user with a set of predefined color choices. It requires JavaScript to work correctly.