com.vaadin.ui.renderers.

Class LocalDateTimeRenderer

    • Constructor Detail

      • LocalDateTimeRenderer

        public LocalDateTimeRenderer()

        Creates a new LocalDateTimeRenderer.

        The renderer is configured to render with the grid's locale it is attached to, with the format style being FormatStyle.LONG for the date and FormatStyle.SHORT for time, with an empty string as its null representation.

        See Also:

        FormatStyle.LONG, FormatStyle.SHORT

      • LocalDateTimeRenderer

        @Deprecated
        public LocalDateTimeRenderer​(DateTimeFormatter formatter)
        Deprecated.
        the method is unsafe for serialization, may produce troubles in a cluster environment

        Creates a new LocalDateTimeRenderer.

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

        Note the DateTimeFormatter is not a serializable class, so using this method in an environment which requires session persistence may produce NotSerializableException.

        Parameters:

        formatter - the formatter to use, not null

        Throws:

        IllegalArgumentException - if formatter is null

        See Also:

        LocalDateTimeRenderer(SerializableSupplier)

      • LocalDateTimeRenderer

        @Deprecated
        public LocalDateTimeRenderer​(DateTimeFormatter formatter,
                                     String nullRepresentation)
        Deprecated.
        the method is unsafe for serialization, may produce troubles in acluster environment

        Creates a new LocalDateTimeRenderer.

        The renderer is configured to render with the given formatter.

        Note the DateTimeFormatter is not a serializable class, so using this method in an environment which requires session persistence may produce NotSerializableException.

        Parameters:

        formatter - the formatter to use, not null

        nullRepresentation - the textual representation of the null value

        Throws:

        IllegalArgumentException - if formatter is null

        See Also:

        LocalDateTimeRenderer(SerializableSupplier, String)

      • LocalDateTimeRenderer

        public LocalDateTimeRenderer​(String formatPattern)

        Creates a new LocalDateTimeRenderer.

        The renderer is configured to render with the given string format, as displayed in the grid's locale it is attached to, with an empty string as its null representation.

        Parameters:

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

        Throws:

        IllegalArgumentException - if format pattern is null

        See Also:

        Format Pattern Syntax

      • LocalDateTimeRenderer

        public LocalDateTimeRenderer​(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:

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

        locale - the locale to use, not null

        Throws:

        IllegalArgumentException - if format pattern is null

        IllegalArgumentException - if locale is null

        See Also:

        Format Pattern Syntax

      • LocalDateTimeRenderer

        public LocalDateTimeRenderer​(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:

        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

        Throws:

        IllegalArgumentException - if format pattern is null

        IllegalArgumentException - if locale is null

        See Also:

        Format Pattern Syntax

      • LocalDateTimeRenderer

        public LocalDateTimeRenderer​(SerializableSupplier<DateTimeFormatter> formatterSupplier)

        Creates a new LocalDateTimeRenderer.

        The renderer is configured to render with the given formatterSupplier.

        Parameters:

        formatterSupplier - the formatterSupplier supplier to use, not null, it should not supply null either

        Throws:

        IllegalArgumentException - if formatterSupplier is null

      • LocalDateTimeRenderer

        public LocalDateTimeRenderer​(SerializableSupplier<DateTimeFormatter> formatterSupplier,
                                     String nullRepresentation)

        Creates a new LocalDateTimeRenderer.

        The renderer is configured to render with the given formatterSupplier.

        Parameters:

        formatterSupplier - the formatterSupplier supplier to use, not null, it should not supply null either

        nullRepresentation - the textual representation of the null value

        Throws:

        IllegalArgumentException - if formatterSupplier is null