Class FilteredTableColumn<S,T>
java.lang.Object
javafx.scene.control.TableColumnBase<S,T>
javafx.scene.control.TableColumn<S,T>
org.controlsfx.control.tableview2.TableColumn2<S,T>
org.controlsfx.control.tableview2.FilteredTableColumn<S,T>
- Type Parameters:
S- The type of the objects contained within the TableView items list.T- The type of the content in all cells in this TableColumn
- All Implemented Interfaces:
javafx.css.Styleable, javafx.event.EventTarget
An extension of
TableColumn2 that allows filtering options.
A filter button is displayed in the column header. If no predicate is applied
to the column, it is grayed, else it is blue.
The developer can select the action that will be performed when this button
is clicked.-
Nested Class Summary
Nested classes/interfaces inherited from class javafx.scene.control.TableColumn
javafx.scene.control.TableColumn.CellDataFeatures<S,T>, javafx.scene.control.TableColumn.CellEditEvent<S, T>, javafx.scene.control.TableColumn.SortType -
Property Summary
PropertiesTypePropertyDescriptionfinal javafx.beans.property.BooleanPropertyWhen the filterable property is set to true, the column can be filtered.final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.event.ActionEvent>> The filter button's action, which is invoked whenever the filter button is fired.This property allows defining a predicate for the column.Properties inherited from class TableColumn2
southNodeProperties inherited from class javafx.scene.control.TableColumn
cellFactory, cellValueFactory, onEditCancel, onEditCommit, onEditStart, sortType, tableViewProperties inherited from class javafx.scene.control.TableColumnBase
comparator, contextMenu, editable, graphic, id, maxWidth, minWidth, parentColumn, prefWidth, reorderable, resizable, sortable, sortNode, style, text, visible, width -
Field Summary
Fields inherited from class javafx.scene.control.TableColumn
DEFAULT_CELL_FACTORYFields inherited from class javafx.scene.control.TableColumnBase
DEFAULT_COMPARATOR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal javafx.beans.property.BooleanPropertyWhen the filterable property is set to true, the column can be filtered.final javafx.event.EventHandler<javafx.event.ActionEvent> Gets the value of theonFilterActionproperty.Gets the value of thepredicateproperty.final booleanGets the value of thefilterableproperty.final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.event.ActionEvent>> The filter button's action, which is invoked whenever the filter button is fired.This property allows defining a predicate for the column.final voidsetFilterable(boolean value) Sets the value of thefilterableproperty.final voidsetOnFilterAction(javafx.event.EventHandler<javafx.event.ActionEvent> value) Sets the value of theonFilterActionproperty.final voidsetPredicate(Predicate<? super T> value) Sets the value of thepredicateproperty.Methods inherited from class TableColumn2
getSouthNode, setSouthNode, southNodePropertyMethods inherited from class javafx.scene.control.TableColumn
cellFactoryProperty, cellValueFactoryProperty, editAnyEvent, editCancelEvent, editCommitEvent, editStartEvent, getCellFactory, getCellObservableValue, getCellObservableValue, getCellValueFactory, getClassCssMetaData, getColumns, getCssMetaData, getOnEditCancel, getOnEditCommit, getOnEditStart, getSortType, getStyleableNode, getStyleableParent, getTableView, getTypeSelector, onEditCancelProperty, onEditCommitProperty, onEditStartProperty, setCellFactory, setCellValueFactory, setOnEditCancel, setOnEditCommit, setOnEditStart, setSortType, sortTypeProperty, tableViewPropertyMethods inherited from class javafx.scene.control.TableColumnBase
addEventHandler, buildEventDispatchChain, comparatorProperty, contextMenuProperty, editableProperty, getCellData, getCellData, getComparator, getContextMenu, getGraphic, getId, getMaxWidth, getMinWidth, getParentColumn, getPrefWidth, getProperties, getPseudoClassStates, getSortNode, getStyle, getStyleClass, getText, getUserData, getWidth, graphicProperty, hasProperties, idProperty, isEditable, isReorderable, isResizable, isSortable, isVisible, maxWidthProperty, minWidthProperty, parentColumnProperty, prefWidthProperty, removeEventHandler, reorderableProperty, resizableProperty, setComparator, setContextMenu, setEditable, setGraphic, setId, setMaxWidth, setMinWidth, setPrefWidth, setReorderable, setResizable, setSortable, setSortNode, setStyle, setText, setUserData, setVisible, sortableProperty, sortNodeProperty, styleProperty, textProperty, visibleProperty, widthPropertyMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javafx.event.EventTarget
buildEventDispatchChain
-
Property Details
-
filterable
public final javafx.beans.property.BooleanProperty filterablePropertyWhen the filterable property is set to true, the column can be filtered.- See Also:
-
predicate
This property allows defining a predicate for the column. This predicate can be nullified when the table's predicate is reset, so it is convenient that this property can be set again dynamically via the UI optionTableColumn2.southNode.- See Also:
-
onFilterAction
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.event.ActionEvent>> onFilterActionPropertyThe filter button's action, which is invoked whenever the filter button is fired.- See Also:
-
-
Constructor Details
-
FilteredTableColumn
public FilteredTableColumn()Creates a FilteredTableColumn control. -
FilteredTableColumn
-
-
Method Details
-
setFilterable
public final void setFilterable(boolean value) Sets the value of thefilterableproperty.- Property description:
- When the filterable property is set to true, the column can be filtered.
- Parameters:
value- the value for thefilterableproperty- See Also:
-
isFilterable
public final boolean isFilterable()Gets the value of thefilterableproperty.- Property description:
- When the filterable property is set to true, the column can be filtered.
- Returns:
- the value of the
filterableproperty - See Also:
-
filterableProperty
public final javafx.beans.property.BooleanProperty filterableProperty()When the filterable property is set to true, the column can be filtered.- Returns:
- the
filterableproperty - See Also:
-
setPredicate
Sets the value of thepredicateproperty.- Property description:
- This property allows defining a predicate for the column.
This predicate can be nullified when the table's predicate is reset,
so it is convenient that this property can be set again dynamically via
the UI option
TableColumn2.southNode. - Parameters:
value- the value for thepredicateproperty- See Also:
-
getPredicate
Gets the value of thepredicateproperty.- Property description:
- This property allows defining a predicate for the column.
This predicate can be nullified when the table's predicate is reset,
so it is convenient that this property can be set again dynamically via
the UI option
TableColumn2.southNode. - Returns:
- the value of the
predicateproperty - See Also:
-
predicateProperty
This property allows defining a predicate for the column. This predicate can be nullified when the table's predicate is reset, so it is convenient that this property can be set again dynamically via the UI optionTableColumn2.southNode.- Returns:
- the
predicateproperty - See Also:
-
onFilterActionProperty
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.event.ActionEvent>> onFilterActionProperty()The filter button's action, which is invoked whenever the filter button is fired.- Returns:
- the
onFilterActionproperty - See Also:
-
setOnFilterAction
public final void setOnFilterAction(javafx.event.EventHandler<javafx.event.ActionEvent> value) Sets the value of theonFilterActionproperty.- Property description:
- The filter button's action, which is invoked whenever the filter button is fired.
- Parameters:
value- the value for theonFilterActionproperty- See Also:
-
getOnFilterAction
public final javafx.event.EventHandler<javafx.event.ActionEvent> getOnFilterAction()Gets the value of theonFilterActionproperty.- Property description:
- The filter button's action, which is invoked whenever the filter button is fired.
- Returns:
- the value of the
onFilterActionproperty - See Also:
-