Module org.controlsfx.controls
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.-
Property Summary
PropertiesTypePropertyDescriptionfinal javafx.beans.property.BooleanProperty
When 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 org.controlsfx.control.tableview2.TableColumn2
southNode
Properties inherited from class javafx.scene.control.TableColumn
cellFactory, cellValueFactory, onEditCancel, onEditCommit, onEditStart, sortType, tableView
Properties inherited from class javafx.scene.control.TableColumnBase
comparator, contextMenu, editable, graphic, id, maxWidth, minWidth, parentColumn, prefWidth, reorderable, resizable, sortable, sortNode, style, text, visible, width
-
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 -
Field Summary
Fields inherited from class javafx.scene.control.TableColumn
DEFAULT_CELL_FACTORY
Fields inherited from class javafx.scene.control.TableColumnBase
DEFAULT_COMPARATOR
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal javafx.beans.property.BooleanProperty
When the filterable property is set to true, the column can be filtered.final javafx.event.EventHandler
<javafx.event.ActionEvent> Gets the value of theonFilterAction
property.Gets the value of thepredicate
property.final boolean
Gets the value of thefilterable
property.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 void
setFilterable
(boolean value) Sets the value of thefilterable
property.final void
setOnFilterAction
(javafx.event.EventHandler<javafx.event.ActionEvent> value) Sets the value of theonFilterAction
property.final void
setPredicate
(Predicate<? super T> value) Sets the value of thepredicate
property.Methods inherited from class org.controlsfx.control.tableview2.TableColumn2
getSouthNode, setSouthNode, southNodeProperty
Methods 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, tableViewProperty
Methods 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, widthProperty
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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 thefilterable
property.- Property description:
- When the filterable property is set to true, the column can be filtered.
- Parameters:
value
- the value for thefilterable
property- See Also:
-
isFilterable
public final boolean isFilterable()Gets the value of thefilterable
property.- Property description:
- When the filterable property is set to true, the column can be filtered.
- Returns:
- the value of the
filterable
property - 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
filterable
property - See Also:
-
setPredicate
Sets the value of thepredicate
property.- 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 thepredicate
property- See Also:
-
getPredicate
Gets the value of thepredicate
property.- 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
predicate
property - 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
predicate
property - 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
onFilterAction
property - See Also:
-
setOnFilterAction
public final void setOnFilterAction(javafx.event.EventHandler<javafx.event.ActionEvent> value) Sets the value of theonFilterAction
property.- Property description:
- The filter button's action, which is invoked whenever the filter button is fired.
- Parameters:
value
- the value for theonFilterAction
property- See Also:
-
getOnFilterAction
public final javafx.event.EventHandler<javafx.event.ActionEvent> getOnFilterAction()Gets the value of theonFilterAction
property.- Property description:
- The filter button's action, which is invoked whenever the filter button is fired.
- Returns:
- the value of the
onFilterAction
property - See Also:
-