Introduction

The first column in the tree table view is called "row header". This column is provided by the framework and can not be removed. By default it is used to display row numbers but can be reused for other purposes. The RowHeader class is a subclass of TreeTableColumn with some special logic to it. It supports row resizing and might call back on a factory to produce its graphic.

Row Header Type

The enumerator RowHeaderType defines the different ways the row header can be used.

Value Description
GRAPIC_NODE

Makes the row header cells display a custom node for each row.

LEVEL_NUMBER

Makes the row header cells display the level number of the current row (1, 1.1, 1.2, 2, 2.1, 2.2, 2.3, ...).

ROW_NUMBER

Makes the row header cells display the number of the current row (1, 2, 3, ....).

Row Header Factory

If the graphic node header type is chosen then the row header will call back on the row header node factory that is supplied by the GanttChart class. The following example shows how to register a possible implementation of such a factory.

Row Header Node Factory
ganttChart.setRowHeaderNodeFactory(row -> {
	public Node call(R row) {
		Button delete = new Button("Delete");
		delete.setOnAction(evt -> deleteRow(row));
		return delete;
	}
});
 

Attachments:

header-controls.png (image/png)
header-levels.pg.png (image/png)
header-numbers.png (image/png)