Class TableColumn2<S,T>

java.lang.Object
javafx.scene.control.TableColumnBase<S,T>
javafx.scene.control.TableColumn<S,T>
org.controlsfx.control.tableview2.TableColumn2<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
Direct Known Subclasses:
FilteredTableColumn

public class TableColumn2<S,T> extends javafx.scene.control.TableColumn<S,T>
An extension of TableColumn that allows adding a South Header Node. The south header is an extended region below the regular column header, and where a node can be laid out with setSouthNode(Node). This node can be used for displaying a filter editor, a column totalizer or other purposes.

Sample

The following code snippet creates a column and adds a label as south node that will display the occurrences of the text "1" in the column:

 
 TableColumn2<Person,String> firstNameCol = new TableColumn2<>("First Name");
 firstNameCol.setCellValueFactory(p -> p.getValue().firstNameProperty());
 firstName.setCellFactory(TextField2TableCell.forTableColumn());
 Label labelFirstName = new Label();
 labelFirstName.textProperty().bind(Bindings.createStringBinding(() ->
        "#1: " + table.getItems().stream()
                    .filter(t -> t.getFirstName()
                    .contains("1"))
                    .count(), table.getItems()));
 firstName.setSouthNode(labelFirstName);
 
  • Property Summary

    Properties
    Type
    Property
    Description
    final javafx.beans.property.ObjectProperty<javafx.scene.Node>
    This property allows the developer to set a node to the south of the header of this column, where UI can be displayed.

    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 TableColumn2 control.
    Creates a TableColumn2 control with the text set to the provided string
  • Method Summary

    Modifier and Type
    Method
    Description
    final javafx.scene.Node
    Gets the value of the southNode property.
    final void
    setSouthNode(javafx.scene.Node value)
    Sets the value of the southNode property.
    final javafx.beans.property.ObjectProperty<javafx.scene.Node>
    This property allows the developer to set a node to the south of the header of this column, where UI can be displayed.

    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

    • southNode

      public final javafx.beans.property.ObjectProperty<javafx.scene.Node> southNodeProperty
      This property allows the developer to set a node to the south of the header of this column, where UI can be displayed.
      See Also:
  • Constructor Details

    • TableColumn2

      public TableColumn2()
      Creates a TableColumn2 control.
    • TableColumn2

      public TableColumn2(String text)
      Creates a TableColumn2 control with the text set to the provided string
      Parameters:
      text - The string to show when the TableColumn2 is placed within the TableView2.
  • Method Details

    • setSouthNode

      public final void setSouthNode(javafx.scene.Node value)
      Sets the value of the southNode property.
      Property description:
      This property allows the developer to set a node to the south of the header of this column, where UI can be displayed.
      Parameters:
      value - the value for the southNode property
      See Also:
    • getSouthNode

      public final javafx.scene.Node getSouthNode()
      Gets the value of the southNode property.
      Property description:
      This property allows the developer to set a node to the south of the header of this column, where UI can be displayed.
      Returns:
      the value of the southNode property
      See Also:
    • southNodeProperty

      public final javafx.beans.property.ObjectProperty<javafx.scene.Node> southNodeProperty()
      This property allows the developer to set a node to the south of the header of this column, where UI can be displayed.
      Returns:
      the southNode property
      See Also: