Class DecimalNumericDisplayConverter
java.lang.Object
org.eclipse.nebula.widgets.nattable.data.convert.DisplayConverter
org.eclipse.nebula.widgets.nattable.data.convert.NumericDisplayConverter
org.eclipse.nebula.widgets.nattable.data.convert.DecimalNumericDisplayConverter
- All Implemented Interfaces:
IDisplayConverter
- Direct Known Subclasses:
DefaultBigDecimalDisplayConverter,DefaultDoubleDisplayConverter,DefaultFloatDisplayConverter
Abstract base class for decimal converters.
-
Field Summary
Fields inherited from class org.eclipse.nebula.widgets.nattable.data.convert.NumericDisplayConverter
nf -
Constructor Summary
ConstructorsConstructorDescriptionCreates a converter that usesNumberFormat.DecimalNumericDisplayConverter(boolean useNumberFormat) Creates a converter and allows to specify whetherNumberFormatshould be used or not. -
Method Summary
Modifier and TypeMethodDescriptionvoidsetMaximumFractionDigits(int newValue) Sets the maximum number of digits allowed in the fraction portion of a number.voidsetMinimumFractionDigits(int newValue) Sets the minimum number of digits allowed in the fraction portion of a number.Methods inherited from class org.eclipse.nebula.widgets.nattable.data.convert.NumericDisplayConverter
canonicalToDisplayValue, convertToNumericValue, displayToCanonicalValue, getNumberFormat, setNumberFormatMethods inherited from class org.eclipse.nebula.widgets.nattable.data.convert.DisplayConverter
canonicalToDisplayValue, displayToCanonicalValue
-
Constructor Details
-
DecimalNumericDisplayConverter
public DecimalNumericDisplayConverter()Creates a converter that usesNumberFormat. -
DecimalNumericDisplayConverter
public DecimalNumericDisplayConverter(boolean useNumberFormat) Creates a converter and allows to specify whetherNumberFormatshould be used or not.- Parameters:
useNumberFormat-trueif aNumberFormatshould be used,falseif not.- Since:
- 1.4
-
-
Method Details
-
setMinimumFractionDigits
public void setMinimumFractionDigits(int newValue) Sets the minimum number of digits allowed in the fraction portion of a number.- Parameters:
newValue- newValue the minimum number of fraction digits to be shown; if less than zero, then zero is used.- See Also:
-
setMaximumFractionDigits
public void setMaximumFractionDigits(int newValue) Sets the maximum number of digits allowed in the fraction portion of a number.- Parameters:
newValue- newValue the maximum number of fraction digits to be shown; if less than zero, then zero is used.- See Also:
-