Class AbstractNumberFormat

    • Constructor Detail

      • AbstractNumberFormat

        protected AbstractNumberFormat​(IsDefaultNumberFormatOptions defaultValues)
        Creates an empty font to use for chart configuration.
        Parameters:
        defaultValues - default provider
      • AbstractNumberFormat

        protected AbstractNumberFormat​(IsDefaultNumberFormatOptions defaultValues,
                                       NativeObject nativeObject)
        Creates a number format to use for chart configuration, wrapping a native object instance.
        Parameters:
        defaultValues - default provider
        nativeObject - native object to map java script properties
    • Method Detail

      • setLocaleMatcher

        public void setLocaleMatcher​(LocaleMatcher localeMatcher)
        Sets the locale matching algorithm to use.
        Specified by:
        setLocaleMatcher in interface IsNumberFormat
        Parameters:
        localeMatcher - the locale matching algorithm to use
      • setNumberingSystem

        public void setNumberingSystem​(NumberingSystem numberingSystem)
        Sets the numbering system to use.
        Specified by:
        setNumberingSystem in interface IsNumberFormat
        Parameters:
        numberingSystem - the numbering system to use
      • setCurrency

        public void setCurrency​(Currency currency)
        Sets the currency to use in currency formatting.
        Specified by:
        setCurrency in interface IsNumberFormat
        Parameters:
        currency - the currency to use in currency formatting
      • setCurrencyDisplay

        public void setCurrencyDisplay​(CurrencyDisplay currencyDisplay)
        Sets how to display the currency in currency formatting.
        Specified by:
        setCurrencyDisplay in interface IsNumberFormat
        Parameters:
        currencyDisplay - how to display the currency in currency formatting
      • setCurrencySign

        public void setCurrencySign​(CurrencySign currencySign)
        In many locales, accounting format means to wrap the number with parentheses instead of appending a minus sign.
        You can enable this formatting by setting the currency sign option to "accounting" otherwise "standard".
        Specified by:
        setCurrencySign in interface IsNumberFormat
        Parameters:
        currencySign - the currency format to use on formatting
      • getCurrencySign

        public CurrencySign getCurrencySign()
        In many locales, accounting format means to wrap the number with parentheses instead of appending a minus sign.
        You can enable this formatting by setting the currency sign option to "accounting" otherwise "standard".
        Specified by:
        getCurrencySign in interface IsDefaultNumberFormatOptions
        Returns:
        the currency format to use on formatting
      • setNotation

        public void setNotation​(Notation notation)
        Sets the formatting that should be displayed for the number.
        Specified by:
        setNotation in interface IsNumberFormat
        Parameters:
        notation - the formatting that should be displayed for the number
      • getNotation

        public Notation getNotation()
        Returns the formatting that should be displayed for the number.
        Specified by:
        getNotation in interface IsDefaultNumberFormatOptions
        Returns:
        the formatting that should be displayed for the number
      • setSignDisplay

        public void setSignDisplay​(SignDisplay signDisplay)
        Sets when to display the sign for the number.
        Specified by:
        setSignDisplay in interface IsNumberFormat
        Parameters:
        signDisplay - when to display the sign for the number
      • setStyle

        public void setStyle​(Style style)
        Sets the formatting style to use.
        Specified by:
        setStyle in interface IsNumberFormat
        Parameters:
        style - the formatting style to use
      • setUnitsOfMeasure

        public void setUnitsOfMeasure​(MeasureUnit... units)
        Sets the unit to use in unit formatting.
        If more that 1 unit has been passed, a compound unit has been created.
        Specified by:
        setUnitsOfMeasure in interface IsNumberFormat
        Parameters:
        units - the units to use in units formatting
      • setUnitsOfMeasure

        public void setUnitsOfMeasure​(List<MeasureUnit> units)
        Sets the unit to use in unit formatting.
        If more that 1 unit has been passed, a compound unit has been created.
        Specified by:
        setUnitsOfMeasure in interface IsNumberFormat
        Parameters:
        units - the units to use in units formatting
      • setUnitOfMeasureDisplay

        public void setUnitOfMeasureDisplay​(MeasureUnitDisplay unitDisplay)
        Sets the unit formatting style to use in unit formatting.
        Specified by:
        setUnitOfMeasureDisplay in interface IsNumberFormat
        Parameters:
        unitDisplay - the unit formatting style to use in unit formatting
      • setUseGrouping

        public void setUseGrouping​(boolean useGrouping)
        Sets true whether to use grouping separators, such as thousands separators or thousand/lakh/crore separators.
        Specified by:
        setUseGrouping in interface IsNumberFormat
        Parameters:
        useGrouping - true whether to use grouping separators, such as thousands separators or thousand/lakh/crore separators
      • isUseGrouping

        public boolean isUseGrouping()
        Returns true whether to use grouping separators, such as thousands separators or thousand/lakh/crore separators.
        Specified by:
        isUseGrouping in interface IsDefaultNumberFormatOptions
        Returns:
        true whether to use grouping separators, such as thousands separators or thousand/lakh/crore separators
      • setMinimumIntegerDigits

        public void setMinimumIntegerDigits​(int minimumIntegerDigits)
        Sets the minimum number of integer digits to use.
        Possible values are from 1 to 21.
        Specified by:
        setMinimumIntegerDigits in interface IsNumberFormat
        Parameters:
        minimumIntegerDigits - the minimum number of integer digits to use
      • setMinimumFractionDigits

        public void setMinimumFractionDigits​(int minimumFractionDigits)
        Sets the minimum number of fraction digits to use.
        Possible values are from 0 to 20.
        Specified by:
        setMinimumFractionDigits in interface IsNumberFormat
        Parameters:
        minimumFractionDigits - the minimum number of fraction digits to use
      • getMinimumFractionDigits

        public int getMinimumFractionDigits()
        Returns the minimum number of fraction digits to use.
        The default for plain number and percent formatting is 0.
        The default for currency formatting is the number of minor unit digits provided by the currency, see Currency.getMinimumFractionDigits().
        Specified by:
        getMinimumFractionDigits in interface IsDefaultNumberFormatOptions
        Returns:
        the minimum number of fraction digits to use.
        The default for plain number and percent formatting is 0.
        The default for currency formatting is the number of minor unit digits provided by the currency, see Currency.getMinimumFractionDigits()
      • setMaximumFractionDigits

        public void setMaximumFractionDigits​(int maximumFractionDigits)
        Sets the maximum number of fraction digits to use.
        Possible values are from 0 to 20.
        Specified by:
        setMaximumFractionDigits in interface IsNumberFormat
        Parameters:
        maximumFractionDigits - the maximum number of fraction digits to use
      • setMinimumSignificantDigits

        public void setMinimumSignificantDigits​(int minimumIntegerDigits)
        Sets the minimum number of significant digits to use.
        Possible values are from 1 to 21.
        Specified by:
        setMinimumSignificantDigits in interface IsNumberFormat
        Parameters:
        minimumIntegerDigits - the minimum number of significant digits to use
      • setMaximumSignificantDigits

        public void setMaximumSignificantDigits​(int minimumIntegerDigits)
        Sets the maximum number of significant digits to use.
        Possible values are from 1 to 21.
        Specified by:
        setMaximumSignificantDigits in interface IsNumberFormat
        Parameters:
        minimumIntegerDigits - the maximum number of significant digits to use