Class NumericDisplayConverter

All Implemented Interfaces:
Direct Known Subclasses:
DecimalNumericDisplayConverter, DefaultByteDisplayConverter, DefaultIntegerDisplayConverter, DefaultLongDisplayConverter, DefaultShortDisplayConverter

public abstract class NumericDisplayConverter extends DisplayConverter
Converts the display value to a double and vice versa.
  • Field Details

  • Constructor Details

    • NumericDisplayConverter

      public NumericDisplayConverter()
  • 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
      Specified by:
      canonicalToDisplayValue in class DisplayConverter
      canonicalValue - The data value from the backing data.
      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.

      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
      Specified by:
      displayToCanonicalValue in class DisplayConverter
      displayValue - The display value that should be converted to the data value that matches the backing data.
      The converted value to put to the backing data.
    • convertToNumericValue

      protected abstract Object convertToNumericValue(String value)
    • getNumberFormat

      public NumberFormat getNumberFormat()
      The NumberFormat that is used to format numeric values.
    • setNumberFormat

      public void setNumberFormat(NumberFormat nf)
      nf - The NumberFormat that should be used to format numeric values.