java.lang.Object
org.controlsfx.control.table.TableFilter<T>
- Type Parameters:
T-
Applies a filtering control to a provided
Features
-Convenient filter control holds a checklist of distinct items to include/exclude, much like an Excel filter.
-New/removed records will be captured by the filter control and reflect new or removed values from checklist. -Filters on more than one column are combined to only display mutually inclusive records on the client's TableView.
TableView instance.
The filter will be applied immediately on construction, and
can be made visible by right-clicking the desired column to filter on.
Features
-Convenient filter control holds a checklist of distinct items to include/exclude, much like an Excel filter.
-New/removed records will be captured by the filter control and reflect new or removed values from checklist. -Filters on more than one column are combined to only display mutually inclusive records on the client's TableView.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA Builder for a TableFilter against a specified TableView -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidstatic <T> TableFilter.Builder<T>forTableView(TableView<T> tableView) Returns a TableFilter.Builder to configure a TableFilter on the specified TableView.Returns the backingObservableListoriginally provided to the constructor.Optional<ColumnFilter<T,?>> getColumnFilter(TableColumn<T, ?> tableColumn) Returns theFilteredListused by this TableFilter and is backing theTableView.booleanisDirty()voidvoidvoidselectAllValues(TableColumn<?, ?> column) Programmatically selects all values for the specified TableColumnvoidselectValue(TableColumn<?, ?> column, Object value) Programmatically selects value for the specified TableColumnvoidsetSearchStrategy(BiPredicate<String, String> searchStrategy) Allows specifying a different behavior for the search box on the TableFilter.voidunSelectAllValues(TableColumn<?, ?> column) Programmatically unselect all values for the specified TableColumnvoidunselectValue(TableColumn<?, ?> column, Object value) Programmatically unselects value for the specified TableColumn
-
Constructor Details
-
TableFilter
Deprecated.Use TableFilter.forTableView() factory and leverage Builder
-
-
Method Details
-
setSearchStrategy
Allows specifying a different behavior for the search box on the TableFilter. By default, the contains() method on a String is used to evaluate the search box input to qualify the distinct filter values. But you can specify a different behavior by providing a simple BiPredicate argument to this method. The BiPredicate argument allows you take the input value and target value and use a lambda to evaluate a boolean. For instance, you can implement a comparison by assuming the input value is a regular expression, and call matches() on the target value to see if it aligns to the pattern.- Parameters:
searchStrategy-
-
getBackingList
Returns the backingObservableListoriginally provided to the constructor.- Returns:
- ObservableList
-
getFilteredList
Returns theFilteredListused by this TableFilter and is backing theTableView.- Returns:
- FilteredList
-
selectValue
Programmatically selects value for the specified TableColumn -
unselectValue
Programmatically unselects value for the specified TableColumn -
selectAllValues
Programmatically selects all values for the specified TableColumn -
unSelectAllValues
Programmatically unselect all values for the specified TableColumn -
executeFilter
public void executeFilter() -
resetFilter
public void resetFilter() -
resetAllFilters
public void resetAllFilters() -
getColumnFilters
-
getColumnFilter
-
isDirty
public boolean isDirty() -
forTableView
Returns a TableFilter.Builder to configure a TableFilter on the specified TableView. Call apply() to initialize and return the TableFilter- Type Parameters:
T-- Parameters:
tableView-
-