Class PriceLabelHandler

    • Constructor Detail

      • PriceLabelHandler

        public PriceLabelHandler()
    • Method Detail

      • getLabel

        public java.lang.String getLabel​(java.lang.Double price,
                                         CurrencyModel currencyModel)
        Specified by:
        getLabel in interface LabelHandler<java.lang.Double,​CurrencyModel>
        Parameters:
        price - object to be labelled with the {@param modifier}.
        currencyModel - object used to define how the label should be calculated.
        Returns:
        a string that represents the passed-in object using the given modifier.
      • getNumberFormatForNonJavaCurrency

        protected java.text.NumberFormat getNumberFormatForNonJavaCurrency​(CurrencyModel currencyModel)
      • getNumberFormatter

        protected java.text.NumberFormat getNumberFormatter​(java.util.Currency javaCurrency,
                                                            CurrencyModel currencyModel)
      • adjustDecimalFormatter

        protected void adjustDecimalFormatter​(java.util.Currency javaCurrency,
                                              CurrencyModel currencyModel,
                                              java.util.Locale currentLocale,
                                              java.text.DecimalFormat decimalFormatter)
      • getDecimalFormatSymbols

        protected java.text.DecimalFormatSymbols getDecimalFormatSymbols​(java.util.Currency currency,
                                                                         java.lang.String currencySymbol,
                                                                         java.util.Locale currentLocale)
      • adjustFractionPart

        protected void adjustFractionPart​(java.lang.Integer digits,
                                          java.text.DecimalFormat decimalFormat)
      • setI18NService

        public void setI18NService​(I18NService i18NService)