com.vaadin.ui.components.colorpicker
Class ColorPickerPreview

java.lang.Object
  extended by com.vaadin.server.AbstractClientConnector
      extended by com.vaadin.ui.AbstractComponent
          extended by com.vaadin.ui.AbstractComponentContainer
              extended by com.vaadin.ui.AbstractLayout
                  extended by com.vaadin.ui.CssLayout
                      extended by com.vaadin.ui.components.colorpicker.ColorPickerPreview
All Implemented Interfaces:
Property.ValueChangeListener, LayoutEvents.LayoutClickNotifier, MethodEventSource, ClientConnector, Sizeable, com.vaadin.shared.Connector, Component, ComponentContainer, ColorSelector, HasColorChangeListener, HasComponents, HasComponents.ComponentAttachDetachNotifier, Layout, java.io.Serializable, java.lang.Iterable<Component>

public class ColorPickerPreview
extends CssLayout
implements ColorSelector, Property.ValueChangeListener

A component that represents color selection preview within a color picker.

Since:
7.0.0
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.vaadin.ui.Layout
Layout.AlignmentHandler, Layout.MarginHandler, Layout.SpacingHandler
 
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.ui.Component
Component.ErrorEvent, Component.Event, Component.Focusable, Component.Listener
 
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.server.Sizeable
Sizeable.Unit
 
Field Summary
 
Fields inherited from class com.vaadin.ui.CssLayout
components
 
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
ColorPickerPreview(com.vaadin.shared.ui.colorpicker.Color color)
          Instantiates a new color picker preview.
 
Method Summary
 void addColorChangeListener(ColorChangeListener listener)
          Adds a ColorChangeListener to the component.
 com.vaadin.shared.ui.colorpicker.Color getColor()
          Gets the color.
protected  java.lang.String getCss(Component c)
          Called when the component is refreshing
 void removeColorChangeListener(ColorChangeListener listener)
          Removes a ColorChangeListener from the component.
 void setColor(com.vaadin.shared.ui.colorpicker.Color color)
          Sets the color.
 void valueChange(Property.ValueChangeEvent event)
          Notifies this listener that the Property's value has changed.
 
Methods inherited from class com.vaadin.ui.CssLayout
addComponent, addComponent, addComponentAsFirst, addLayoutClickListener, addListener, beforeClientResponse, getComponent, getComponentCount, getComponentIndex, getState, iterator, readDesign, removeComponent, removeLayoutClickListener, removeListener, replaceComponent, writeDesign
 
Methods inherited from class com.vaadin.ui.AbstractLayout
readMargin, writeMargin
 
Methods inherited from class com.vaadin.ui.AbstractComponentContainer
addComponentAttachListener, addComponentDetachListener, addComponents, addListener, addListener, fireComponentAttachEvent, fireComponentDetachEvent, getComponentIterator, moveComponentsFrom, removeAllComponents, removeComponentAttachListener, removeComponentDetachListener, removeListener, removeListener, setHeight, setWidth
 
Methods inherited from class com.vaadin.ui.AbstractComponent
addListener, addShortcutListener, addStyleName, attach, detach, findAncestor, fireComponentErrorEvent, fireComponentEvent, focus, getActionManager, getCaption, getComponentError, getCustomAttributes, getData, getDebugId, getDescription, getErrorMessage, getExplicitImmediateValue, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getState, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isConnectorEnabled, isEnabled, isImmediate, isOrHasAncestor, isReadOnly, isResponsive, isVisible, removeListener, removeShortcutListener, removeStyleName, setCaption, setCaptionAsHtml, setComponentError, setData, setDebugId, setDescription, setEnabled, setHeight, setHeightUndefined, setIcon, setId, setImmediate, setLocale, setParent, setPrimaryStyleName, setReadOnly, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setStyleName, setVisible, setWidth, setWidthUndefined
 
Methods inherited from class com.vaadin.server.AbstractClientConnector
addAttachListener, 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
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.vaadin.ui.ComponentContainer
addComponents, addListener, addListener, getComponentIterator, moveComponentsFrom, removeAllComponents, removeListener, removeListener
 
Methods inherited from interface com.vaadin.ui.Component
addListener, addStyleName, attach, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isReadOnly, isVisible, removeListener, removeStyleName, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setReadOnly, setStyleName, setVisible
 
Methods inherited from interface com.vaadin.server.ClientConnector
addAttachListener, addDetachListener, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
 
Methods inherited from interface com.vaadin.shared.Connector
getConnectorId
 
Methods inherited from interface com.vaadin.server.Sizeable
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthUndefined
 
Methods inherited from interface com.vaadin.ui.HasComponents.ComponentAttachDetachNotifier
addComponentAttachListener, addComponentDetachListener, removeComponentAttachListener, removeComponentDetachListener
 

Constructor Detail

ColorPickerPreview

public ColorPickerPreview(com.vaadin.shared.ui.colorpicker.Color color)
Instantiates a new color picker preview.

Method Detail

setColor

public void setColor(com.vaadin.shared.ui.colorpicker.Color color)
Description copied from interface: ColorSelector
Sets the color.

Specified by:
setColor in interface ColorSelector
Parameters:
color - the new color

getColor

public com.vaadin.shared.ui.colorpicker.Color getColor()
Description copied from interface: ColorSelector
Gets the color.

Specified by:
getColor in interface ColorSelector
Returns:
the color

addColorChangeListener

public void addColorChangeListener(ColorChangeListener listener)
Description copied from interface: HasColorChangeListener
Adds a ColorChangeListener to the component.

Specified by:
addColorChangeListener in interface HasColorChangeListener

removeColorChangeListener

public void removeColorChangeListener(ColorChangeListener listener)
Description copied from interface: HasColorChangeListener
Removes a ColorChangeListener from the component.

Specified by:
removeColorChangeListener in interface HasColorChangeListener

valueChange

public void valueChange(Property.ValueChangeEvent event)
Description copied from interface: Property.ValueChangeListener
Notifies this listener that the Property's value has changed.

Specified by:
valueChange in interface Property.ValueChangeListener
Parameters:
event - value change event object

getCss

protected java.lang.String getCss(Component c)
Called when the component is refreshing

Overrides:
getCss in class CssLayout
Parameters:
c - the component
Returns:
css rules to be applied to component


Copyright © 2000-2014 Vaadin Ltd. All Rights Reserved.