PRESENTATION
- The presentation type. Must be compatible with what
getPresentationType()
returns.MODEL
- The model type. Must be compatible with what
getModelType()
returns.public abstract class AbstractColorConverter<PRESENTATION,MODEL> extends Object implements com.vaadin.data.util.converter.Converter<PRESENTATION,MODEL>
Converter
s that convert to or from Color
Constructor and Description |
---|
AbstractColorConverter(Class<PRESENTATION> presentationType,
Class<MODEL> modelType) |
Modifier and Type | Method and Description |
---|---|
Class<MODEL> |
getModelType() |
Class<PRESENTATION> |
getPresentationType() |
protected abstract String |
serializeColor(com.vaadin.shared.ui.colorpicker.Color color)
Serializes the given
Color as a String . |
protected abstract com.vaadin.shared.ui.colorpicker.Color |
unserializeColor(String string)
Unserializes the given
String as a Color . |
public AbstractColorConverter(Class<PRESENTATION> presentationType, Class<MODEL> modelType)
public Class<MODEL> getModelType()
getModelType
in interface com.vaadin.data.util.converter.Converter<PRESENTATION,MODEL>
public Class<PRESENTATION> getPresentationType()
getPresentationType
in interface com.vaadin.data.util.converter.Converter<PRESENTATION,MODEL>
protected abstract String serializeColor(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 unserializeColor(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.