Class DateLocalDateTranslator
java.lang.Object
org.tentackle.fx.translate.AbstractValueTranslator<Date, LocalDate>
org.tentackle.fx.atlanta.translate.DateLocalDateTranslator
- All Implemented Interfaces:
ValueTranslator<Date, LocalDate>
@ValueTranslatorService(modelClass=Date.class,
viewClass=LocalDate.class)
public class DateLocalDateTranslator
extends AbstractValueTranslator<Date, LocalDate>
Date to LocalDate translator.
Provided for the
Provided for the
Calendar control.
Applies to Date and all its subclasses. When translating back to the model,
the returned object is of the same class as the component's model type:
Date, Date, Timestamp,
Timestamp or, for all other types, Date.
Timestamps are set to the start of the picked day in the default time zone.
- Author:
- harald
-
Constructor Summary
ConstructorsConstructorDescriptionDateLocalDateTranslator(FxComponent component) Creates a date to local date translator. -
Method Summary
Modifier and TypeMethodDescriptionFunction to translate a view value to a model value.Function to translate a model value to a view value.Methods inherited from class AbstractValueTranslator
getComponent, isLenient, isMappingIncomplete, isModelModified, saveModelValue, setLenientMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ValueTranslator
bindingPropertiesUpdated, needsToModelTwice, toModel, toView
-
Constructor Details
-
DateLocalDateTranslator
Creates a date to local date translator.- Parameters:
component- the component
-
-
Method Details
-
toViewFunction
Description copied from interface:ValueTranslatorFunction to translate a model value to a view value.- Returns:
- the function
-
toModelFunction
Description copied from interface:ValueTranslatorFunction to translate a view value to a model value.- Returns:
- the function
-