Class ColorPickerPopup
- java.lang.Object
-
- com.vaadin.server.AbstractClientConnector
-
- com.vaadin.ui.AbstractComponent
-
- com.vaadin.ui.AbstractSingleComponentContainer
-
- com.vaadin.ui.Panel
-
- com.vaadin.ui.Window
-
- com.vaadin.ui.components.colorpicker.ColorPickerPopup
-
- All Implemented Interfaces:
HasValue<Color>,Action.Container,Action.Notifier,ConnectorEventListener,ContextClickEvent.ContextClickNotifier,FieldEvents.BlurNotifier,FieldEvents.FocusNotifier,MethodEventSource,SerializableEventListener,ClientConnector,Scrollable,Sizeable,VariableOwner,Connector,Component,Component.Focusable,HasComponents,HasComponents.ComponentAttachDetachNotifier,LegacyComponent,SingleComponentContainer,Serializable,Iterable<Component>,EventListener
public class ColorPickerPopup extends Window implements HasValue<Color>
A component that represents color selection popup within a color picker.- Since:
- 7.0.0
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.vaadin.ui.Window
Window.CloseEvent, Window.CloseListener, Window.CloseShortcut, Window.ResizeEvent, Window.ResizeListener, Window.WindowModeChangeEvent, Window.WindowModeChangeListener, Window.WindowOrderChangeEvent, Window.WindowOrderChangeListener
-
Nested classes/interfaces inherited from interface com.vaadin.server.ClientConnector
ClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListener
-
Nested classes/interfaces inherited from interface com.vaadin.ui.Component
Component.ErrorEvent, Component.Event, Component.Focusable, Component.Listener
-
Nested classes/interfaces inherited from interface com.vaadin.ui.HasComponents
HasComponents.ComponentAttachDetachNotifier, HasComponents.ComponentAttachEvent, HasComponents.ComponentAttachListener, HasComponents.ComponentDetachEvent, HasComponents.ComponentDetachListener
-
Nested classes/interfaces inherited from interface com.vaadin.data.HasValue
HasValue.ValueChangeEvent<V>, HasValue.ValueChangeListener<V>
-
Nested classes/interfaces inherited from interface com.vaadin.server.Sizeable
Sizeable.Unit
-
-
Field Summary
-
Fields inherited from class com.vaadin.ui.Panel
actionManager
-
Fields inherited from class com.vaadin.ui.AbstractComponent
DESIGN_ATTR_PLAIN_TEXT
-
Fields inherited from interface com.vaadin.server.Sizeable
SIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS
-
-
Constructor Summary
Constructors Constructor Description ColorPickerPopup(Color initialColor)Instantiates a new color picker popup.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RegistrationaddValueChangeListener(HasValue.ValueChangeListener<Color> listener)Adds a value change listener.List<Color>getColorHistory()Gets the color history.ColorPickerHistorygetHistory()Gets the history.ColorgetValue()Returns the current value of this object.booleanisReadOnly()Returns the read-only status from the state of thisAbstractComponent.booleanisRequiredIndicatorVisible()Checks whether the required indicator is visible or not.voidsetHistoryVisible(boolean visible)Sets the visibility of the History.voidsetHSVTabVisible(boolean visible)Sets the HSV tab visibility.voidsetModal(boolean modal)Sets window modality.voidsetPreviewVisible(boolean visible)Sets the preview visibility.voidsetReadOnly(boolean readOnly)Sets the read-only status in the state of thisAbstractComponent.voidsetRequiredIndicatorVisible(boolean visible)Sets the visibility of the required indicator.voidsetRGBTabVisible(boolean visible)Sets the RGB tab visibility.voidsetSwatchesTabVisible(boolean visible)Sets the visibility of the Swatches tab.voidsetValue(Color color)Sets the value of this object.-
Methods inherited from class com.vaadin.ui.Window
addBlurListener, addCloseListener, addCloseShortcut, addFocusListener, addResizeListener, addWindowModeChangeListener, addWindowOrderChangeListener, bringToFront, center, changeVariables, close, fireClose, fireResize, fireWindowOrderChange, fireWindowWindowModeChange, focus, getAssistiveDescription, getAssistivePostfix, getAssistivePrefix, getAssistiveRole, getCloseShortcuts, getCustomAttributes, getOrderPosition, getPositionX, getPositionY, getState, getState, getTabStopBottomAssistiveText, getTabStopTopAssistiveText, getWindowMode, hasCloseShortcut, isClosable, isDraggable, isModal, isResizable, isResizeLazy, isTabStopEnabled, paintContent, readDesign, readDesignChildren, removeAllCloseShortcuts, removeCloseListener, removeCloseShortcut, removeCloseShortcut, removeResizeListener, removeWindowModeChangeListener, setAssistiveDescription, setAssistivePostfix, setAssistivePrefix, setAssistiveRole, setClosable, setCloseShortcut, setDraggable, setParent, setPosition, setPositionX, setPositionY, setResizable, setResizeLazy, setTabStopBottomAssistiveText, setTabStopEnabled, setTabStopTopAssistiveText, setWindowMode, writeDesign
-
Methods inherited from class com.vaadin.ui.Panel
addAction, addActionHandler, addClickListener, getActionManager, getScrollLeft, getScrollTop, getTabIndex, removeAction, removeActionHandler, removeAllActionHandlers, removeClickListener, setCaption, setScrollLeft, setScrollTop, setTabIndex
-
Methods inherited from class com.vaadin.ui.AbstractSingleComponentContainer
addComponentAttachListener, addComponentDetachListener, fireComponentAttachEvent, fireComponentDetachEvent, getComponentCount, getContent, iterator, removeComponentAttachListener, removeComponentDetachListener, removeFromParent, setContent, setHeight, setWidth
-
Methods inherited from class com.vaadin.ui.AbstractComponent
addContextClickListener, addListener, addShortcutListener, addStyleName, attach, beforeClientResponse, detach, findAncestor, fireComponentErrorEvent, fireComponentEvent, 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, setCaptionAsHtml, setComponentError, setData, setDebugId, setDescription, setDescription, setEnabled, setHeight, setHeightFull, setHeightUndefined, setIcon, setId, setLocale, setPrimaryStyleName, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidth, setWidthFull, setWidthUndefined
-
Methods inherited from class com.vaadin.server.AbstractClientConnector
addAttachListener, 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, updateDiffstate
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.vaadin.server.ClientConnector
addAttachListener, addDetachListener, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
-
Methods inherited from interface com.vaadin.ui.Component
addListener, addStyleName, addStyleNames, attach, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isVisible, removeListener, removeStyleName, removeStyleNames, setEnabled, setIcon, setId, setPrimaryStyleName, setStyleName, setStyleName, setVisible
-
Methods inherited from interface com.vaadin.shared.Connector
getConnectorId
-
Methods inherited from interface com.vaadin.data.HasValue
clear, getDefaultValidator, getEmptyValue, getOptionalValue, isEmpty
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface com.vaadin.ui.LegacyComponent
markAsDirty
-
Methods inherited from interface com.vaadin.server.Sizeable
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightFull, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull, setWidthUndefined
-
Methods inherited from interface com.vaadin.server.VariableOwner
isEnabled
-
-
-
-
Constructor Detail
-
ColorPickerPopup
public ColorPickerPopup(Color initialColor)
Instantiates a new color picker popup.- Parameters:
initialColor- the initially selected color
-
-
Method Detail
-
getHistory
public ColorPickerHistory getHistory()
Gets the history.- Returns:
- the history
-
setValue
public void setValue(Color color)
Sets the value of this object. If the new value is not equal togetValue(), fires aHasValue.ValueChangeEvent. ThrowsNullPointerExceptionif the value is null.- Specified by:
setValuein interfaceHasValue<Color>- Parameters:
color- the new value, notnull- Throws:
NullPointerException- ifcolorisnull
-
getValue
public Color getValue()
Description copied from interface:HasValueReturns the current value of this object.Implementation note: the implementing class should document whether null values may be returned or not.
-
addValueChangeListener
public Registration addValueChangeListener(HasValue.ValueChangeListener<Color> listener)
Description copied from interface:HasValueAdds a value change listener. The listener is called when the value of thisHasValueis changed either by the user or programmatically.- Specified by:
addValueChangeListenerin interfaceHasValue<Color>- Parameters:
listener- the value change listener, not null- Returns:
- a registration for the listener
-
getColorHistory
public List<Color> getColorHistory()
Gets the color history.- Returns:
- the color history
-
setRGBTabVisible
public void setRGBTabVisible(boolean visible)
Sets the RGB tab visibility.- Parameters:
visible- The visibility of the RGB tab
-
setHSVTabVisible
public void setHSVTabVisible(boolean visible)
Sets the HSV tab visibility.- Parameters:
visible- The visibility of the HSV tab
-
setSwatchesTabVisible
public void setSwatchesTabVisible(boolean visible)
Sets the visibility of the Swatches tab.- Parameters:
visible- The visibility of the Swatches tab
-
setHistoryVisible
public void setHistoryVisible(boolean visible)
Sets the visibility of the History.- Parameters:
visible-trueto show the history,falseto hide it
-
setPreviewVisible
public void setPreviewVisible(boolean visible)
Sets the preview visibility.- Parameters:
visible-trueto show the preview,falseto hide it
-
setRequiredIndicatorVisible
public void setRequiredIndicatorVisible(boolean visible)
Description copied from class:AbstractComponentSets the visibility of the required indicator. NOTE: Does not apply for all components!.If the component supports the required indicator (state extends
AbstractFieldState), then expose this method andAbstractComponent.isRequiredIndicatorVisible()aspublicin the component and call this method.This method will throw a
IllegalStateExceptionif the component state (returned byAbstractComponent.getState()) does not inheritAbstractFieldState.- Specified by:
setRequiredIndicatorVisiblein interfaceHasValue<Color>- Overrides:
setRequiredIndicatorVisiblein classAbstractComponent- Parameters:
visible-trueto make the required indicator visible,falseif not
-
isRequiredIndicatorVisible
public boolean isRequiredIndicatorVisible()
Description copied from class:AbstractComponentChecks whether the required indicator is visible or not. NOTE: Does not apply for all components!.This method will throw a
IllegalStateExceptionif the component state (returned byAbstractComponent.getState()) does not inheritAbstractFieldState.- Specified by:
isRequiredIndicatorVisiblein interfaceHasValue<Color>- Overrides:
isRequiredIndicatorVisiblein classAbstractComponent- Returns:
trueif visible,falseif not- See Also:
AbstractComponent.setRequiredIndicatorVisible(boolean)
-
setReadOnly
public void setReadOnly(boolean readOnly)
Description copied from class:AbstractComponentSets the read-only status in the state of thisAbstractComponent. This method should be made public inComponentsthat implementHasValue.- Specified by:
setReadOnlyin interfaceHasValue<Color>- Overrides:
setReadOnlyin classAbstractComponent- Parameters:
readOnly- a boolean value specifying whether the component is put read-only mode or not
-
isReadOnly
public boolean isReadOnly()
Description copied from class:AbstractComponentReturns the read-only status from the state of thisAbstractComponent. This method should be made public inComponentsthat implementHasValue.- Specified by:
isReadOnlyin interfaceHasValue<Color>- Overrides:
isReadOnlyin classAbstractComponent- Returns:
trueif state has read-only on;falseif not- See Also:
AbstractComponent.setReadOnly(boolean)
-
setModal
public void setModal(boolean modal)
Description copied from class:WindowSets window modality. When a modal window is open, components outside that window cannot be accessed.Keyboard navigation is restricted by blocking the tab key at the top and bottom of the window by activating the tab stop function internally.
-
-