com.vaadin.flow.data.renderer.

Class LocalDateTimeRenderer<SOURCE>

  • Type Parameters:

    SOURCE - the type of the input item, from which the LocalDateTime is extracted

    All Implemented Interfaces:

    Serializable


    public class LocalDateTimeRenderer<SOURCE>
    extends BasicRenderer<SOURCE,LocalDateTime>

    A template renderer for presenting LocalDateTime objects.

    Since:

    1.0.

    Author:

    Vaadin Ltd

    See Also:

    Serialized Form

    • Constructor Detail

      • LocalDateTimeRenderer

        public LocalDateTimeRenderer(ValueProvider<SOURCE,LocalDateTime> valueProvider)

        Creates a new LocalDateTimeRenderer.

        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.

        Parameters:

        valueProvider - the callback to provide a LocalDateTime to the renderer, not null

        See Also:

        FormatStyle.LONG, FormatStyle.SHORT

      • LocalDateTimeRenderer

        public LocalDateTimeRenderer(ValueProvider<SOURCE,LocalDateTime> valueProvider,
                                     DateTimeFormatter formatter)

        Creates a new LocalDateTimeRenderer.

        The renderer is configured to render with the given formatter, with the empty string as its null representation.

        Parameters:

        valueProvider - the callback to provide a LocalDateTime to the renderer, not null

        formatter - the formatter to use, not null

      • LocalDateTimeRenderer

        public LocalDateTimeRenderer(ValueProvider<SOURCE,LocalDateTime> valueProvider,
                                     DateTimeFormatter formatter,
                                     String nullRepresentation)

        Creates a new LocalDateTimeRenderer.

        The renderer is configured to render with the given formatter.

        Parameters:

        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 value

      • LocalDateTimeRenderer

        public LocalDateTimeRenderer(ValueProvider<SOURCE,LocalDateTime> valueProvider,
                                     String formatPattern)

        Creates a new LocalDateTimeRenderer.

        The renderer is configured to render with the given string format, with an empty string as its null representation.

        Parameters:

        valueProvider - the callback to provide a LocalDateTime to the renderer, not null

        formatPattern - the format pattern to format the date with, not null

        See Also:

        Format Pattern Syntax

      • LocalDateTimeRenderer

        public LocalDateTimeRenderer(ValueProvider<SOURCE,LocalDateTime> valueProvider,
                                     String formatPattern,
                                     Locale locale)

        Creates a new LocalDateTimeRenderer.

        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.

        Parameters:

        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

        See Also:

        Format Pattern Syntax

      • LocalDateTimeRenderer

        public LocalDateTimeRenderer(ValueProvider<SOURCE,LocalDateTime> valueProvider,
                                     String formatPattern,
                                     Locale locale,
                                     String nullRepresentation)

        Creates a new LocalDateTimeRenderer.

        The renderer is configured to render with the given string format, as displayed in the given locale.

        Parameters:

        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 value

        See Also:

        Format Pattern Syntax