Class DisplayConverter
- java.lang.Object
-
- org.eclipse.nebula.widgets.nattable.data.convert.DisplayConverter
-
- All Implemented Interfaces:
IDisplayConverter
- Direct Known Subclasses:
DefaultBooleanDisplayConverter,DefaultCharacterDisplayConverter,DefaultDateDisplayConverter,DefaultDisplayConverter,FilterRowRegularExpressionConverter,FormulaResultDisplayConverter,NumericDisplayConverter,PercentageDisplayConverter,PricingTypeBeanDisplayConverter,SummaryDisplayConverter
public abstract class DisplayConverter extends Object implements IDisplayConverter
-
-
Constructor Summary
Constructors Constructor Description DisplayConverter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract ObjectcanonicalToDisplayValue(Object canonicalValue)Convert backing data value to value to be displayed.ObjectcanonicalToDisplayValue(ILayerCell cell, IConfigRegistry configRegistry, Object canonicalValue)Convert backing data value to value to be displayed.abstract ObjectdisplayToCanonicalValue(Object displayValue)Convert from display value to value in the backing data structure.ObjectdisplayToCanonicalValue(ILayerCell cell, IConfigRegistry configRegistry, Object displayValue)Convert from display value to value in the backing data structure.
-
-
-
Method Detail
-
canonicalToDisplayValue
public abstract Object canonicalToDisplayValue(Object canonicalValue)
Description copied from interface:IDisplayConverterConvert backing data value to value to be displayed. Typically converts to a String for display.- Specified by:
canonicalToDisplayValuein interfaceIDisplayConverter- Parameters:
canonicalValue- The data value from the backing data.- Returns:
- The converted value to display.
-
displayToCanonicalValue
public abstract Object displayToCanonicalValue(Object displayValue)
Description copied from interface:IDisplayConverterConvert 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:
displayToCanonicalValuein interfaceIDisplayConverter- 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.
-
canonicalToDisplayValue
public Object canonicalToDisplayValue(ILayerCell cell, IConfigRegistry configRegistry, Object canonicalValue)
Description copied from interface:IDisplayConverterConvert backing data value to value to be displayed. Typically converts to a String for display. Use this method for contextual conversion.Note that on returning a different type than String,
toString()will be called on the returned object to render the value for displaying.- Specified by:
canonicalToDisplayValuein interfaceIDisplayConverter- Parameters:
cell- TheILayerCellwhose canonical value should be converted.configRegistry- TheIConfigRegistryof the NatTable to which theILayerCellbelongs.canonicalValue- The data value from the backing data.- Returns:
- The converted value to display.
-
displayToCanonicalValue
public Object displayToCanonicalValue(ILayerCell cell, IConfigRegistry configRegistry, Object displayValue)
Description copied from interface:IDisplayConverterConvert 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 Use this method for contextual conversion.- Specified by:
displayToCanonicalValuein interfaceIDisplayConverter- Parameters:
cell- TheILayerCellwhose canonical value should be converted.configRegistry- TheIConfigRegistryof the NatTable to which theILayerCellbelongs.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.
-
-