Class OdfNumberCurrencyStyle

    • Constructor Detail

      • OdfNumberCurrencyStyle

        public OdfNumberCurrencyStyle​(OdfFileDom ownerDoc)
      • OdfNumberCurrencyStyle

        public OdfNumberCurrencyStyle​(OdfFileDom ownerDoc,
                                      String format,
                                      String styleName)
        Parameters:
        ownerDoc - parent file
        format - format string
        styleName - new style name
    • Method Detail

      • getFormat

        public String getFormat​(boolean caps)
        Get the format string that represents this style.
        Specified by:
        getFormat in class DataStyleElement
        Parameters:
        caps - use capitals
        Returns:
        the format string
      • getCurrencyCode

        public String getCurrencyCode()
      • getConditionStyleName

        public String getConditionStyleName​(double value)
      • setFormat

        public void setFormat​(String format)
        Description copied from class: DataStyleElement
        Get the format string that represents this style.
        Specified by:
        setFormat in class DataStyleElement
        Parameters:
        format - the format string
      • buildFromFormat

        public void buildFromFormat​(String currencySymbol,
                                    String format)
        Creates a <number:date-style> element based upon format.
        Parameters:
        currencySymbol - the string to be placed as the currency symbol
        format - the currency format string
      • getCurrencySymbolElement

        public NumberCurrencySymbolElement getCurrencySymbolElement()
        Get OdfCurrencySymbol element from this currency style. Once you have it, you can add language and country.
        Returns:
        an OdfCurrencySymbol element
      • setCurrencyLocale

        public void setCurrencyLocale​(String language,
                                      String country)
        Set language and currency for the currency symbol.
        Parameters:
        language - the language for the country
        country - the country name
      • setCurrencyLocale

        public void setCurrencyLocale​(String locale)
        Set language and currency for the currency symbol. Argument could be just a language like "el" or a language and country like "en-US".
        Parameters:
        locale - string in form language-country or language
      • setMapPositive

        public void setMapPositive​(String mapName)
        Set <style:map> for positive values to the given style .
        Parameters:
        mapName - the style to map to
      • setMapNegative

        public void setMapNegative​(String mapName)
        Set <style:map> for negative values to the given style .
        Parameters:
        mapName - the style to map to