info.magnolia.ui.form.field.converter
Class StringToCalendarConverter
java.lang.Object
info.magnolia.ui.form.field.converter.StringToCalendarConverter
- All Implemented Interfaces:
- com.vaadin.data.util.converter.Converter<String,Calendar>, Serializable
public class StringToCalendarConverter
- extends Object
- implements com.vaadin.data.util.converter.Converter<String,Calendar>
A converter that converts from Calendar
to String
and back. Uses
the given locale and DateFormat
for formatting and parsing.
Delegates to StringToDateConverter
.
- See Also:
- Serialized Form
Nested classes/interfaces inherited from interface com.vaadin.data.util.converter.Converter |
com.vaadin.data.util.converter.Converter.ConversionException |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StringToCalendarConverter
public StringToCalendarConverter()
convertToModel
public Calendar convertToModel(String value,
Class<? extends Calendar> targetType,
Locale locale)
throws com.vaadin.data.util.converter.Converter.ConversionException
- Specified by:
convertToModel
in interface com.vaadin.data.util.converter.Converter<String,Calendar>
- Throws:
com.vaadin.data.util.converter.Converter.ConversionException
convertToPresentation
public String convertToPresentation(Calendar value,
Class<? extends String> targetType,
Locale locale)
throws com.vaadin.data.util.converter.Converter.ConversionException
- Specified by:
convertToPresentation
in interface com.vaadin.data.util.converter.Converter<String,Calendar>
- Throws:
com.vaadin.data.util.converter.Converter.ConversionException
getModelType
public Class<Calendar> getModelType()
- Specified by:
getModelType
in interface com.vaadin.data.util.converter.Converter<String,Calendar>
getPresentationType
public Class<String> getPresentationType()
- Specified by:
getPresentationType
in interface com.vaadin.data.util.converter.Converter<String,Calendar>
Copyright © 2014 Magnolia International Ltd.. All Rights Reserved.