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 TypeMethodDescriptionvoid
close()
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.ColumnTextAlign
getColumnTextAlign
(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, wait
Methods inherited from interface com.storedobject.vaadin.ObjectColumnCreator
getColumnCaption, getColumnMethod, getColumnOrder
-
Constructor Details
-
SOColumnCreator
public SOColumnCreator()
-
-
Method Details
-
create
Description copied from interface:ObjectColumnCreator
Create a "column creator" for the given grid.- Specified by:
create
in 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:ObjectColumnCreator
Get the column names for the grid.- Specified by:
getColumnNames
in interfaceObjectColumnCreator<T>
- Returns:
- Stream of column names.
-
getColumnFunction
Description copied from interface:ObjectColumnCreator
Get the function that is used to generate the content of a particular column.- Specified by:
getColumnFunction
in 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:ObjectColumnCreator
Get the text alignment of a particular column.- Specified by:
getColumnTextAlign
in 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
null
or non-numeric.
-
getColumnValueType
Description copied from interface:ObjectColumnCreator
Get the value type of particular column.- Specified by:
getColumnValueType
in interfaceObjectColumnCreator<T>
- Parameters:
columnName
- Name of the column- Returns:
- Value type. The default implementation returns
null
.
-
close
public void close()Description copied from interface:ObjectColumnCreator
This will be invoked when the process of "column creation" is over. Default implementation does nothing.- Specified by:
close
in interfaceObjectColumnCreator<T>
-