|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.gwtext.client.widgets.Component
com.gwtext.client.widgets.ColorPalette
public class ColorPalette
Simple color palette class for choosing colors.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled |
| Field Summary |
|---|
| Fields inherited from class com.gwtext.client.widgets.Component |
|---|
config, id |
| Fields inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
DEBUG_ID_PREFIX |
| Constructor Summary | |
|---|---|
ColorPalette()
Create a new CollorPalette. |
|
ColorPalette(com.google.gwt.core.client.JavaScriptObject jsObj)
|
|
| Method Summary | |
|---|---|
void |
addListener(ColorPaletteListener listener)
Add a ColorPalette listener. |
protected com.google.gwt.core.client.JavaScriptObject |
create(com.google.gwt.core.client.JavaScriptObject config)
|
java.lang.String[] |
getColors()
An array of 6-digit color hex code strings (without the # symbol). |
protected com.google.gwt.core.client.JavaScriptObject |
getConfigPrototype()
|
java.lang.String |
getItemCls()
|
java.lang.String |
getValue()
The highlighted color. |
java.lang.String |
getXType()
Gets the xtype for this component as registered with ComponentMgr. |
boolean |
isAllowReselect()
Return true if reselecting is allowed. |
void |
select(java.lang.String color)
Selects the specified color in the palette (fires the select event). |
void |
setAllowReselect(boolean allowReselect)
If set to true then reselecting a color that is already selected fires the selection event. |
void |
setColors(java.lang.String[] colors)
Set the colors array. |
void |
setItemCls(java.lang.String itemCls)
The CSS class to apply to the containing element (defaults to "x-color-palette"). |
void |
setValue(java.lang.String value)
The color to highlight (should be a valid 6-digit color hex code without the # symbol). |
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
|---|
doAttachChildren, doDetachChildren, getParent, isAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent |
| Methods inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, setElement, setPixelSize, setSize, setStyleName, setStyleName, setStylePrimaryName, setVisible, sinkEvents, unsinkEvents |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ColorPalette()
public ColorPalette(com.google.gwt.core.client.JavaScriptObject jsObj)
| Method Detail |
|---|
protected com.google.gwt.core.client.JavaScriptObject getConfigPrototype()
getConfigPrototype in class Componentpublic java.lang.String getXType()
Component
TextField field = new TextField();
field.getXType() returns "textfield"
getXType in class Componentprotected com.google.gwt.core.client.JavaScriptObject create(com.google.gwt.core.client.JavaScriptObject config)
create in class Componentpublic void select(java.lang.String color)
color - A valid 6-digit color hex code (# will be stripped if included)public void addListener(ColorPaletteListener listener)
listener - the listenerpublic boolean isAllowReselect()
public void setAllowReselect(boolean allowReselect)
allowReselect - true to allow reselectpublic java.lang.String getItemCls()
public void setItemCls(java.lang.String itemCls)
itemCls - the item CSS classpublic java.lang.String getValue()
public void setValue(java.lang.String value)
value - the initial colorpublic java.lang.String[] getColors()
public void setColors(java.lang.String[] colors)
throws java.lang.IllegalStateException
colors - the colors array
java.lang.IllegalStateException - this property cannot be changed after the Component has been rendered
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||