Interface ColumnConfiguration<V>
- Type Parameters:
V- the column value type
- All Superinterfaces:
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 Summary
Modifier and TypeMethodDescriptiondefault ColumnConfiguration<V>Returns a new independent configuration node that inherits from this configuration.Returns the effective null representation, walking the configuration chain until a non-nullvalue is found, ornullif none is set.<T> RendererFactory<T,V> Returns the effective renderer factory, walking the configuration chain until a non-nullvalue is found, ornullif none is configured.Returns the effective text alignment, walking the configuration chain until a non-nullvalue is found, ornullif none is set.setFormatter(SerializableFunction<V, String> formatter) Sets a formatter that converts a column value to a display string.setNullRepresentation(String nullRepresentation) Sets the string to display when the column value isnull.<T> ColumnConfiguration<V>setRendererFactory(RendererFactory<T, V> rendererFactory) Sets a custom renderer factory that creates a renderer from a value provider.setTextAlign(ColumnTextAlign textAlign) Sets the text alignment for cells of this column type.
-
Method Details
-
setNullRepresentation
Sets the string to display when the column value isnull.- Parameters:
nullRepresentation- the null representation string- Returns:
- this configuration, for fluent chaining
-
setTextAlign
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-nullvalue is found, ornullif 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-nullvalue is found, ornullif none is set.- Returns:
- the effective null representation, or
null
-
setFormatter
Sets a formatter that converts a column value to a display string. Calling this method replaces any previously set renderer factory with aTextRendererthat applies the formatter.- Parameters:
formatter- a function mapping a column value to a display string- Returns:
- this configuration, for fluent chaining
-
getRendererFactory
Returns the effective renderer factory, walking the configuration chain until a non-nullvalue is found, ornullif none is configured.- Type Parameters:
T- the grid bean type- Returns:
- the effective renderer factory, or
null
-
setRendererFactory
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
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
ColumnConfigurationwhose parent isthis
-