Package org.vaadin.tatu
Class BeanTable.Column<R>
java.lang.Object
org.vaadin.tatu.BeanTable.Column<R>
- Type Parameters:
R- Bean type
- All Implemented Interfaces:
Serializable
Configuration class for the Columns.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.vaadin.flow.component.ComponentgetKey()Gets the key of the column.com.vaadin.flow.function.ValueProvider<T, ?> getWidth()booleanReturns if true if this column acts as row header.booleanReturn status of the column visibility.setAlignment(BeanTable.ColumnAlignment alignment) Set vertical alignment of the cell content, CENTER, LEFT, RIGHT.setClassNameProvider(BeanTable.StringProvider<T> classNameProvider) Set class name provider for a table column, i.e.setComponentProvider(BeanTable.ComponentProvider<T> componentProvider) Set component provider function for the column,setHeader(com.vaadin.flow.component.Component header) Set column header as a ComponentSet column header as StringSet unique key for the columnsetRowHeader(boolean rowHeader) Sets the row header nature for the column for accessibility.setTooltipProvider(BeanTable.StringProvider<T> tooltipProvider) Set tooltip provider function for the column,setVisible(boolean visible) Set the column visibility.Set the width of the column.
-
Constructor Details
-
Column
Constructor with header and value provider- Parameters:
header- The header as textvalueProvider- The valuprovider
-
Column
public Column()Constructor without parameters
-
-
Method Details
-
setHeader
Set column header as String- Parameters:
header- String for header- Returns:
- Column for chaining
-
setHeader
Set column header as a Component- Parameters:
header- Component used for header- Returns:
- Column for chaining
-
getHeader
public com.vaadin.flow.component.Component getHeader() -
setTooltipProvider
Set tooltip provider function for the column,Note: Not tooltip provider applied on component columns. Add tooltip to the component directly.
- Parameters:
tooltipProvider- StringProvider Lambda callback bean instance for the Column.- Returns:
- Column for chaining
-
getTooltipProvider
-
setComponentProvider
public BeanTable<T>.Column<R> setComponentProvider(BeanTable.ComponentProvider<T> componentProvider) Set component provider function for the column,- Parameters:
componentProvider- ComponnetProvider Lambda callback bean instance for the Column.- Returns:
- Column for chaining
-
getComponentProvider
-
getValueProvider
-
setClassNameProvider
Set class name provider for a table column, i.e. cells in the column.- Parameters:
classNameProvider- StringProvider Lambda callback bean instance to String.- Returns:
- Column for chaining
-
getClassNameProvider
-
setAlignment
Set vertical alignment of the cell content, CENTER, LEFT, RIGHT.- Parameters:
alignment- ColumnAlignment, null to unset.- Returns:
- Column for chaining
-
getAlignment
-
setWidth
Set the width of the column.- Parameters:
width- CSS compatible width string, null to unset.- Returns:
- Column for chaining
-
getWidth
-
setKey
Set unique key for the column- Parameters:
key- String value- Returns:
- Column for chaining
-
getKey
Gets the key of the column. Keys are automatically set if columns are created by property names, in that case key is the property name.- Returns:
- The key, can be null
-
setRowHeader
Sets the row header nature for the column for accessibility.- Parameters:
rowHeader- Use true if this column should act as row header.- Returns:
- Column for chaining
-
isRowHeader
public boolean isRowHeader()Returns if true if this column acts as row header.- Returns:
- Boolean value.
-
setVisible
Set the column visibility.- Parameters:
visible- Boolean value- Returns:
- Column for chaining
-
isVisible
public boolean isVisible()Return status of the column visibility.- Returns:
- Boolean value.
-