Class GroupDataGridUtils

java.lang.Object
io.jmix.groupgridflowui.component.GroupDataGridUtils

public final class GroupDataGridUtils extends Object
  • Method Details

    • copyColumnProperties

      public static void copyColumnProperties(DataGridColumn source, DataGridColumn destination)
      Copies columns properties.
      Parameters:
      source - column to copy properties from
      destination - column to copy properties to
    • getColumnHeaderText

      public static String getColumnHeaderText(Grid.Column<?> column)
      Retrieves the header text for the given column.
      Parameters:
      column - column to get header text for
      Returns:
      column header text
    • getStoredColumnHeaderText

      @Nullable public static <E> String getStoredColumnHeaderText(DataGridColumn<E> column)
      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 null if 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 null if 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 grid
      groupingKeys - grouping column keys
      userOriginated - 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 grid
      items - items to expand
      userOriginated - 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 grid
      items - items to collapse
      userOriginated - whether an event originated by user action or programmatically