Interface ColumnConfiguration<V>

Type Parameters:
V - the column value type
All Superinterfaces:
Serializable

public sealed interface ColumnConfiguration<V> extends Serializable
Holds display configuration for a grid column value type, including text alignment, null representation, and renderer factory. Implementations chain through a parent configuration so that non-null values at a more specific level take precedence over less specific ones.
  • Method Details

    • setNullRepresentation

      ColumnConfiguration<V> setNullRepresentation(String nullRepresentation)
      Sets the string to display when the column value is null.
      Parameters:
      nullRepresentation - the null representation string
      Returns:
      this configuration, for fluent chaining
    • setTextAlign

      ColumnConfiguration<V> setTextAlign(ColumnTextAlign textAlign)
      Sets the text alignment for cells of this column type.
      Parameters:
      textAlign - the text alignment to apply
      Returns:
      this configuration, for fluent chaining
    • getTextAlign

      ColumnTextAlign getTextAlign()
      Returns the effective text alignment, walking the configuration chain until a non-null value is found, or null if none is set.
      Returns:
      the effective text alignment, or null
    • getNullRepresentation

      String getNullRepresentation()
      Returns the effective null representation, walking the configuration chain until a non-null value is found, or null if none is set.
      Returns:
      the effective null representation, or null
    • setFormatter

      Sets a formatter that converts a column value to a display string. The formatter also receives the effective configuration, allowing it to access settings such as the null representation. Calling this method replaces any previously set renderer factory with a TextRenderer that applies the formatter.
      Parameters:
      formatter - a function mapping a column value and its effective configuration to a display string
      Returns:
      this configuration, for fluent chaining
    • setFormatter

      default ColumnConfiguration<V> setFormatter(SerializableFunction<V,String> formatter)
      Sets a formatter that converts a column value to a display string. Calling this method replaces any previously set renderer factory with a TextRenderer that applies the formatter.
      Parameters:
      formatter - a function mapping a column value to a display string
      Returns:
      this configuration, for fluent chaining
    • getRendererFactory

      <T> SerializableFunction<ValueProvider<T,V>,Renderer<T>> getRendererFactory()
      Returns the effective renderer factory, walking the configuration chain until a non-null value is found, or null if none is configured.
      Type Parameters:
      T - the grid bean type
      Returns:
      the effective renderer factory, or null
    • setRendererFactory

      <T> ColumnConfiguration<V> setRendererFactory(SerializableFunction<ValueProvider<T,V>,Renderer<T>> rendererFactory)
      Sets a custom renderer factory that creates a renderer from a value provider. Replaces any previously set formatter or renderer factory.
      Type Parameters:
      T - the grid bean type
      Parameters:
      rendererFactory - a factory that creates a renderer from a value provider
      Returns:
      this configuration, for fluent chaining
    • createNewLayer

      default ColumnConfiguration<V> createNewLayer()
      Returns a new independent configuration node that inherits from this configuration. Values set on the returned node take precedence over this configuration's values; values not set on the returned node fall through to this configuration.
      Returns:
      a new ColumnConfiguration whose parent is this