SOURCE
- the type of the input item, from which the LocalDateTime
is extractedpublic class LocalDateTimeRenderer<SOURCE> extends BasicRenderer<SOURCE,LocalDateTime>
LocalDateTime
objects.Constructor and Description |
---|
LocalDateTimeRenderer(ValueProvider<SOURCE,LocalDateTime> valueProvider)
Creates a new LocalDateTimeRenderer.
|
LocalDateTimeRenderer(ValueProvider<SOURCE,LocalDateTime> valueProvider,
DateTimeFormatter formatter)
Creates a new LocalDateTimeRenderer.
|
LocalDateTimeRenderer(ValueProvider<SOURCE,LocalDateTime> valueProvider,
DateTimeFormatter formatter,
String nullRepresentation)
Creates a new LocalDateTimeRenderer.
|
LocalDateTimeRenderer(ValueProvider<SOURCE,LocalDateTime> valueProvider,
String formatPattern)
Creates a new LocalDateTimeRenderer.
|
LocalDateTimeRenderer(ValueProvider<SOURCE,LocalDateTime> valueProvider,
String formatPattern,
Locale locale)
Creates a new LocalDateTimeRenderer.
|
LocalDateTimeRenderer(ValueProvider<SOURCE,LocalDateTime> valueProvider,
String formatPattern,
Locale locale,
String nullRepresentation)
Creates a new LocalDateTimeRenderer.
|
Modifier and Type | Method and Description |
---|---|
protected String |
getFormattedValue(LocalDateTime dateTime)
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 LocalDateTimeRenderer(ValueProvider<SOURCE,LocalDateTime> valueProvider)
The renderer is configured to render with the format style
FormatStyle.LONG
for the date and FormatStyle.SHORT
for
time, with an empty string as its null representation.
valueProvider
- the callback to provide a LocalDateTime
to the
renderer, not null
public LocalDateTimeRenderer(ValueProvider<SOURCE,LocalDateTime> valueProvider, DateTimeFormatter formatter)
The renderer is configured to render with the given formatter, with the empty string as its null representation.
valueProvider
- the callback to provide a LocalDateTime
to the
renderer, not null
formatter
- the formatter to use, not null
public LocalDateTimeRenderer(ValueProvider<SOURCE,LocalDateTime> valueProvider, DateTimeFormatter formatter, String nullRepresentation)
The renderer is configured to render with the given formatter.
valueProvider
- the callback to provide a LocalDateTime
to the
renderer, not null
formatter
- the formatter to use, not null
nullRepresentation
- the textual representation of the null
valuepublic LocalDateTimeRenderer(ValueProvider<SOURCE,LocalDateTime> 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 LocalDateTime
to the
renderer, not null
formatPattern
- the format pattern to format the date with, not
null
public LocalDateTimeRenderer(ValueProvider<SOURCE,LocalDateTime> 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 LocalDateTime
to the
renderer, not null
formatPattern
- the format pattern to format the date with, not
null
locale
- the locale to use, not null
public LocalDateTimeRenderer(ValueProvider<SOURCE,LocalDateTime> 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 LocalDateTime
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
valueprotected String getFormattedValue(LocalDateTime dateTime)
BasicRenderer
By default it uses String.valueOf(Object)
of the object.
getFormattedValue
in class BasicRenderer<SOURCE,LocalDateTime>
dateTime
- the target objectCopyright © 2019. All rights reserved.