public class LspsDecimalConverter extends Object implements com.vaadin.data.util.converter.Converter<String,Decimal>
Modifier and Type | Field and Description |
---|---|
protected String |
formatPattern
Format pattern used to perform conversion.
|
protected Type |
type
Type of lsps object - instance of IntegerType or DecimalType
|
Constructor and Description |
---|
LspsDecimalConverter(String formatPattern,
Type type) |
LspsDecimalConverter(UIComponent uiComponent,
Type type) |
Modifier and Type | Method and Description |
---|---|
Decimal |
convertToModel(String value,
Class<? extends Decimal> clazz,
Locale locale) |
String |
convertToPresentation(Decimal value,
Class<? extends String> clazz,
Locale locale) |
protected NumberFormat |
getFormat(Locale locale)
Returns instance of format to use for conversion.
|
Class<Decimal> |
getModelType() |
Class<String> |
getPresentationType() |
protected final String formatPattern
protected final Type type
public LspsDecimalConverter(UIComponent uiComponent, Type type)
uiComponent
- type
- Type of lsps object - instance of IntegerType or DecimalTypepublic Decimal convertToModel(String value, Class<? extends Decimal> clazz, Locale locale) throws com.vaadin.data.util.converter.Converter.ConversionException
public String convertToPresentation(Decimal value, Class<? extends String> clazz, Locale locale)
protected NumberFormat getFormat(Locale locale)
UIFieldNames.FORMAT
.locale
- the locale, may be null.Copyright © 2007-2018 Whitestein Technologies. All Rights Reserved.