com.itextpdf.text.pdf.spatial.objects
Class NumberFormatDictionary

java.lang.Object
  extended by com.itextpdf.text.pdf.PdfObject
      extended by com.itextpdf.text.pdf.PdfDictionary
          extended by com.itextpdf.text.pdf.spatial.objects.NumberFormatDictionary

public class NumberFormatDictionary
extends com.itextpdf.text.pdf.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

Field Summary
 
Fields inherited from class com.itextpdf.text.pdf.PdfDictionary
CATALOG, FONT, hashMap, OUTLINES, PAGE, PAGES
 
Fields inherited from class com.itextpdf.text.pdf.PdfObject
ARRAY, BOOLEAN, bytes, DICTIONARY, INDIRECT, indRef, NAME, NOTHING, NULL, NUMBER, STREAM, STRING, TEXT_PDFDOCENCODING, TEXT_UNICODE, type
 
Constructor Summary
NumberFormatDictionary()
          Creates a new NumberFormat dictionary.
 
Method Summary
 void setCipherGroupingCharacter(com.itextpdf.text.pdf.PdfString rt)
          Text that shall be used between orders of thousands in display of numerical values.
 void setConversionFactor(com.itextpdf.text.pdf.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.
 void setDecimalChartacter(com.itextpdf.text.pdf.PdfString dc)
          Text that shall be used as the decimal position in displaying numerical values.
 void setFixedDenominator(com.itextpdf.text.pdf.PdfBoolean isFixedDenominator)
          If true, a fractional value formatted according to Precision may not have its denominator reduced or low-order zeros truncated.
 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.
 void setLabel(com.itextpdf.text.pdf.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.
 void setLabelLeftString(com.itextpdf.text.pdf.PdfString ps)
          Text that shall be concatenated to the left of the label specified by setLabel.
 void setLabelPosition(com.itextpdf.text.pdf.PdfName pos)
          A name indicating the position of the label specified by setLabel with respect to the calculated unit value.
 void setLabelRightString(com.itextpdf.text.pdf.PdfString ss)
          Text that shall be concatenated after the label specified by setLabel.
 void setPrecision(com.itextpdf.text.pdf.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.
 
Methods inherited from class com.itextpdf.text.pdf.PdfDictionary
checkType, clear, contains, get, getAsArray, getAsBoolean, getAsDict, getAsIndirectObject, getAsName, getAsNumber, getAsStream, getAsString, getDirectObject, getKeys, isCatalog, isFont, isOutlineTree, isPage, isPages, merge, mergeDifferent, put, putAll, putEx, remove, size, toPdf, toString
 
Methods inherited from class com.itextpdf.text.pdf.PdfObject
canBeInObjStm, getBytes, getIndRef, isArray, isBoolean, isDictionary, isIndirect, isName, isNull, isNumber, isStream, isString, length, setContent, setIndRef, type
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NumberFormatDictionary

public NumberFormatDictionary()
Creates a new NumberFormat dictionary.

Method Detail

setLabel

public void setLabel(com.itextpdf.text.pdf.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(com.itextpdf.text.pdf.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(com.itextpdf.text.pdf.PdfNumber precision)
A positive integer that shall specify the precision or denominator of a fractional amount:

Parameters:
precision -

setFixedDenominator

public void setFixedDenominator(com.itextpdf.text.pdf.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(com.itextpdf.text.pdf.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(com.itextpdf.text.pdf.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(com.itextpdf.text.pdf.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(com.itextpdf.text.pdf.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(com.itextpdf.text.pdf.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


Copyright © 2013. All Rights Reserved.