Method from org.apache.pdfbox.pdmodel.interactive.measurement.PDNumberFormatDictionary Detail: |
public COSBase getCOSObject() {
return this.numberFormatDictionary;
}
|
public float getConversionFactor() {
return this.getDictionary().getFloat("C");
}
This will return the conversion factor. |
public String getDecimalSeparator() {
return this.getDictionary().getString("RD", ".");
}
This will return the text to be used as the decimal point in displaying numerical values. |
public int getDenominator() {
return this.getDictionary().getInt("D");
}
This will return the precision or denominator of a fractional amount. |
public COSDictionary getDictionary() {
return this.numberFormatDictionary;
}
This will return the dictionary. |
public String getFractionalDisplay() {
return this.getDictionary().getString("F", FRACTIONAL_DISPLAY_DECIMAL);
}
This will return the value for the manner to display a fractional value. |
public String getLabelPositionToValue() {
return this.getDictionary().getString("O", LABEL_SUFFIX_TO_VALUE);
}
This will return a value indicating the ordering of the label specified by U to the calculated unit value. |
public String getLabelPrefixString() {
return this.getDictionary().getString("PS", " ");
}
This will return the text to be concatenated to the left of the label specified by U. |
public String getLabelSuffixString() {
return this.getDictionary().getString("SS", " ");
}
This will return the text to be concatenated after the label specified by U. |
public String getThousandsSeparator() {
return this.getDictionary().getString("RT", ",");
}
This will return the text to be used between orders of thousands in display of numerical values. |
public String getType() {
return TYPE;
}
This will return the type of the number format dictionary.
It must be "NumberFormat" |
public String getUnits() {
return this.getDictionary().getString("U");
}
This will return the label for the units. |
public boolean isFD() {
return this.getDictionary().getBoolean("FD", false);
}
This will return the value indication if the denominator of the fractional value is reduced/truncated . |
public void setConversionFactor(float conversionFactor) {
this.getDictionary().setFloat("C", conversionFactor);
}
This will set the conversion factor. |
public void setDecimalSeparator(String decimalSeparator) {
this.getDictionary().setString("RD", decimalSeparator);
}
This will set the text to be used as the decimal point in displaying numerical values. |
public void setDenominator(int denominator) {
this.getDictionary().setInt("D", denominator);
}
This will set the precision or denominator of a fractional amount. |
public void setFD(boolean fd) {
this.getDictionary().setBoolean("FD", fd);
}
This will set the value indication if the denominator of the fractional value is reduced/truncated .
The denominator may not be reduced/truncated if true |
public void setFractionalDisplay(String fractionalDisplay) {
if ((fractionalDisplay == null)
|| FRACTIONAL_DISPLAY_DECIMAL.equals(fractionalDisplay)
|| FRACTIONAL_DISPLAY_FRACTION.equals(fractionalDisplay)
|| FRACTIONAL_DISPLAY_ROUND.equals(fractionalDisplay)
|| FRACTIONAL_DISPLAY_TRUNCATE.equals(fractionalDisplay))
{
this.getDictionary().setString("F", fractionalDisplay);
}
else
{
throw new IllegalArgumentException("Value must be \"D\", \"F\", \"R\", or \"T\", (or null).");
}
}
This will set the value for the manner to display a fractional value.
Allowed values are "D", "F", "R" and "T" |
public void setLabelPositionToValue(String labelPositionToValue) {
if ((labelPositionToValue == null)
|| LABEL_PREFIX_TO_VALUE.equals(labelPositionToValue)
|| LABEL_SUFFIX_TO_VALUE.equals(labelPositionToValue))
{
this.getDictionary().setString("O", labelPositionToValue);
}
else
{
throw new IllegalArgumentException("Value must be \"S\", or \"P\" (or null).");
}
}
This will set the value indicating the ordering of the label specified by U to the calculated unit value.
Possible values are "S" and "P" |
public void setLabelPrefixString(String labelPrefixString) {
this.getDictionary().setString("PS", labelPrefixString);
}
This will set the text to be concatenated to the left of the label specified by U. |
public void setLabelSuffixString(String labelSuffixString) {
this.getDictionary().setString("SS", labelSuffixString);
}
This will set the text to be concatenated after the label specified by U. |
public void setThousandsSeparator(String thousandsSeparator) {
this.getDictionary().setString("RT", thousandsSeparator);
}
This will set the text to be used between orders of thousands in display of numerical values. |
public void setUnits(String units) {
this.getDictionary().setString("U", units);
}
This will set the label for the units. |