Package com.storedobject.ui.util
Class SOColumnCreator<T>
java.lang.Object
com.storedobject.ui.util.SOColumnCreator<T>
- All Implemented Interfaces:
ObjectColumnCreator<T>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()This will be invoked when the process of "column creation" is over.create(HasColumns<T> grid) Create a "column creator" for the given grid.getColumnFunction(String columnName) Get the function that is used to generate the content of a particular column.Get the column names for the grid.com.vaadin.flow.component.grid.ColumnTextAligngetColumnTextAlign(String columnName, Class<?> valueType) Get the text alignment of a particular column.Class<?> getColumnValueType(String columnName) Get the value type of particular column.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.storedobject.vaadin.ObjectColumnCreator
getColumnCaption, getColumnMethod, getColumnOrder
-
Constructor Details
-
SOColumnCreator
public SOColumnCreator()
-
-
Method Details
-
create
Description copied from interface:ObjectColumnCreatorCreate a "column creator" for the given grid.- Specified by:
createin interfaceObjectColumnCreator<T>- Parameters:
grid- The grid for which columns need to be created.- Returns:
- Column creator. The default implementation return the self reference.
-
getColumnNames
Description copied from interface:ObjectColumnCreatorGet the column names for the grid.- Specified by:
getColumnNamesin interfaceObjectColumnCreator<T>- Returns:
- Stream of column names.
-
getColumnFunction
Description copied from interface:ObjectColumnCreatorGet the function that is used to generate the content of a particular column.- Specified by:
getColumnFunctionin interfaceObjectColumnCreator<T>- Parameters:
columnName- Name of the column- Returns:
- Function. Default implementation returns null.
-
getColumnTextAlign
public com.vaadin.flow.component.grid.ColumnTextAlign getColumnTextAlign(String columnName, Class<?> valueType) Description copied from interface:ObjectColumnCreatorGet the text alignment of a particular column.- Specified by:
getColumnTextAlignin interfaceObjectColumnCreator<T>- 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
Description copied from interface:ObjectColumnCreatorGet the value type of particular column.- Specified by:
getColumnValueTypein interfaceObjectColumnCreator<T>- Parameters:
columnName- Name of the column- Returns:
- Value type. The default implementation returns
null.
-
close
public void close()Description copied from interface:ObjectColumnCreatorThis will be invoked when the process of "column creation" is over. Default implementation does nothing.- Specified by:
closein interfaceObjectColumnCreator<T>
-