Class GroupDataGridUtils
java.lang.Object
io.jmix.groupgridflowui.component.GroupDataGridUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic <E> voidcollapse(GroupDataGrid<E> groupDataGrid, List<E> items, boolean userOriginated) For internal use only.static voidcopyColumnProperties(DataGridColumn source, DataGridColumn destination) Copies columns properties.static <E> voidexpand(GroupDataGrid<E> groupDataGrid, List<E> items, boolean userOriginated) For internal use only.static StringgetColumnHeaderText(Grid.Column<?> column) Retrieves the header text for the given column.static <E> com.vaadin.flow.component.ComponentgetStoredColumnHeaderComponent(DataGridColumn<E> column) Returns a header component that was set before grouping a column or before adding a header.static <E> StringgetStoredColumnHeaderText(DataGridColumn<E> column) Returns a header text that was set before grouping a column or before adding a header.static <E> voidgroupBy(GroupDataGrid<E> groupDataGrid, List<String> groupingKeys, boolean userOriginated) For internal use only.
-
Method Details
-
copyColumnProperties
Copies columns properties.- Parameters:
source- column to copy properties fromdestination- column to copy properties to
-
getColumnHeaderText
Retrieves the header text for the given column.- Parameters:
column- column to get header text for- Returns:
- column header text
-
getStoredColumnHeaderText
Returns a header text that was set before grouping a column or before adding a header.- Type Parameters:
E- item type- Parameters:
column- column to get header text for- Returns:
- header text or
nullif there is no header text for the given column
-
getStoredColumnHeaderComponent
@Nullable public static <E> com.vaadin.flow.component.Component getStoredColumnHeaderComponent(DataGridColumn<E> column) Returns a header component that was set before grouping a column or before adding a header.- Type Parameters:
E- item type- Parameters:
column- column to get a header component for- Returns:
- header component or
nullif there is no header component for the given column
-
groupBy
public static <E> void groupBy(GroupDataGrid<E> groupDataGrid, List<String> groupingKeys, boolean userOriginated) For internal use only.- Type Parameters:
E- item type- Parameters:
groupDataGrid- group data gridgroupingKeys- grouping column keysuserOriginated- whether an event originated by user action or programmatically- Throws:
MissingPropertyDescriptorException- if the grouping fails due to a missing property descriptor
-
expand
public static <E> void expand(GroupDataGrid<E> groupDataGrid, List<E> items, boolean userOriginated) For internal use only.- Type Parameters:
E- item type- Parameters:
groupDataGrid- group data griditems- items to expanduserOriginated- is an event originated by user action or programmatically
-
collapse
public static <E> void collapse(GroupDataGrid<E> groupDataGrid, List<E> items, boolean userOriginated) For internal use only.- Type Parameters:
E- item type- Parameters:
groupDataGrid- group data griditems- items to collapseuserOriginated- whether an event originated by user action or programmatically
-