Class DecimalNumber
java.lang.Object
com.independentsoft.office.odf.styles.Number
com.independentsoft.office.odf.styles.DecimalNumber
Represents the decimal number.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Creates a new object that is a deep copy of the current instance.intGets the number of decimal places to display.Gets the replacement text for decimal places if a number style specifies that decimal places are used but the number displayed is an integer.doubleGets the factor by which each number is scaled (divided) before displaying.Contains a collection of NumberEmbeddedText objects.intGets the minimum number of integer digits to display in a number, a scientific number, or a fraction.booleanSpecifies whether the integer digits of a number should be grouped using a separator character.voidsetDecimalPlaces(int decimalPlaces)Sets the number of decimal places to display.voidsetDecimalReplacement(String decimalReplacement)Sets the replacement text for decimal places if a number style specifies that decimal places are used but the number displayed is an integer.voidsetDisplayFactor(double displayFactor)Sets the factor by which each number is scaled (divided) before displaying.voidsetGrouping(boolean grouping)Specifies whether the integer digits of a number should be grouped using a separator character.voidsetMinIntegerDigits(int minIntegerDigits)Sets the minimum number of integer digits to display in a number, a scientific number, or a fraction.toString()Converts the value of the current DecimalNumber object to its equivalent string representation.
-
Constructor Details
-
DecimalNumber
public DecimalNumber()Initializes a new instance of the DecimalNumber class.
-
-
Method Details
-
clone
Creates a new object that is a deep copy of the current instance. -
toString
Converts the value of the current DecimalNumber object to its equivalent string representation. -
getDecimalReplacement
Gets the replacement text for decimal places if a number style specifies that decimal places are used but the number displayed is an integer.- Returns:
- the decimal replacement
-
setDecimalReplacement
Sets the replacement text for decimal places if a number style specifies that decimal places are used but the number displayed is an integer.- Parameters:
decimalReplacement- the new decimal replacement
-
getDecimalPlaces
public int getDecimalPlaces()Gets the number of decimal places to display.- Returns:
- the decimal places
-
setDecimalPlaces
public void setDecimalPlaces(int decimalPlaces)Sets the number of decimal places to display.- Parameters:
decimalPlaces- the new decimal places
-
getMinIntegerDigits
public int getMinIntegerDigits()Gets the minimum number of integer digits to display in a number, a scientific number, or a fraction.- Returns:
- the min integer digits
-
setMinIntegerDigits
public void setMinIntegerDigits(int minIntegerDigits)Sets the minimum number of integer digits to display in a number, a scientific number, or a fraction.- Parameters:
minIntegerDigits- the new min integer digits
-
getDisplayFactor
public double getDisplayFactor()Gets the factor by which each number is scaled (divided) before displaying.- Returns:
- the display factor
-
setDisplayFactor
public void setDisplayFactor(double displayFactor)Sets the factor by which each number is scaled (divided) before displaying.- Parameters:
displayFactor- the new display factor
-
isGrouping
public boolean isGrouping()Specifies whether the integer digits of a number should be grouped using a separator character.- Returns:
- true, if is grouping
-
setGrouping
public void setGrouping(boolean grouping)Specifies whether the integer digits of a number should be grouped using a separator character.- Parameters:
grouping- the new grouping
-
getEmbeddedTexts
Contains a collection of NumberEmbeddedText objects.- Returns:
- the embedded texts
-