@JsModule(value="./fcGridHelper/connector.js") @CssImport(value="./fcGridHelper/vaadin-menu-bar.css",themeFor="vaadin-menu-bar") @CssImport(value="./fcGridHelper/vaadin-grid.css",themeFor="vaadin-grid") public final class GridHelper<T> extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
static String |
DENSE_THEME
Compact row styling for Vaadin Grid
|
static String |
GRID_STYLES |
Modifier and Type | Method and Description |
---|---|
static <T> GridHelper<T> |
extend(com.vaadin.flow.component.grid.Grid<T> grid) |
List<com.vaadin.flow.component.grid.Grid.Column<T>> |
getColumns() |
com.vaadin.flow.component.grid.Grid.SelectionMode |
getSelectionMode()
Return the grid selection mode
|
boolean |
isColumnToggleVisible() |
void |
setArrowSelectionEnabled(boolean value)
Allow Grid rows to be selected using up/down arrow keys
|
void |
setClassNameGenerator(com.vaadin.flow.function.SerializableFunction<T,String> classNameGenerator)
Sets the function that is used for generating CSS class names for all the
cells in the rows in this grid.
|
void |
setColumnToggleLabel(com.vaadin.flow.component.grid.Grid.Column<T> column,
String label) |
void |
setColumnToggleVisible(boolean visible)
Show a menu to toggle the visibility of grid columns
|
void |
setSelectionColumnFrozen(boolean value)
Set whether the multiselect selection column is frozen.
|
void |
setSelectionColumnHidden(boolean value)
Set whether the multiselect selection column is hidden.
|
void |
setSelectionFilter(com.vaadin.flow.function.SerializablePredicate<T> predicate)
Set a predicate for determining which rows are selectable.
|
public static final String GRID_STYLES
public static final String DENSE_THEME
public static <T> GridHelper<T> extend(com.vaadin.flow.component.grid.Grid<T> grid)
public com.vaadin.flow.component.grid.Grid.SelectionMode getSelectionMode()
public void setClassNameGenerator(com.vaadin.flow.function.SerializableFunction<T,String> classNameGenerator)
null
from the generator
results in no custom class name being set. Multiple class names can be
returned from the generator as space-separated.
If Grid.Column.setClassNameGenerator(SerializableFunction)
is used
together with this method, resulting class names from both methods will
be effective. Class names generated by grid are applied to the cells
before the class names generated by column. This means that if the
classes contain conflicting style properties, column's classes will win.
classNameGenerator
- the class name generator to set, not null
NullPointerException
- if classNameGenerator
is null
Grid.Column.setClassNameGenerator(SerializableFunction)
public void setSelectionColumnHidden(boolean value)
public void setSelectionColumnFrozen(boolean value)
public void setArrowSelectionEnabled(boolean value)
public void setSelectionFilter(com.vaadin.flow.function.SerializablePredicate<T> predicate)
public void setColumnToggleVisible(boolean visible)
public boolean isColumnToggleVisible()
public void setColumnToggleLabel(com.vaadin.flow.component.grid.Grid.Column<T> column, String label)
Copyright © 2022 Flowing Code. All rights reserved.