Class ContextualDisplayConverter

java.lang.Object
org.eclipse.nebula.widgets.nattable.data.convert.ContextualDisplayConverter
All Implemented Interfaces:
IDisplayConverter
Direct Known Subclasses:
FormulaEditDisplayConverter, GroupByDisplayConverter, MarkupDisplayConverter

public abstract class ContextualDisplayConverter extends Object implements IDisplayConverter
  • Constructor Details

    • ContextualDisplayConverter

      public ContextualDisplayConverter()
  • Method Details

    • canonicalToDisplayValue

      public Object canonicalToDisplayValue(Object canonicalValue)
      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 interface IDisplayConverter
      Parameters:
      canonicalValue - The data value from the backing data.
      Returns:
      The converted value to display.
    • displayToCanonicalValue

      public Object displayToCanonicalValue(Object displayValue)
      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 interface IDisplayConverter
      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 abstract Object canonicalToDisplayValue(ILayerCell cell, IConfigRegistry configRegistry, Object canonicalValue)
      Description copied from interface: IDisplayConverter
      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.

      Specified by:
      canonicalToDisplayValue in interface IDisplayConverter
      Parameters:
      cell - The ILayerCell whose canonical value should be converted.
      configRegistry - The IConfigRegistry of the NatTable to which the ILayerCell belongs.
      canonicalValue - The data value from the backing data.
      Returns:
      The converted value to display.
    • displayToCanonicalValue

      public abstract Object displayToCanonicalValue(ILayerCell cell, IConfigRegistry configRegistry, Object displayValue)
      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 Use this method for contextual conversion.

      Specified by:
      displayToCanonicalValue in interface IDisplayConverter
      Parameters:
      cell - The ILayerCell whose canonical value should be converted.
      configRegistry - The IConfigRegistry of the NatTable to which the ILayerCell belongs.
      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.