public abstract class AbstractStringToColorConverter extends AbstractToColorConverter<String>
Constructor and Description |
---|
AbstractStringToColorConverter()
Constructs a new
AbstractStringToColorConverter |
Modifier and Type | Method and Description |
---|---|
com.vaadin.shared.ui.colorpicker.Color |
convertToModel(String value,
Class<? extends com.vaadin.shared.ui.colorpicker.Color> targetType,
Locale locale) |
String |
convertToPresentation(com.vaadin.shared.ui.colorpicker.Color value,
Class<? extends String> targetType,
Locale locale) |
protected abstract String |
serialize(com.vaadin.shared.ui.colorpicker.Color color)
Serializes the given
Color as a String . |
protected abstract com.vaadin.shared.ui.colorpicker.Color |
unserialize(String string)
Unserializes the given
String as a Color . |
getModelType, getPresentationType
public AbstractStringToColorConverter()
AbstractStringToColorConverter
public com.vaadin.shared.ui.colorpicker.Color convertToModel(String value, Class<? extends com.vaadin.shared.ui.colorpicker.Color> targetType, Locale locale) throws com.vaadin.data.util.converter.Converter.ConversionException
com.vaadin.data.util.converter.Converter.ConversionException
public String convertToPresentation(com.vaadin.shared.ui.colorpicker.Color value, Class<? extends String> targetType, Locale locale) throws com.vaadin.data.util.converter.Converter.ConversionException
com.vaadin.data.util.converter.Converter.ConversionException
protected abstract String serialize(com.vaadin.shared.ui.colorpicker.Color color) throws com.vaadin.data.util.converter.Converter.ConversionException
Color
as a String
. The String must
be unserialize by unserialize(java.lang.String)
color
- The Color
to serialize. Never null
.Color
serialized as String
ConversionException
- If the Color
can't be serializedcom.vaadin.data.util.converter.Converter.ConversionException
Copyright © 2015 Max Schuster. All Rights Reserved.