Top Description Fields Constructors Methods
javafx.scene.control

public Class TablePosition<S, T>

extends TablePositionBase<TableColumn<S, T>>
Class Inheritance
Type Parameters
<S>
The type of the items contained within the TableView (i.e. the same generic type as the S in TableView<S>).
<T>
The type of the items contained within the TableColumn.
Imports
java.lang.ref.WeakReference, java.util.List, javafx.beans.NamedArg

This class is used to represent a single row/column/cell in a TableView. This is used throughout the TableView 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 TableView 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 2.0
See Also
TableView, TableColumn

Field Summary

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

Constructor Summary

AccessConstructor and Description
public
TablePosition(TableView<S>
The TableView that this position is related to.
tableView
,
int
The row that this TablePosition is representing.
row
,
TableColumn<S, T>
The TableColumn instance that this TablePosition represents.
tableColumn
)

Constructs a TablePosition instance to represent the given row/column position in the given TableView instance.

Method Summary

Modifier and TypeMethod and Description
public int
getColumn()

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

The column index that this TablePosition represents in the TableView.

pack-priv final S
getItem()

Returns the item that backs the getRow() row}, at the point in time when this TablePosition was created.

public final TableColumn<S, T>
getTableColumn()

Overrides javafx.scene.control.TablePositionBase.getTableColumn.

The TableColumn that this TablePosition represents in the TableView.

public final TableView<S>

Returns:

the TableView
getTableView
()

The TableView that this TablePosition is related to.

public String

Returns:

a string representation of this TablePosition object.
toString
()

Overrides java.lang.Object.toString.

Returns a string representation of this TablePosition object.

Inherited from javafx.scene.control.TablePositionBase:
equalsgetRowhashCode

Field Detail

controlRefback to summary
private final WeakReference<TableView<S>> controlRef
fixedColumnIndexback to summary
pack-priv int fixedColumnIndex
itemRefback to summary
private final WeakReference<S> itemRef
nonFixedColumnIndexback to summary
private final int nonFixedColumnIndex

Constructor Detail

TablePositionback to summary
public TablePosition(TableView<S> tableView, int row, TableColumn<S, T> tableColumn)

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

Parameters
tableView:TableView<S>

The TableView that this position is related to.

row:int

The row that this TablePosition is representing.

tableColumn:TableColumn<S, T>

The TableColumn instance that this TablePosition represents.

Method Detail

getColumnback to summary
public int getColumn()

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

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

Returns:int

Doc from javafx.scene.control.TablePositionBase.getColumn.

the column index that this TablePosition represents in the TableView

Annotations
@Override
getItemback to summary
pack-priv final S getItem()

Returns the item that backs the getRow() row}, at the point in time when this TablePosition was created.

getTableColumnback to summary
public final TableColumn<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.

Returns:TableColumn<S, T>

the TableColumn that this TablePosition represents in the TableView

Annotations
@Override
getTableViewback to summary
public final TableView<S> getTableView()

The TableView that this TablePosition is related to.

Returns:TableView<S>

the TableView

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Returns a string representation of this TablePosition object.

Returns:String

a string representation of this TablePosition object.

Annotations
@Override