You're viewing an older version of Vaadin JavaDoc. Please see version 24.7.0 for the latest.
com.vaadin.flow.data.renderer.

Class LocalDateRenderer<SOURCE>

  • Type Parameters:

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

    All Implemented Interfaces:

    Serializable

    public class LocalDateRenderer<SOURCE>
    extends BasicRenderer<SOURCE,​LocalDate>

    A template renderer for presenting date values.

    Author:

    Vaadin Ltd

    See Also:

    Serialized Form

    • Constructor Detail

      • LocalDateRenderer

        public LocalDateRenderer​(ValueProvider<SOURCE,​LocalDate> valueProvider)

        Creates a new LocalDateRenderer.

        The renderer is configured with the format style FormatStyle.LONG and an empty string as its null representation.

        Parameters:

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

        See Also:

        FormatStyle.LONG

      • LocalDateRenderer

        public LocalDateRenderer​(ValueProvider<SOURCE,​LocalDate> valueProvider,
                                 String formatPattern)

        Creates a new LocalDateRenderer.

        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 LocalDate to the renderer, not null

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

        See Also:

        Format Pattern Syntax

      • LocalDateRenderer

        public LocalDateRenderer​(ValueProvider<SOURCE,​LocalDate> valueProvider,
                                 String formatPattern,
                                 Locale locale)

        Creates a new LocalDateRenderer.

        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 LocalDate 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

      • LocalDateRenderer

        public LocalDateRenderer​(ValueProvider<SOURCE,​LocalDate> valueProvider,
                                 String formatPattern,
                                 Locale locale,
                                 String nullRepresentation)

        Creates a new LocalDateRenderer.

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

        Parameters:

        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 value

        See Also:

        Format Pattern Syntax

      • LocalDateRenderer

        public LocalDateRenderer​(ValueProvider<SOURCE,​LocalDate> valueProvider,
                                 DateTimeFormatter formatter)

        Creates a new LocalDateRenderer.

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

        Parameters:

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

        formatter - the formatter to use, not null

      • LocalDateRenderer

        public LocalDateRenderer​(ValueProvider<SOURCE,​LocalDate> valueProvider,
                                 DateTimeFormatter formatter,
                                 String nullRepresentation)

        Creates a new LocalDateRenderer.

        The renderer is configured to render with the given formatter.

        Parameters:

        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 value