public class ColorPickerGradient 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 |
|---|
ColorPickerGradient(String id,
AbstractColorPicker.Coordinates2Color converter)
Instantiates a new color picker gradient.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
doSetValue(Color color)
Sets the value of this field.
|
protected ColorPickerGradientState |
getState()
Returns the shared state bean with information to be sent from the server
to the client.
|
protected ColorPickerGradientState |
getState(boolean markAsDirty)
Returns the shared state for this connector.
|
Color |
getValue()
Returns the current value of this object.
|
void |
setBackgroundColor(Color color)
Sets the background color.
|
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, 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, 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 ColorPickerGradient(String id, AbstractColorPicker.Coordinates2Color converter)
id - the idconverter - the converterpublic 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 color, 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 fieldpublic void setBackgroundColor(Color color)
color - the new background colorprotected ColorPickerGradientState getState()
AbstractComponentgetState in class AbstractField<Color>protected ColorPickerGradientState getState(boolean markAsDirty)
AbstractClientConnectorgetState in class AbstractField<Color>markAsDirty - true if the connector should automatically be marked dirty,
false otherwiseAbstractClientConnector.getState()Copyright © 2020 Vaadin Ltd. All rights reserved.