Interface IDisplayConverter
-
- All Known Implementing Classes:
ContextualDisplayConverter,DecimalNumericDisplayConverter,DefaultBigDecimalDisplayConverter,DefaultBigIntegerDisplayConverter,DefaultBooleanDisplayConverter,DefaultByteDisplayConverter,DefaultCharacterDisplayConverter,DefaultDateDisplayConverter,DefaultDisplayConverter,DefaultDoubleDisplayConverter,DefaultFloatDisplayConverter,DefaultIntegerDisplayConverter,DefaultLongDisplayConverter,DefaultShortDisplayConverter,DisplayConverter,FilterRowRegularExpressionConverter,FormulaEditDisplayConverter,FormulaResultDisplayConverter,GroupByDisplayConverter,MarkupDisplayConverter,NumericDisplayConverter,PercentageDisplayConverter,PricingTypeBeanDisplayConverter,SummaryDisplayConverter
public interface IDisplayConverterConverts between two different data representations. The normal data representation is known as the canonical representation The representation displayed on the UI is called the display representation. For example, the canonical representation might be a Date object, whereas the target representation could be a formatted String.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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.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
Object canonicalToDisplayValue(Object canonicalValue)
Convert backing data value to value to be displayed. Typically converts to a String for display.- Parameters:
canonicalValue- The data value from the backing data.- Returns:
- The converted value to display.
-
displayToCanonicalValue
Object displayToCanonicalValue(Object displayValue)
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- 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
Object canonicalToDisplayValue(ILayerCell cell, IConfigRegistry configRegistry, Object canonicalValue)
Convert 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.- 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
Object displayToCanonicalValue(ILayerCell cell, IConfigRegistry configRegistry, Object displayValue)
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 Use this method for contextual conversion.- 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.
-
-