SOURCE
- the type of the input item, from which the LocalDate
is
extractedpublic class LocalDateRenderer<SOURCE> extends BasicRenderer<SOURCE,LocalDate>
Constructor and Description |
---|
LocalDateRenderer(ValueProvider<SOURCE,LocalDate> valueProvider)
Creates a new LocalDateRenderer.
|
LocalDateRenderer(ValueProvider<SOURCE,LocalDate> valueProvider,
DateTimeFormatter formatter)
Creates a new LocalDateRenderer.
|
LocalDateRenderer(ValueProvider<SOURCE,LocalDate> valueProvider,
DateTimeFormatter formatter,
String nullRepresentation)
Creates a new LocalDateRenderer.
|
LocalDateRenderer(ValueProvider<SOURCE,LocalDate> valueProvider,
String formatPattern)
Creates a new LocalDateRenderer.
|
LocalDateRenderer(ValueProvider<SOURCE,LocalDate> valueProvider,
String formatPattern,
Locale locale)
Creates a new LocalDateRenderer.
|
LocalDateRenderer(ValueProvider<SOURCE,LocalDate> valueProvider,
String formatPattern,
Locale locale,
String nullRepresentation)
Creates a new LocalDateRenderer.
|
Modifier and Type | Method and Description |
---|---|
protected String |
getFormattedValue(LocalDate date)
Gets the String representation of the target object, to be used inside
the template.
|
createComponent, getTemplateForProperty, getTemplatePropertyName, getValueProvider, render
setComponentRendererTag, updateComponent
getEventHandlers, getValueProviders, render, setEventHandler, setProperty
public LocalDateRenderer(ValueProvider<SOURCE,LocalDate> valueProvider)
The renderer is configured with the format style FormatStyle.LONG
and an empty string as its null representation.
valueProvider
- the callback to provide a LocalDate
to the renderer,
not null
public LocalDateRenderer(ValueProvider<SOURCE,LocalDate> valueProvider, String formatPattern)
The renderer is configured to render with the given string format, with an empty string as its null representation.
valueProvider
- the callback to provide a LocalDate
to the renderer,
not null
formatPattern
- the format pattern to format the date with, not
null
public LocalDateRenderer(ValueProvider<SOURCE,LocalDate> valueProvider, String formatPattern, Locale locale)
The renderer is configured to render with the given string format, as displayed in the given locale, with an empty string as its null representation.
valueProvider
- the callback to provide a LocalDate
to the renderer,
not null
formatPattern
- the format pattern to format the date with, not
null
locale
- the locale to use, not null
public LocalDateRenderer(ValueProvider<SOURCE,LocalDate> valueProvider, String formatPattern, Locale locale, String nullRepresentation)
The renderer is configured to render with the given string format, as displayed in the given locale.
valueProvider
- the callback to provide a LocalDate
to the renderer,
not null
formatPattern
- the format pattern to format the date with, not
null
locale
- the locale to use, not null
nullRepresentation
- the textual representation of the null
valuepublic LocalDateRenderer(ValueProvider<SOURCE,LocalDate> valueProvider, DateTimeFormatter formatter)
The renderer is configured to render with the given formatter, with an empty string as its null representation.
valueProvider
- the callback to provide a LocalDate
to the renderer,
not null
formatter
- the formatter to use, not null
public LocalDateRenderer(ValueProvider<SOURCE,LocalDate> valueProvider, DateTimeFormatter formatter, String nullRepresentation)
The renderer is configured to render with the given formatter.
valueProvider
- the callback to provide a LocalDate
to the renderer,
not null
formatter
- the formatter to use, not null
nullRepresentation
- the textual representation of the null
valueprotected String getFormattedValue(LocalDate date)
BasicRenderer
By default it uses String.valueOf(Object)
of the object.
getFormattedValue
in class BasicRenderer<SOURCE,LocalDate>
date
- the target objectCopyright © 2020. All rights reserved.