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

public class FilteredTableColumn<S,T> extends TableColumn2<S,T>
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

    Properties
    Type
    Property
    Description
    final 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.
    final javafx.beans.value.ObservableValue<Predicate<? super T>>
    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
    Constructor
    Description
    Creates a FilteredTableColumn control.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    final 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 the onFilterAction property.
    final Predicate<? super T>
    Gets the value of the predicate property.
    final boolean
    Gets the value of the filterable 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.
    final javafx.beans.value.ObservableValue<Predicate<? super T>>
    This property allows defining a predicate for the column.
    final void
    setFilterable(boolean value)
    Sets the value of the filterable property.
    final void
    setOnFilterAction(javafx.event.EventHandler<javafx.event.ActionEvent> value)
    Sets the value of the onFilterAction property.
    final void
    setPredicate(Predicate<? super T> value)
    Sets the value of the predicate 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

  • Constructor Details

    • FilteredTableColumn

      public FilteredTableColumn()
      Creates a FilteredTableColumn control.
    • FilteredTableColumn

      public FilteredTableColumn(String text)
  • Method Details

    • setFilterable

      public final void setFilterable(boolean value)
      Sets the value of the filterable property.
      Property description:
      When the filterable property is set to true, the column can be filtered.
      Parameters:
      value - the value for the filterable property
      See Also:
    • isFilterable

      public final boolean isFilterable()
      Gets the value of the filterable 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

      public final void setPredicate(Predicate<? super T> value)
      Sets the value of the predicate 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 the predicate property
      See Also:
    • getPredicate

      public final Predicate<? super T> getPredicate()
      Gets the value of the predicate 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

      public final javafx.beans.value.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 option TableColumn2.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 the onFilterAction property.
      Property description:
      The filter button's action, which is invoked whenever the filter button is fired.
      Parameters:
      value - the value for the onFilterAction property
      See Also:
    • getOnFilterAction

      public final javafx.event.EventHandler<javafx.event.ActionEvent> getOnFilterAction()
      Gets the value of the onFilterAction 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: