Class ComboBoxFilterUtils
java.lang.Object
org.eclipse.nebula.widgets.nattable.filterrow.combobox.ComboBoxFilterUtils
Helper class for Excel like combo box filters.
- Since:
- 2.1
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisAllSelected(int columnIndex, Object cellData, IComboBoxDataProvider comboBoxDataProvider) Check if all values of the combo box are selected, which actually means "no filter".static <T> booleanisFilterActive(FilterRowDataLayer<T> filterRowDataLayer, IComboBoxDataProvider comboBoxDataProvider, IConfigRegistry configRegistry) Checks if a filter is active.static booleanisFilterRowComboBoxCellEditor(IConfigRegistry configRegistry, int columnIndex) Check if the editor registered for the given column is aFilterRowComboBoxCellEditor.
-
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- TheIComboBoxDataProviderthat provides the entries available in the filter combo.- Returns:
trueif all values are selected and therefore no filter is applied,falseif not.
-
isFilterRowComboBoxCellEditor
public static boolean isFilterRowComboBoxCellEditor(IConfigRegistry configRegistry, int columnIndex) Check if the editor registered for the given column is aFilterRowComboBoxCellEditor.- Parameters:
configRegistry- TheIConfigRegistryneeded to retrieve the configured cell editor.columnIndex- The column index for which the filter editor should be inspected.- Returns:
trueif the filter editor configured for the given column index is of typeFilterRowComboBoxCellEditor.
-
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- TheFilterRowDataLayerneeded to access the filter data.comboBoxDataProvider- TheIComboBoxDataProviderthat provides the entries available in the filter combo.configRegistry- TheIConfigRegistryneeded to retrieve the configured cell editor.- Returns:
trueif any type of filter is currently applied on the table,falseif not.- Since:
- 2.2
-