Top Description Fields Constructors Methods
javafx.scene.control

public Class TreeTablePosition<S, T>

extends TablePositionBase<TreeTableColumn<S, T>>
Class Inheritance
Type Parameters
<S>
The type of the TreeItem instances contained within the TreeTableView.
<T>
The type of the items contained within the TreeTableColumn.
Imports
java.lang.ref.WeakReference, javafx.beans.NamedArg

This class is used to represent a single row/column/cell in a TreeTableView. This is used throughout the TreeTableView API to represent which rows/columns/cells are currently selected, focused, being edited, etc. Note that this class is immutable once it is created.

Because the TreeTableView can have different selection modes, the row and column properties in TablePosition can be 'disabled' to represent an entire row or column. This is done by setting the unrequired property to -1 or null.

Since
JavaFX 8.0
See Also
TreeTableView, TreeTableColumn

Field Summary

Modifier and TypeField and Description
private final WeakReference<TreeTableView<S>>
pack-priv int
private final int
private final WeakReference<TreeItem<S>>

Constructor Summary

AccessConstructor and Description
public
TreeTablePosition(TreeTableView<S>
The TreeTableView that this position is related to.
treeTableView
,
int
The row that this TreeTablePosition is representing.
row
,
TreeTableColumn<S, T>
The TreeTableColumn instance that this TreeTablePosition represents.
tableColumn
)

Constructs a TreeTablePosition instance to represent the given row/column position in the given TreeTableView instance.

pack-priv
TreeTablePosition(TreeTableView<S> treeTableView, int row, TreeTableColumn<S, T> tableColumn, boolean doLookup)

pack-priv

Method Summary

Modifier and TypeMethod and Description
public int
getColumn()

Implements abstract javafx.scene.control.TablePositionBase.getColumn.

The column index that this TreeTablePosition represents in the TreeTableView.

public final TreeTableColumn<S, T>
getTableColumn()

Overrides javafx.scene.control.TablePositionBase.getTableColumn.

The TableColumn that this TablePosition represents in the TableView.

public final TreeItem<S>

Returns:

the TreeItem that backs the getRow() row}
getTreeItem
()

Returns the TreeItem that backs the getRow() row}.

public final TreeTableView<S>

Returns:

the TreeTableView that this TreeTablePosition is related to
getTreeTableView
()

The TreeTableView that this TreeTablePosition is related to.

Inherited from javafx.scene.control.TablePositionBase:
equalsgetRowhashCode

Field Detail

controlRefback to summary
private final WeakReference<TreeTableView<S>> controlRef
fixedColumnIndexback to summary
pack-priv int fixedColumnIndex
nonFixedColumnIndexback to summary
private final int nonFixedColumnIndex
treeItemRefback to summary
private final WeakReference<TreeItem<S>> treeItemRef

Constructor Detail

TreeTablePositionback to summary
public TreeTablePosition(TreeTableView<S> treeTableView, int row, TreeTableColumn<S, T> tableColumn)

Constructs a TreeTablePosition instance to represent the given row/column position in the given TreeTableView instance. Both the TreeTableView and TreeTableColumn are referenced weakly in this class, so it is possible that they will be null when their respective getters are called.

Parameters
treeTableView:TreeTableView<S>

The TreeTableView that this position is related to.

row:int

The row that this TreeTablePosition is representing.

tableColumn:TreeTableColumn<S, T>

The TreeTableColumn instance that this TreeTablePosition represents.

TreeTablePositionback to summary
pack-priv TreeTablePosition(TreeTableView<S> treeTableView, int row, TreeTableColumn<S, T> tableColumn, boolean doLookup)
TreeTablePositionback to summary
pack-priv TreeTablePosition(TreeTablePosition<S, T> pos, int row)

Method Detail

getColumnback to summary
public int getColumn()

Implements abstract javafx.scene.control.TablePositionBase.getColumn.

The column index that this TreeTablePosition represents in the TreeTableView. It is -1 if the TreeTableView or TreeTableColumn instances are null at the time the class is instantiated (i.e. it is computed at construction).

Annotations
@Override
getTableColumnback to summary
public final TreeTableColumn<S, T> getTableColumn()

Overrides javafx.scene.control.TablePositionBase.getTableColumn.

Doc from javafx.scene.control.TablePositionBase.getTableColumn.

The TableColumn that this TablePosition represents in the TableView.

Annotations
@Override
getTreeItemback to summary
public final TreeItem<S> getTreeItem()

Returns the TreeItem that backs the getRow() row}.

Returns:TreeItem<S>

the TreeItem that backs the getRow() row}

getTreeTableViewback to summary
public final TreeTableView<S> getTreeTableView()

The TreeTableView that this TreeTablePosition is related to.

Returns:TreeTableView<S>

the TreeTableView that this TreeTablePosition is related to