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.
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);
| Modifier and Type | Field and Description |
|---|---|
| private final ObjectProperty | southNode
This property allows the developer to set a node to the south of the header of this column, where UI can be displayed. |
| Access | Constructor and Description |
|---|---|
| public | |
| 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 |
| Modifier and Type | Method and Description |
|---|---|
| public final Node | |
| public final void | |
| public final ObjectProperty |
| southNode | back 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. | |
| TableColumn2 | back to summary |
|---|---|
| public TableColumn2() Creates a TableColumn2 control. | |
| TableColumn2 | back to summary |
|---|---|
| public TableColumn2(String text) Creates a TableColumn2 control with the text set to the provided string
| |
| getSouthNode | back to summary |
|---|---|
| public final Node getSouthNode() | |
| setSouthNode | back to summary |
|---|---|
| public final void setSouthNode(Node value) | |
| southNodeProperty | back to summary |
|---|---|
| public final ObjectProperty | |