APIdia Launch Partner
Top Description Fields Constructors Methods
javafx.scene.control

public abstract Class TablePositionBase<TC extends TableColumnBase<S, T>>

extends Object
Class Inheritance
Known Direct Subclasses
javafx.scene.control.TreeTablePosition, javafx.scene.control.TablePosition
Type Parameters
<TC>
the type of the TableColumnBase
Imports
java.lang.ref.WeakReference

This class is used to represent a single row/column/cell in a table. Concrete subclasses of this abstract class are used in the TableView and TreeTableView APIs 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 and TreeTableView controls can have different selection modes, the row and column properties in TablePositionBase 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
TablePosition, TreeTablePosition

Field Summary

Modifier and TypeField and Description
private final int
private final WeakReference<TC>

Constructor Summary

AccessConstructor and Description
protected
TablePositionBase(int
The row that this TablePosition is representing.
row
,
TC
The TableColumn instance that this TablePosition represents.
tableColumn
)

Constructs a TablePositionBase instance to represent the given row/column position in the underlying table instance (which is not part of the abstract TablePositionBase class, but is part of concrete subclasses such as TablePosition and TreeTablePosition).

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if this object is equal to the obj argument; false otherwise.
equals
(Object
the reference object with which to compare.
obj
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

public abstract int

Returns:

the column index that this TablePosition represents in the TableView
getColumn
()

The column index that this TablePosition represents in the TableView.

public int

Returns:

the row that this TablePosition represents in the TableView
getRow
()

The row that this TablePosition represents in the TableView.

public TC

Returns:

the TableColumn that this TablePosition represents in the TableView
getTableColumn
()

The TableColumn that this TablePosition represents in the TableView.

public int

Returns:

a hash code for this TablePosition object.
hashCode
()

Overrides java.lang.Object.hashCode.

Returns a hash code for this TablePosition object.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAlltoStringwaitwaitwait

Field Detail

rowback to summary
private final int row
tableColumnRefback to summary
private final WeakReference<TC> tableColumnRef

Constructor Detail

TablePositionBaseback to summary
protected TablePositionBase(int row, TC tableColumn)

Constructs a TablePositionBase instance to represent the given row/column position in the underlying table instance (which is not part of the abstract TablePositionBase class, but is part of concrete subclasses such as TablePosition and TreeTablePosition). In all cases, all fields inside TablePositionBase instances are referenced weakly so as to prevent memory leaks. This means that it is possible (but unlikely) that the get methods will return null.

Parameters
row:int

The row that this TablePosition is representing.

tableColumn:TC

The TableColumn instance that this TablePosition represents.

Method Detail

equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

Parameters
obj:Object

the reference object with which to compare.

Returns:boolean

true if this object is equal to the obj argument; false otherwise.

Annotations
@Override
getColumnback to summary
public abstract int getColumn()

The column index that this TablePosition represents in the TableView. It is -1 if the TableView or TableColumn instances are null.

Returns:int

the column index that this TablePosition represents in the TableView

getRowback to summary
public int getRow()

The row that this TablePosition represents in the TableView.

Returns:int

the row that this TablePosition represents in the TableView

getTableColumnback to summary
public TC getTableColumn()

The TableColumn that this TablePosition represents in the TableView.

Returns:TC

the TableColumn that this TablePosition represents in the TableView

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code for this TablePosition object.

Returns:int

a hash code for this TablePosition object.

Annotations
@Override