Class ColumnConfigurationTextRenderer<T,V>

Type Parameters:
T - the grid bean type
V - the column value type
All Implemented Interfaces:
Serializable

public final class ColumnConfigurationTextRenderer<T,V> extends TextRenderer<T>
A TextRenderer that formats column values using a ColumnConfiguration. When the value is null, the configuration's null representation is used. Otherwise, an optional formatter is applied; if none is provided, Object.toString() is called.
See Also:
  • Constructor Details

    • ColumnConfigurationTextRenderer

      public ColumnConfigurationTextRenderer(ValueProvider<T,V> getter, ColumnConfiguration<V> config, SerializableBiFunction<V,ColumnConfiguration<V>,String> formatter)
      Creates a renderer that applies the given formatter to non-null values and returns the configuration's null representation for null values.
      Parameters:
      getter - a value provider that extracts the column value from a row item
      config - the column configuration supplying the null representation
      formatter - a function mapping a value and its configuration to a display string, or null to fall back to Object.toString()
    • ColumnConfigurationTextRenderer

      public ColumnConfigurationTextRenderer(ValueProvider<T,V> getter, ColumnConfiguration<V> config)
      Creates a renderer that falls back to Object.toString() for non-null values and returns the configuration's null representation for null values.
      Parameters:
      getter - a value provider that extracts the column value from a row item
      config - the column configuration supplying the null representation