Class OdfNumberPercentageStyle

All Implemented Interfaces:
Serializable, Cloneable, Element, ElementTraversal, EventTarget, Node, NodeList, TypeInfo

public class OdfNumberPercentageStyle extends NumberPercentageStyleElement
Convenient functionality for the parent ODF OpenDocument element
See Also:
  • Constructor Details

    • OdfNumberPercentageStyle

      public OdfNumberPercentageStyle(OdfFileDom ownerDoc)
    • OdfNumberPercentageStyle

      public OdfNumberPercentageStyle(OdfFileDom ownerDoc, String format, String styleName)
      Creates a new instance of OdfNumberPercentageStyle.
      Parameters:
      ownerDoc - document that this format belongs to
      format - format string for the date/time
      styleName - name of this style
  • Method Details

    • getFormat

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

      public void setFormat(String format)
      Creates a <number:number-style> element based upon format.
      Specified by:
      setFormat in class DataStyleElement
      Parameters:
      format - the number format string
    • setMapPositive

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

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