| Package | Description |
|---|---|
| com.vaadin.data.util.converter | |
| com.vaadin.ui | |
| com.vaadin.ui.declarative | |
| com.vaadin.ui.declarative.converters |
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractStringToNumberConverter<T>
A converter that converts from the number type T to
String and back. |
class |
DateToLongConverter
|
class |
DateToSqlDateConverter
|
class |
ReverseConverter<PRESENTATION,MODEL>
A converter that wraps another
Converter and reverses source and
target types. |
class |
StringToBigDecimalConverter
A converter that converts from
String to BigDecimal and back. |
class |
StringToBigIntegerConverter
A converter that converts from
String to BigInteger and back. |
class |
StringToBooleanConverter
|
class |
StringToByteConverter
|
class |
StringToCollectionConverter
A converter that converts from
String to Collection of tokens
and back. |
class |
StringToDateConverter
|
class |
StringToDoubleConverter
|
class |
StringToEnumConverter
|
class |
StringToFloatConverter
|
class |
StringToIntegerConverter
|
class |
StringToLongConverter
|
class |
StringToShortConverter
|
| Modifier and Type | Method and Description |
|---|---|
<PRESENTATION,MODEL> |
DefaultConverterFactory.createConverter(Class<PRESENTATION> presentationType,
Class<MODEL> modelType) |
<PRESENTATION,MODEL> |
ConverterFactory.createConverter(Class<PRESENTATION> presentationType,
Class<MODEL> modelType) |
protected Converter<Date,?> |
DefaultConverterFactory.createDateConverter(Class<?> sourceType) |
protected Converter<String,?> |
DefaultConverterFactory.createStringConverter(Class<?> sourceType) |
protected <PRESENTATION,MODEL> |
DefaultConverterFactory.findConverter(Class<PRESENTATION> presentationType,
Class<MODEL> modelType) |
static <PRESENTATIONTYPE,MODELTYPE> |
ConverterUtil.getConverter(Class<PRESENTATIONTYPE> presentationType,
Class<MODELTYPE> modelType,
VaadinSession session)
Finds a converter that can convert from the given presentation type to
the given model type and back.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
ConverterUtil.canConverterHandle(Converter<?,?> converter,
Class<?> presentationType,
Class<?> modelType)
Checks if the given converter can handle conversion between the given
presentation and model type.
|
static boolean |
ConverterUtil.canConverterPossiblyHandle(Converter<?,?> converter,
Class<?> presentationType,
Class<?> modelType)
Checks if it possible that the given converter can handle conversion
between the given presentation and model type somehow.
|
static <PRESENTATIONTYPE,MODELTYPE> |
ConverterUtil.convertFromModel(MODELTYPE modelValue,
Class<? extends PRESENTATIONTYPE> presentationType,
Converter<PRESENTATIONTYPE,MODELTYPE> converter,
Locale locale)
Convert the given value from the data source type to the UI type.
|
static <MODELTYPE,PRESENTATIONTYPE> |
ConverterUtil.convertToModel(PRESENTATIONTYPE presentationValue,
Class<MODELTYPE> modelType,
Converter<PRESENTATIONTYPE,MODELTYPE> converter,
Locale locale)
Convert the given value from the presentation (UI) type to model (data
source) type.
|
| Constructor and Description |
|---|
ReverseConverter(Converter<MODEL,PRESENTATION> converter)
Creates a converter from source to target based on a converter that
converts from target to source.
|
StringToCollectionConverter(Converter<String,?> tokenConverter,
Class<?> tokenType)
Creates converter with given
tokenConverter for convert tokens
and expected tokenType. |
StringToCollectionConverter(String delimiter,
Converter<String,?> tokenConverter,
Class<?> tokenClass)
Creates converter with given
tokenConverter for convert tokens
and expected tokenType. |
StringToCollectionConverter(String delimiter,
Converter<String,?> tokenConverter,
Class<?> tokenClass,
StringToCollectionConverter.CollectionFactory factory)
Creates converter with given
tokenConverter for convert tokens
and expected tokenType. |
| Modifier and Type | Method and Description |
|---|---|
Converter<?,?> |
Grid.Column.getConverter()
Returns the converter instance used by this column.
|
Converter<String,Object> |
Label.getConverter()
Gets the converter used to convert the property data source value to the
label value.
|
Converter<T,Object> |
AbstractField.getConverter()
Gets the converter used to convert the property data source value to the
field value.
|
Converter<String,Object> |
Table.getConverter(Object propertyId)
Returns the converter used to format the given propertyId.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> elemental.json.JsonValue |
Grid.AbstractRenderer.encodeValue(Object modelValue,
Renderer<T> renderer,
Converter<?,?> converter,
Locale locale)
Converts and encodes the given data model property value using the
given converter and renderer.
|
Grid.Column |
Grid.Column.setConverter(Converter<?,?> converter)
Sets the converter used to convert from the property value type to
the renderer presentation type.
|
void |
Label.setConverter(Converter<String,?> converter)
Sets the converter used to convert the label value to the property data
source type.
|
void |
AbstractField.setConverter(Converter<T,?> converter)
Sets the converter used to convert the field value to property data
source type.
|
void |
Table.setConverter(Object propertyId,
Converter<String,?> converter)
Sets a converter for a property id.
|
<T> Grid.Column |
Grid.Column.setRenderer(Renderer<T> renderer,
Converter<? extends T,?> converter)
Sets the renderer for this column and the converter used to convert
from the property value type to the renderer presentation type.
|
| Modifier and Type | Method and Description |
|---|---|
protected <T> Converter<String,T> |
DesignFormatter.findConverterFor(Class<? extends T> sourceType)
Finds a converter for a given type.
|
protected <T> Converter<String,T> |
DesignFormatter.findConverterFor(Class<? extends T> sourceType,
boolean strict)
Finds a converter for a given type.
|
| Modifier and Type | Method and Description |
|---|---|
protected <T> void |
DesignFormatter.addConverter(Class<?> type,
Converter<String,?> converter)
Adds a converter for a given type.
|
protected <T> void |
DesignFormatter.addConverter(Converter<String,T> converter)
Adds a converter for a new type.
|
| Modifier and Type | Class and Description |
|---|---|
class |
DesignDateConverter
A date converter to be used by
DesignAttributeHandler. |
class |
DesignEnumConverter
An converter for Enum to/from String for
DesignAttributeHandler to
use internally. |
class |
DesignObjectConverter
An converter for Object to/from String for
DesignAttributeHandler to
use internally. |
class |
DesignResourceConverter
A converter for
Resource implementations supported by
DesignAttributeHandler. |
class |
DesignShortcutActionConverter
Converter for
ShortcutActions. |
class |
DesignTimeZoneConverter
Utility class for
DesignAttributeHandler that deals with converting
various TimeZones to string. |
class |
DesignToStringConverter<TYPE>
Utility class for
DesignAttributeHandler that deals with converting
various types to string. |
Copyright © 2016 Vaadin Ltd. All rights reserved.