Class NumericDisplayConverter
java.lang.Object
org.eclipse.nebula.widgets.nattable.data.convert.DisplayConverter
org.eclipse.nebula.widgets.nattable.data.convert.NumericDisplayConverter
- All Implemented Interfaces:
IDisplayConverter
- Direct Known Subclasses:
DecimalNumericDisplayConverter
,DefaultByteDisplayConverter
,DefaultIntegerDisplayConverter
,DefaultLongDisplayConverter
,DefaultShortDisplayConverter
Converts the display value to a double and vice versa.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncanonicalToDisplayValue
(Object canonicalValue) Convert backing data value to value to be displayed.protected abstract Object
convertToNumericValue
(String value) displayToCanonicalValue
(Object displayValue) Convert from display value to value in the backing data structure.void
Methods inherited from class org.eclipse.nebula.widgets.nattable.data.convert.DisplayConverter
canonicalToDisplayValue, displayToCanonicalValue
-
Field Details
-
nf
-
-
Constructor Details
-
NumericDisplayConverter
public NumericDisplayConverter()
-
-
Method Details
-
canonicalToDisplayValue
Description copied from interface:IDisplayConverter
Convert backing data value to value to be displayed. Typically converts to a String for display.- Specified by:
canonicalToDisplayValue
in interfaceIDisplayConverter
- Specified by:
canonicalToDisplayValue
in classDisplayConverter
- Parameters:
canonicalValue
- The data value from the backing data.- Returns:
- The converted value to display.
-
displayToCanonicalValue
Description copied from interface:IDisplayConverter
Convert from display value to value in the backing data structure.NOTE:
The type the display value is converted to must match the type in the setter of the backing bean/row object- Specified by:
displayToCanonicalValue
in interfaceIDisplayConverter
- Specified by:
displayToCanonicalValue
in classDisplayConverter
- Parameters:
displayValue
- The display value that should be converted to the data value that matches the backing data.- Returns:
- The converted value to put to the backing data.
-
convertToNumericValue
-
getNumberFormat
- Returns:
- The
NumberFormat
that is used to format numeric values.
-
setNumberFormat
- Parameters:
nf
- TheNumberFormat
that should be used to format numeric values.
-