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
public abstract class DecimalNumericDisplayConverter extends NumericDisplayConverter
Abstract base class for decimal converters.
-
-
Field Summary
-
Fields inherited from class org.eclipse.nebula.widgets.nattable.data.convert.NumericDisplayConverter
nf
-
-
Constructor Summary
Constructors Constructor Description DecimalNumericDisplayConverter()
Creates a converter that usesNumberFormat
.DecimalNumericDisplayConverter(boolean useNumberFormat)
Creates a converter and allows to specify whetherNumberFormat
should be used or not.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setMaximumFractionDigits(int newValue)
Sets the maximum number of digits allowed in the fraction portion of a number.void
setMinimumFractionDigits(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, setNumberFormat
-
Methods inherited from class org.eclipse.nebula.widgets.nattable.data.convert.DisplayConverter
canonicalToDisplayValue, displayToCanonicalValue
-
-
-
-
Constructor Detail
-
DecimalNumericDisplayConverter
public DecimalNumericDisplayConverter()
Creates a converter that usesNumberFormat
.
-
DecimalNumericDisplayConverter
public DecimalNumericDisplayConverter(boolean useNumberFormat)
Creates a converter and allows to specify whetherNumberFormat
should be used or not.- Parameters:
useNumberFormat
-true
if aNumberFormat
should be used,false
if not.- Since:
- 1.4
-
-
Method Detail
-
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:
NumberFormat.setMinimumFractionDigits(int)
-
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:
NumberFormat.setMaximumFractionDigits(int)
-
-