com.vaadin.ui.renderers.

Class NumberRenderer

    • Constructor Detail

      • NumberRenderer

        public NumberRenderer()

        Creates a new number renderer.

        The renderer is configured to render with the number's natural string representation in the default locale.

      • NumberRenderer

        public NumberRenderer(NumberFormat numberFormat)

        Creates a new number renderer.

        The renderer is configured to render the number as defined with the given number format.

        Parameters:

        numberFormat - the number format with which to display numbers

        Throws:

        IllegalArgumentException - if numberFormat is null

      • NumberRenderer

        public NumberRenderer(NumberFormat numberFormat,
                              String nullRepresentation)
                       throws IllegalArgumentException

        Creates a new number renderer.

        The renderer is configured to render the number as defined with the given number format.

        Parameters:

        numberFormat - the number format with which to display numbers

        nullRepresentation - the textual representation of null value

        Throws:

        IllegalArgumentException - if numberFormat is null

      • NumberRenderer

        public NumberRenderer(Locale locale)
                       throws IllegalArgumentException

        Creates a new number renderer.

        The renderer is configured to render with the number's natural string representation in the given locale.

        Parameters:

        locale - the locale in which to display numbers

        Throws:

        IllegalArgumentException - if locale is null

      • NumberRenderer

        public NumberRenderer(String formatString,
                              Locale locale)
                       throws IllegalArgumentException

        Creates a new number renderer.

        The renderer is configured to render with the number's natural string representation in the given locale.

        Parameters:

        formatString - the format string with which to format the number

        locale - the locale in which to display numbers

        Throws:

        IllegalArgumentException - if locale is null

      • NumberRenderer

        public NumberRenderer(String formatString)
                       throws IllegalArgumentException

        Creates a new number renderer.

        The renderer is configured to render with the given format string in the default locale.

        Parameters:

        formatString - the format string with which to format the number

        Throws:

        IllegalArgumentException - if formatString is null

        See Also:

        Format String Syntax

      • NumberRenderer

        public NumberRenderer(String formatString,
                              Locale locale,
                              String nullRepresentation)

        Creates a new number renderer.

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

        Parameters:

        formatString - the format string with which to format the number

        locale - the locale in which to present numbers

        Throws:

        IllegalArgumentException - if either argument is null

        See Also:

        Format String Syntax