Class NumberFormatDictionary

  • All Implemented Interfaces:
    java.io.Serializable

    public class NumberFormatDictionary
    extends PdfDictionary
    A dictionary that represents a specific unit of measurement (such as miles or feet). It contains information about how each unit shall be expressed in text and factors for calculating the number of units.
    Since:
    5.1.0
    See Also:
    Serialized Form
    • Constructor Detail

      • NumberFormatDictionary

        public NumberFormatDictionary()
        Creates a new NumberFormat dictionary.
    • Method Detail

      • setLabel

        public void setLabel​(PdfString label)
        A text string specifying a label for displaying the units represented by this NumberFormat in a user interface; the label should use a universally recognized abbreviation.
        Parameters:
        label -
      • setConversionFactor

        public void setConversionFactor​(PdfNumber n)
        The conversion factor used to multiply a value in partial units of the previous number format array element to obtain a value in the units of this dictionary. When this entry is in the first number format in the array, its meaning (that is, what it shall be multiplied by) depends on which entry in the RectilinearMeasure references the NumberFormat array.
        Parameters:
        n -
      • setFractionalValue

        public void setFractionalValue​(Fraction f)
        Indicate whether and in what manner to display a fractional value from the result of converting to the units of this NumberFormat means of the conversion factor entry.
        Parameters:
        f -
      • setPrecision

        public void setPrecision​(PdfNumber precision)
        A positive integer that shall specify the precision or denominator of a fractional amount:
        • When the Fractional Value is Fraction.DECIMAL, this entry shall be the precision of a decimal display; it shall be a multiple of 10. Low-order zeros may be truncated unless FixedDenominator is true. Default value: 100 (hundredths, corresponding to two decimal digits).
        • When the value of F is Fraction.FRACTION, this entry shall be the denominator of a fractional display. The fraction may be reduced unless the value of FD is true. Default value: 16.
        Parameters:
        precision -
      • setFixedDenominator

        public void setFixedDenominator​(PdfBoolean isFixedDenominator)
        If true, a fractional value formatted according to Precision may not have its denominator reduced or low-order zeros truncated.
        Parameters:
        isFixedDenominator -
      • setCipherGroupingCharacter

        public void setCipherGroupingCharacter​(PdfString rt)
        Text that shall be used between orders of thousands in display of numerical values. An empty string indicates that no text shall be added.
        Default value: COMMA ","
        Parameters:
        rt -
      • setDecimalChartacter

        public void setDecimalChartacter​(PdfString dc)
        Text that shall be used as the decimal position in displaying numerical values. An empty string indicates that the default shall be used.
        Default value: PERIOD "."
        Parameters:
        dc -
      • setLabelLeftString

        public void setLabelLeftString​(PdfString ps)
        Text that shall be concatenated to the left of the label specified by setLabel. An empty string indicates that no text shall be added.
        Default value: A single ASCII SPACE character " "
        Parameters:
        ps -
      • setLabelRightString

        public void setLabelRightString​(PdfString ss)
        Text that shall be concatenated after the label specified by setLabel. An empty string indicates that no text shall be added.
        Default value: A single ASCII SPACE character " "
        Parameters:
        ss -
      • setLabelPosition

        public void setLabelPosition​(PdfName pos)
        A name indicating the position of the label specified by setLabel with respect to the calculated unit value. The characters specified by setLabelLeftString and setLabelRightString shall be concatenated before considering this entry. Default value: suffix.
        Parameters:
        pos - PdfName.S or PdfName.P