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:
Styleable
,EventTarget
public class FilteredTableColumn<S,T> extends TableColumn2<S,T>
An extension ofTableColumn2
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
Properties Type Property Description BooleanProperty
filterable
When the filterable property is set to true, the column can be filtered.ObjectProperty<EventHandler<ActionEvent>>
onFilterAction
The filter button's action, which is invoked whenever the filter button is fired.ObservableValue<Predicate<? super T>>
predicate
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
TableColumn.CellDataFeatures<S extends Object,T extends Object>, TableColumn.CellEditEvent<S extends Object,T extends Object>, 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 Constructor Description FilteredTableColumn()
Creates a FilteredTableColumn control.FilteredTableColumn(String text)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BooleanProperty
filterableProperty()
When the filterable property is set to true, the column can be filtered.EventHandler<ActionEvent>
getOnFilterAction()
Gets the value of the property onFilterAction.Predicate<? super T>
getPredicate()
Gets the value of the property predicate.boolean
isFilterable()
Gets the value of the property filterable.ObjectProperty<EventHandler<ActionEvent>>
onFilterActionProperty()
The filter button's action, which is invoked whenever the filter button is fired.ObservableValue<Predicate<? super T>>
predicateProperty()
This property allows defining a predicate for the column.void
setFilterable(boolean value)
Sets the value of the property filterable.void
setOnFilterAction(EventHandler<ActionEvent> value)
Sets the value of the property onFilterAction.void
setPredicate(Predicate<? super T> value)
Sets the value of the property predicate.-
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 Detail
-
filterable
public final BooleanProperty filterableProperty
When the filterable property is set to true, the column can be filtered.- See Also:
isFilterable()
,setFilterable(boolean)
-
predicate
public final ObservableValue<Predicate<? super T>> 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
.- See Also:
getPredicate()
,setPredicate(Predicate)
-
onFilterAction
public final ObjectProperty<EventHandler<ActionEvent>> onFilterActionProperty
The filter button's action, which is invoked whenever the filter button is fired.
-
-
Constructor Detail
-
FilteredTableColumn
public FilteredTableColumn()
Creates a FilteredTableColumn control.
-
FilteredTableColumn
public FilteredTableColumn(String text)
-
-
Method Detail
-
setFilterable
public final void setFilterable(boolean value)
Sets the value of the property filterable.- Property description:
- When the filterable property is set to true, the column can be filtered.
-
isFilterable
public final boolean isFilterable()
Gets the value of the property filterable.- Property description:
- When the filterable property is set to true, the column can be filtered.
-
filterableProperty
public final BooleanProperty filterableProperty()
When the filterable property is set to true, the column can be filtered.- See Also:
isFilterable()
,setFilterable(boolean)
-
setPredicate
public final void setPredicate(Predicate<? super T> value)
Sets the value of the property predicate.- 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
.
-
getPredicate
public final Predicate<? super T> getPredicate()
Gets the value of the property predicate.- 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
.
-
predicateProperty
public final ObservableValue<Predicate<? super T>> 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
.- See Also:
getPredicate()
,setPredicate(Predicate)
-
onFilterActionProperty
public final ObjectProperty<EventHandler<ActionEvent>> onFilterActionProperty()
The filter button's action, which is invoked whenever the filter button is fired.
-
setOnFilterAction
public final void setOnFilterAction(EventHandler<ActionEvent> value)
Sets the value of the property onFilterAction.- Property description:
- The filter button's action, which is invoked whenever the filter button is fired.
-
getOnFilterAction
public final EventHandler<ActionEvent> getOnFilterAction()
Gets the value of the property onFilterAction.- Property description:
- The filter button's action, which is invoked whenever the filter button is fired.
-
-