Top Description Fields Constructors Methods
org.controlsfx.control.tableview2

public Class TableColumn2<S, T>

extends TableColumn<S, T>
Class Inheritance
Known Direct Subclasses
org.controlsfx.control.tableview2.FilteredTableColumn
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
Imports
javafx.beans.property.ObjectProperty, .SimpleObjectProperty, javafx.scene.Node, javafx.scene.control.TableColumn

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);

Field Summary

Modifier and TypeField and Description
private final ObjectProperty<Node>
southNode

This property allows the developer to set a node to the south of the header of this column, where UI can be displayed.

Inherited from javafx.scene.control.TableColumn:
DEFAULT_CELL_FACTORY

Constructor Summary

AccessConstructor and Description
public
TableColumn2()

Creates a TableColumn2 control.

public
TableColumn2(String
The string to show when the TableColumn2 is placed within the TableView2.
text
)

Creates a TableColumn2 control with the text set to the provided string

Method Summary

Modifier and TypeMethod and Description
public final Node
public final void
public final ObjectProperty<Node>
Inherited from javafx.scene.control.TableColumn:
cellFactoryPropertycellValueFactoryPropertyeditAnyEventeditCancelEventeditCommitEventeditStartEventgetCellFactorygetCellObservableValuegetCellObservableValuegetCellValueFactorygetClassCssMetaDatagetColumnsgetCssMetaDatagetOnEditCancelgetOnEditCommitgetOnEditStartgetSortTypegetStyleableNodegetStyleableParentgetTableViewgetTypeSelectoronEditCancelPropertyonEditCommitPropertyonEditStartPropertysetCellFactorysetCellValueFactorysetOnEditCancelsetOnEditCommitsetOnEditStartsetSortTypesortTypePropertytableViewProperty

Field Detail

southNodeback to summary
private final ObjectProperty<Node> southNode

This property allows the developer to set a node to the south of the header of this column, where UI can be displayed.

Constructor Detail

TableColumn2back to summary
public TableColumn2()

Creates a TableColumn2 control.

TableColumn2back to summary
public TableColumn2(String text)

Creates a TableColumn2 control with the text set to the provided string

Parameters
text:String

The string to show when the TableColumn2 is placed within the TableView2.

Method Detail

getSouthNodeback to summary
public final Node getSouthNode()
setSouthNodeback to summary
public final void setSouthNode(Node value)
southNodePropertyback to summary
public final ObjectProperty<Node> southNodeProperty()