public class ColorPickerGrid extends AbstractField<Color>
HasValue.ValueChangeEvent<V>, HasValue.ValueChangeListener<V>Component.ErrorEvent, Component.Event, Component.Focusable, Component.ListenerClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListenerSizeable.UnitDESIGN_ATTR_PLAIN_TEXTSIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS| Constructor and Description |
|---|
ColorPickerGrid()
Instantiates a new color picker grid.
|
ColorPickerGrid(Color[][] colors)
Instantiates a new color picker grid.
|
ColorPickerGrid(int rows,
int columns)
Instantiates a new color picker grid.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
doSetValue(Color color)
Sets the value of this field.
|
int[] |
getPosition()
Gets the position.
|
protected ColorPickerGridState |
getState()
Returns the shared state bean with information to be sent from the server
to the client.
|
protected ColorPickerGridState |
getState(boolean markAsDirty)
Returns the shared state for this connector.
|
Color |
getValue()
Returns the current value of this object.
|
void |
setColorGrid(Color[][] colors)
Sets the color grid.
|
void |
setPosition(int x,
int y)
Sets the position.
|
void |
setValue(Color color)
Sets the value of this object.
|
addValueChangeListener, createValueChange, focus, getCustomAttributes, getTabIndex, isDifferentValue, isReadOnly, isRequiredIndicatorVisible, readDesign, setReadOnly, setRequiredIndicatorVisible, setTabIndex, setValue, writeDesignaddContextClickListener, addListener, addShortcutListener, addStyleName, attach, beforeClientResponse, detach, findAncestor, fireComponentErrorEvent, fireComponentEvent, getActionManager, getCaption, getComponentError, getData, getDebugId, getDescription, getErrorMessage, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isConnectorEnabled, isEnabled, isOrHasAncestor, isResponsive, isVisible, removeContextClickListener, removeListener, removeShortcutListener, removeStyleName, setCaption, setCaptionAsHtml, setComponentError, setData, setDebugId, setDescription, setDescription, setEnabled, setHeight, setHeight, setHeightFull, setHeightUndefined, setIcon, setId, setLocale, setParent, setPrimaryStyleName, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidth, setWidth, setWidthFull, setWidthUndefinedaddAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hashCode, hasListeners, isAttached, isThis, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource, updateDiffstateclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitclear, getDefaultValidator, getEmptyValue, getOptionalValue, isEmptyaddListener, addStyleName, addStyleNames, attach, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isVisible, removeListener, removeStyleName, removeStyleNames, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setStyleName, setStyleName, setVisibleaddAttachListener, addDetachListener, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandlergetConnectorIdgetHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightFull, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull, setWidthUndefinedpublic ColorPickerGrid()
public ColorPickerGrid(int rows,
int columns)
rows - the rowscolumns - the columnspublic ColorPickerGrid(Color[][] colors)
colors - the colorspublic void setColorGrid(Color[][] colors)
colors - the new color gridpublic void setPosition(int x,
int y)
x - the xy - the ypublic int[] getPosition()
public void setValue(Color color)
getValue(), fires a ValueChangeEvent. Throws
NullPointerException if the value is null.setValue in interface HasValue<Color>setValue in class AbstractField<Color>color - the new value, not nullNullPointerException - if color is nullpublic Color getValue()
HasValueImplementation note: the implementing class should document whether null values may be returned or not.
protected void doSetValue(Color color)
AbstractFieldIllegalArgumentException if the value is invalid. Typically saves
the value to shared state.doSetValue in class AbstractField<Color>color - the new value of the fieldprotected ColorPickerGridState getState()
AbstractComponentgetState in class AbstractField<Color>protected ColorPickerGridState getState(boolean markAsDirty)
AbstractClientConnectorgetState in class AbstractField<Color>markAsDirty - true if the connector should automatically be marked dirty,
false otherwiseAbstractClientConnector.getState()Copyright © 2022 Vaadin Ltd. All rights reserved.