Package com.storedobject.vaadin
Interface ObjectColumnCreator<T>
- Type Parameters:
T- Data type of the grid
- All Known Implementing Classes:
SOColumnCreator
public interface ObjectColumnCreator<T>
Interface that defines the "column creator" for
DataGrid and DataTreeGrid.- Author:
- Syam
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidclose()This will be invoked when the process of "column creation" is over.default ObjectColumnCreator<T> create(HasColumns<T> grid) Create a "column creator" for the given grid.default StringgetColumnCaption(String columnName) Get the header text for the given column.getColumnFunction(String columnName) Get the function that is used to generate the content of a particular column.default MethodgetColumnMethod(String columnName) Get the method that is used to generate the content of a particular column.Get the column names for the grid.default intgetColumnOrder(String columnName) Get the order of the column to be displayed in the grid.default com.vaadin.flow.component.grid.ColumnTextAligngetColumnTextAlign(String columnName, Class<?> valueType) Get the text alignment of a particular column.default Class<?> getColumnValueType(String columnName) Get the value type of particular column.
-
Method Details
-
create
Create a "column creator" for the given grid.- Parameters:
grid- The grid for which columns need to be created.- Returns:
- Column creator. The default implementation return the self reference.
-
getColumnNames
-
getColumnMethod
-
getColumnFunction
-
getColumnOrder
Get the order of the column to be displayed in the grid. It could be any integer number and lower numbered columns will be on the left side.- Parameters:
columnName- Name of the column- Returns:
- An integer number representing the order. Default implementation returns
Integer.MIN_VALUE.
-
getColumnCaption
Get the header text for the given column.- Parameters:
columnName- Name of the column- Returns:
- Header text. Default implementation returns the value from
ApplicationEnvironment.createLabel(String).
-
getColumnTextAlign
default com.vaadin.flow.component.grid.ColumnTextAlign getColumnTextAlign(String columnName, Class<?> valueType) Get the text alignment of a particular column.- Parameters:
columnName- Name of the columnvalueType- Value type of the column (If the value tye can not be determined, it will benull)- Returns:
- Text alignment. Default implementation returns START if the value type is
nullor non-numeric.
-
getColumnValueType
-
close
default void close()This will be invoked when the process of "column creation" is over. Default implementation does nothing.
-