Class AbstractGridSettingsBinder<V extends com.vaadin.flow.component.grid.Grid<?>,S extends DataGridSettings>

java.lang.Object
io.jmix.flowui.facet.settings.component.binder.AbstractGridSettingsBinder<V,S>
All Implemented Interfaces:
ComponentSettingsBinder<V,S>, DataLoadingSettingsBinder<V,S>
Direct Known Subclasses:
DataGridSettingsBinder, TreeDataGridSettingsBinder

public abstract class AbstractGridSettingsBinder<V extends com.vaadin.flow.component.grid.Grid<?>,S extends DataGridSettings> extends Object implements DataLoadingSettingsBinder<V,S>
  • Constructor Details

    • AbstractGridSettingsBinder

      public AbstractGridSettingsBinder()
  • Method Details

    • applySettings

      public void applySettings(V component, S settings)
      Description copied from interface: ComponentSettingsBinder
      Applies settings to the component.
      Specified by:
      applySettings in interface ComponentSettingsBinder<V extends com.vaadin.flow.component.grid.Grid<?>,S extends DataGridSettings>
      Parameters:
      component - component
      settings - settings for the component
    • applyDataLoadingSettings

      public void applyDataLoadingSettings(V component, S settings)
      Description copied from interface: DataLoadingSettingsBinder
      Applies data loading settings.
      Specified by:
      applyDataLoadingSettings in interface DataLoadingSettingsBinder<V extends com.vaadin.flow.component.grid.Grid<?>,S extends DataGridSettings>
      Parameters:
      component - component to apply
      settings - settings for the component
    • saveSettings

      public boolean saveSettings(V component, S settings)
      Description copied from interface: ComponentSettingsBinder
      Invoked when component properties or states should be saved to settings.
      Specified by:
      saveSettings in interface ComponentSettingsBinder<V extends com.vaadin.flow.component.grid.Grid<?>,S extends DataGridSettings>
      Parameters:
      component - component
      settings - settings for the component
      Returns:
      true if settings were modified
    • getSettings

      public S getSettings(V component)
      Specified by:
      getSettings in interface ComponentSettingsBinder<V extends com.vaadin.flow.component.grid.Grid<?>,S extends DataGridSettings>
      Parameters:
      component - component
      Returns:
      current component settings. It retrieves current property values from component and creates new settings instance.
    • createSettings

      protected abstract S createSettings()
    • isDataLoadingSettingsEnabled

      protected boolean isDataLoadingSettingsEnabled(V grid)
    • getGridItems

      @Nullable protected abstract DataGridItems<?> getGridItems(V grid)
    • isColumnSortOrderChanged

      protected boolean isColumnSortOrderChanged(@Nullable List<? extends com.vaadin.flow.component.grid.GridSortOrder<?>> componentSortOrder, @Nullable List<DataGridSettings.SortOrder> settingsSortOrder)
    • setSortOrderToSettings

      protected void setSortOrderToSettings(List<? extends com.vaadin.flow.component.grid.GridSortOrder<?>> sortOrder, DataGridSettings settings)
    • isColumnSettingsChanged

      protected boolean isColumnSettingsChanged(@Nullable List<? extends com.vaadin.flow.component.grid.Grid.Column<?>> componentColumns, @Nullable List<DataGridSettings.Column> settingsColumns)
    • setColumnsToSettings

      protected void setColumnsToSettings(@Nullable List<? extends com.vaadin.flow.component.grid.Grid.Column<?>> componentColumns, DataGridSettings settings)
    • getOrderedColumns

      protected List<? extends com.vaadin.flow.component.grid.Grid.Column<?>> getOrderedColumns(V grid)
    • getAllColumns

      protected abstract List<? extends com.vaadin.flow.component.grid.Grid.Column<?>> getAllColumns(V grid)