public abstract class AbstractNumberFormat extends AbstractNode implements IsNumberFormat
NumberFormatOptions
Modifier | Constructor and Description |
---|---|
protected |
AbstractNumberFormat(IsDefaultNumberFormatOptions defaultValues)
Creates an empty font to use for chart configuration.
|
protected |
AbstractNumberFormat(IsDefaultNumberFormatOptions defaultValues,
NativeObject nativeObject)
Creates a number format to use for chart configuration, wrapping a native object instance.
|
Modifier and Type | Method and Description |
---|---|
CompactDisplay |
getCompactDisplay()
Returns the compact display when
Notation.COMPACT is set. |
Currency |
getCurrency()
Returns the currency to use in currency formatting.
|
CurrencyDisplay |
getCurrencyDisplay()
Returns how to display the currency in currency formatting.
|
CurrencySign |
getCurrencySign()
In many locales, accounting format means to wrap the number with parentheses instead of appending a minus sign.
You can enable this formatting by setting the currency sign option to "accounting" otherwise "standard". |
LocaleMatcher |
getLocaleMatcher()
Returns the locale matching algorithm to use.
|
int |
getMaximumFractionDigits()
Returns the maximum number of fraction digits to use.
The default for plain number formatting is the larger of NumberFormatOptions.getMinimumFractionDigits() and 3.The default for currency formatting is the larger of NumberFormatOptions.getMinimumFractionDigits() and the number of minor unit digits provided by currency, see
Currency.getMinimumFractionDigits() .The default for percent formatting is the larger of NumberFormatOptions.getMinimumFractionDigits() and 0. |
int |
getMaximumSignificantDigits()
Returns the maximum number of significant digits to use.
|
int |
getMinimumFractionDigits()
Returns the minimum number of fraction digits to use.
The default for plain number and percent formatting is 0. The default for currency formatting is the number of minor unit digits provided by the currency, see Currency.getMinimumFractionDigits() . |
int |
getMinimumIntegerDigits()
Returns the minimum number of integer digits to use.
|
int |
getMinimumSignificantDigits()
Returns the minimum number of significant digits to use.
|
Notation |
getNotation()
Returns the formatting that should be displayed for the number.
|
NumberingSystem |
getNumberingSystem()
Returns the numbering system to use.
|
SignDisplay |
getSignDisplay()
Returns when to display the sign for the number.
|
Style |
getStyle()
Returns the formatting style to use.
|
MeasureUnitDisplay |
getUnitOfMeasureDisplay()
Returns the unit formatting style to use in unit formatting.
|
List<MeasureUnit> |
getUnitsOfMeasure()
Returns an unmodifiable list of units to use in unit formatting.
|
boolean |
isUseGrouping()
Returns
true whether to use grouping separators, such as thousands separators or thousand/lakh/crore separators. |
void |
setCompactDisplay(CompactDisplay display)
Set the compact display when
Notation.COMPACT is set. |
void |
setCurrency(Currency currency)
Sets the currency to use in currency formatting.
|
void |
setCurrencyDisplay(CurrencyDisplay currencyDisplay)
Sets how to display the currency in currency formatting.
|
void |
setCurrencySign(CurrencySign currencySign)
In many locales, accounting format means to wrap the number with parentheses instead of appending a minus sign.
You can enable this formatting by setting the currency sign option to "accounting" otherwise "standard". |
void |
setLocaleMatcher(LocaleMatcher localeMatcher)
Sets the locale matching algorithm to use.
|
void |
setMaximumFractionDigits(int maximumFractionDigits)
Sets the maximum number of fraction digits to use.
Possible values are from 0 to 20. |
void |
setMaximumSignificantDigits(int minimumIntegerDigits)
Sets the maximum number of significant digits to use.
Possible values are from 1 to 21. |
void |
setMinimumFractionDigits(int minimumFractionDigits)
Sets the minimum number of fraction digits to use.
Possible values are from 0 to 20. |
void |
setMinimumIntegerDigits(int minimumIntegerDigits)
Sets the minimum number of integer digits to use.
Possible values are from 1 to 21. |
void |
setMinimumSignificantDigits(int minimumIntegerDigits)
Sets the minimum number of significant digits to use.
Possible values are from 1 to 21. |
void |
setNotation(Notation notation)
Sets the formatting that should be displayed for the number.
|
void |
setNumberingSystem(NumberingSystem numberingSystem)
Sets the numbering system to use.
|
void |
setSignDisplay(SignDisplay signDisplay)
Sets when to display the sign for the number.
|
void |
setStyle(Style style)
Sets the formatting style to use.
|
void |
setUnitOfMeasureDisplay(MeasureUnitDisplay unitDisplay)
Sets the unit formatting style to use in unit formatting.
|
void |
setUnitsOfMeasure(List<MeasureUnit> units)
Sets the unit to use in unit formatting.
If more that 1 unit has been passed, a compound unit has been created. |
void |
setUnitsOfMeasure(MeasureUnit... units)
Sets the unit to use in unit formatting.
If more that 1 unit has been passed, a compound unit has been created. |
void |
setUseGrouping(boolean useGrouping)
Sets
true whether to use grouping separators, such as thousands separators or thousand/lakh/crore separators. |
checkAndAddToParent, getChildKey, getParentNode, getRootNode, retrieveRoot, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setElementAndAddToParent, setInternalCallbackToModel, setInternalCallbackToModel, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent
checkDefaultValuesArgument, empty, getArrayValue, getElement, getIncrementalId, getNativeChart, getNativeEvent, getNativeObject, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, has, has, isType, keys, loadNativeObject, remove, remove, setArrayValue, setArrayValue, setArrayValue, setElement, setEmptyValue, setNewIncrementalId, setNewIncrementalId, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
create, create
protected AbstractNumberFormat(IsDefaultNumberFormatOptions defaultValues)
defaultValues
- default providerprotected AbstractNumberFormat(IsDefaultNumberFormatOptions defaultValues, NativeObject nativeObject)
defaultValues
- default providernativeObject
- native object to map java script propertiespublic void setLocaleMatcher(LocaleMatcher localeMatcher)
setLocaleMatcher
in interface IsNumberFormat
localeMatcher
- the locale matching algorithm to usepublic LocaleMatcher getLocaleMatcher()
getLocaleMatcher
in interface IsDefaultBaseFormatOptions
public void setNumberingSystem(NumberingSystem numberingSystem)
setNumberingSystem
in interface IsNumberFormat
numberingSystem
- the numbering system to usepublic NumberingSystem getNumberingSystem()
getNumberingSystem
in interface IsDefaultBaseFormatOptions
public void setCompactDisplay(CompactDisplay display)
Notation.COMPACT
is set.setCompactDisplay
in interface IsNumberFormat
display
- the compact display when Notation.COMPACT
is setpublic CompactDisplay getCompactDisplay()
Notation.COMPACT
is set.getCompactDisplay
in interface IsDefaultNumberFormatOptions
Notation.COMPACT
is setpublic void setCurrency(Currency currency)
setCurrency
in interface IsNumberFormat
currency
- the currency to use in currency formattingpublic Currency getCurrency()
getCurrency
in interface IsDefaultNumberFormatOptions
public void setCurrencyDisplay(CurrencyDisplay currencyDisplay)
setCurrencyDisplay
in interface IsNumberFormat
currencyDisplay
- how to display the currency in currency formattingpublic CurrencyDisplay getCurrencyDisplay()
getCurrencyDisplay
in interface IsDefaultNumberFormatOptions
public void setCurrencySign(CurrencySign currencySign)
setCurrencySign
in interface IsNumberFormat
currencySign
- the currency format to use on formattingpublic CurrencySign getCurrencySign()
getCurrencySign
in interface IsDefaultNumberFormatOptions
public void setNotation(Notation notation)
setNotation
in interface IsNumberFormat
notation
- the formatting that should be displayed for the numberpublic Notation getNotation()
getNotation
in interface IsDefaultNumberFormatOptions
public void setSignDisplay(SignDisplay signDisplay)
setSignDisplay
in interface IsNumberFormat
signDisplay
- when to display the sign for the numberpublic SignDisplay getSignDisplay()
getSignDisplay
in interface IsDefaultNumberFormatOptions
public void setStyle(Style style)
setStyle
in interface IsNumberFormat
style
- the formatting style to usepublic Style getStyle()
getStyle
in interface IsDefaultNumberFormatOptions
public void setUnitsOfMeasure(MeasureUnit... units)
setUnitsOfMeasure
in interface IsNumberFormat
units
- the units to use in units formattingpublic void setUnitsOfMeasure(List<MeasureUnit> units)
setUnitsOfMeasure
in interface IsNumberFormat
units
- the units to use in units formattingpublic List<MeasureUnit> getUnitsOfMeasure()
getUnitsOfMeasure
in interface IsDefaultNumberFormatOptions
public void setUnitOfMeasureDisplay(MeasureUnitDisplay unitDisplay)
setUnitOfMeasureDisplay
in interface IsNumberFormat
unitDisplay
- the unit formatting style to use in unit formattingpublic MeasureUnitDisplay getUnitOfMeasureDisplay()
getUnitOfMeasureDisplay
in interface IsDefaultNumberFormatOptions
public void setUseGrouping(boolean useGrouping)
true
whether to use grouping separators, such as thousands separators or thousand/lakh/crore separators.setUseGrouping
in interface IsNumberFormat
useGrouping
- true
whether to use grouping separators, such as thousands separators or thousand/lakh/crore separatorspublic boolean isUseGrouping()
true
whether to use grouping separators, such as thousands separators or thousand/lakh/crore separators.isUseGrouping
in interface IsDefaultNumberFormatOptions
true
whether to use grouping separators, such as thousands separators or thousand/lakh/crore separatorspublic void setMinimumIntegerDigits(int minimumIntegerDigits)
setMinimumIntegerDigits
in interface IsNumberFormat
minimumIntegerDigits
- the minimum number of integer digits to usepublic int getMinimumIntegerDigits()
getMinimumIntegerDigits
in interface IsDefaultNumberFormatOptions
public void setMinimumFractionDigits(int minimumFractionDigits)
setMinimumFractionDigits
in interface IsNumberFormat
minimumFractionDigits
- the minimum number of fraction digits to usepublic int getMinimumFractionDigits()
Currency.getMinimumFractionDigits()
.getMinimumFractionDigits
in interface IsDefaultNumberFormatOptions
Currency.getMinimumFractionDigits()
public void setMaximumFractionDigits(int maximumFractionDigits)
setMaximumFractionDigits
in interface IsNumberFormat
maximumFractionDigits
- the maximum number of fraction digits to usepublic int getMaximumFractionDigits()
NumberFormatOptions.getMinimumFractionDigits()
and 3.NumberFormatOptions.getMinimumFractionDigits()
and the number of minor unit digits provided by currency, see
Currency.getMinimumFractionDigits()
.NumberFormatOptions.getMinimumFractionDigits()
and 0.getMaximumFractionDigits
in interface IsDefaultNumberFormatOptions
NumberFormatOptions.getMinimumFractionDigits()
and 3.NumberFormatOptions.getMinimumFractionDigits()
and the number of minor unit digits provided by currency,
see Currency.getMinimumFractionDigits()
.NumberFormatOptions.getMinimumFractionDigits()
and 0.public void setMinimumSignificantDigits(int minimumIntegerDigits)
setMinimumSignificantDigits
in interface IsNumberFormat
minimumIntegerDigits
- the minimum number of significant digits to usepublic int getMinimumSignificantDigits()
getMinimumSignificantDigits
in interface IsDefaultNumberFormatOptions
public void setMaximumSignificantDigits(int minimumIntegerDigits)
setMaximumSignificantDigits
in interface IsNumberFormat
minimumIntegerDigits
- the maximum number of significant digits to usepublic int getMaximumSignificantDigits()
getMaximumSignificantDigits
in interface IsDefaultNumberFormatOptions