Class ComboBoxFilterUtils

java.lang.Object
org.eclipse.nebula.widgets.nattable.filterrow.combobox.ComboBoxFilterUtils

public final class ComboBoxFilterUtils extends Object
Helper class for Excel like combo box filters.
Since:
2.1
  • Method Details

    • isAllSelected

      public static boolean isAllSelected(int columnIndex, Object cellData, IComboBoxDataProvider comboBoxDataProvider)
      Check if all values of the combo box are selected, which actually means "no filter".
      Parameters:
      columnIndex - The column index of the filter to check. Needed to retrieve the values in the combobox.
      cellData - The filter value to check.
      comboBoxDataProvider - The IComboBoxDataProvider that provides the entries available in the filter combo.
      Returns:
      true if all values are selected and therefore no filter is applied, false if not.
    • isFilterRowComboBoxCellEditor

      public static boolean isFilterRowComboBoxCellEditor(IConfigRegistry configRegistry, int columnIndex)
      Check if the editor registered for the given column is a FilterRowComboBoxCellEditor.
      Parameters:
      configRegistry - The IConfigRegistry needed to retrieve the configured cell editor.
      columnIndex - The column index for which the filter editor should be inspected.
      Returns:
      true if the filter editor configured for the given column index is of type FilterRowComboBoxCellEditor.
    • isFilterActive

      public static <T> boolean isFilterActive(FilterRowDataLayer<T> filterRowDataLayer, IComboBoxDataProvider comboBoxDataProvider, IConfigRegistry configRegistry)
      Checks if a filter is active. Handles default editors and combobox filter editors.
      Type Parameters:
      T - The type of the underlying row objects.
      Parameters:
      filterRowDataLayer - The FilterRowDataLayer needed to access the filter data.
      comboBoxDataProvider - The IComboBoxDataProvider that provides the entries available in the filter combo.
      configRegistry - The IConfigRegistry needed to retrieve the configured cell editor.
      Returns:
      true if any type of filter is currently applied on the table, false if not.
      Since:
      2.2