public class HexToColorConverter extends AbstractStringToColorConverter
Converter
that can convert a Color
to CSS hex color
notation and backConstructor and Description |
---|
HexToColorConverter() |
Modifier and Type | Method and Description |
---|---|
protected String |
serialize(com.vaadin.shared.ui.colorpicker.Color color)
Serializes the given
Color as a String . |
protected com.vaadin.shared.ui.colorpicker.Color |
unserialize(String string)
Unserializes the given
String as a Color . |
convertToModel, convertToPresentation
getModelType, getPresentationType
protected String serialize(com.vaadin.shared.ui.colorpicker.Color color) throws com.vaadin.data.util.converter.Converter.ConversionException
AbstractStringToColorConverter
Color
as a String
. The String must
be unserialize by AbstractStringToColorConverter.unserialize(java.lang.String)
serialize
in class AbstractStringToColorConverter
color
- The Color
to serialize. Never null
.Color
serialized as String
com.vaadin.data.util.converter.Converter.ConversionException
protected com.vaadin.shared.ui.colorpicker.Color unserialize(String string) throws com.vaadin.data.util.converter.Converter.ConversionException
AbstractStringToColorConverter
String
as a Color
.unserialize
in class AbstractStringToColorConverter
string
- The String
to unserialize. Never null
.String
unserialized as Color
com.vaadin.data.util.converter.Converter.ConversionException
Copyright © 2015 Max Schuster. All Rights Reserved.