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

public abstract Class TableSelectionModel<T>

extends MultipleSelectionModelBase<T>
Class Inheritance
Known Direct Subclasses
javafx.scene.control.TableView.TableViewSelectionModel, javafx.scene.control.TreeTableView.TreeTableViewSelectionModel
Type Parameters
<T>
The type of the underlying data model for the UI control.
Imports
javafx.beans.property.BooleanProperty, .SimpleBooleanProperty

The abstract base class for MultipleSelectionModel implementations that are used within table-like controls (most notably TableView and TreeTableView).
Since
JavaFX 8.0

Field Summary

Modifier and TypeField and Description
private BooleanProperty
cellSelectionEnabled

A boolean property used to represent whether the table is in row or cell selection modes.

Inherited from javafx.scene.control.MultipleSelectionModelBase:
selectedIndicesselectedItemChange

Constructor Summary

AccessConstructor and Description
public
TableSelectionModel()

Constructor for subclasses to call.

Method Summary

Modifier and TypeMethod and Description
public final BooleanProperty
public abstract void
clearAndSelect(int
the row
row
,
TableColumnBase<T, ?>
the column
column
)

Clears all selection, and then selects the cell at the given row/column intersection.

public abstract void
clearSelection(int
the row
row
,
TableColumnBase<T, ?>
the column
column
)

Removes selection from the specified row/column position (in view indexes).

public final boolean
public abstract boolean

Returns:

true if the given row and column index is currently selected in this table instance
isSelected
(int
the row
row
,
TableColumnBase<T, ?>
the column
column
)

Convenience function which tests whether the given row and column index is currently selected in this table instance.

public abstract void
select(int
the row
row
,
TableColumnBase<T, ?>
the column
column
)

Selects the cell at the given row/column intersection.

public abstract void
selectAboveCell()

Selects the cell directly above the currently selected cell.

public abstract void
selectBelowCell()

Selects the cell directly below the currently selected cell.

public abstract void
selectLeftCell()

Selects the cell to the left of the currently selected cell.

public abstract void
selectRange(int
the minRow
minRow
,
TableColumnBase<T, ?>
the minColumn
minColumn
,
int
the maxRow
maxRow
,
TableColumnBase<T, ?>
the maxColumn
maxColumn
)

Selects the cells in the range (minRow, minColumn) to (maxRow, maxColumn), inclusive.

public abstract void
selectRightCell()

Selects the cell to the right of the currently selected cell.

public final void
setCellSelectionEnabled(boolean value)

Inherited from javafx.scene.control.MultipleSelectionModelBase:
clearAndSelectclearSelectionclearSelectionfocusgetFocusedIndexgetItemCountgetModelItemgetSelectedIndicesgetSelectedItemsisAtomicisEmptyisSelectedselectselectselectAllselectFirstselectIndicesselectLastselectNextselectPreviousshiftSelectionshiftSelectionstartAtomicstopAtomic

Field Detail

cellSelectionEnabledback to summary
private BooleanProperty cellSelectionEnabled

A boolean property used to represent whether the table is in row or cell selection modes. By default a table is in row selection mode which means that individual cells can not be selected. Setting cellSelectionEnabled to be true results in cells being able to be selected (but not rows).

Constructor Detail

TableSelectionModelback to summary
public TableSelectionModel()

Constructor for subclasses to call.

Method Detail

cellSelectionEnabledPropertyback to summary
public final BooleanProperty cellSelectionEnabledProperty()
clearAndSelectback to summary
public abstract void clearAndSelect(int row, TableColumnBase<T, ?> column)

Clears all selection, and then selects the cell at the given row/column intersection. If the table control is in its 'cell selection' mode (where individual cells can be selected, rather than entire rows), and if the column argument is null, this method should select all cells in the given row.

Parameters
row:int

the row

column:TableColumnBase<T, ?>

the column

clearSelectionback to summary
public abstract void clearSelection(int row, TableColumnBase<T, ?> column)

Removes selection from the specified row/column position (in view indexes). If this particular cell (or row if the column value is -1) is not selected, nothing happens. If the table control is in its 'cell selection' mode (where individual cells can be selected, rather than entire rows), and if the column argument is null, this method should deselect all cells in the given row.

Parameters
row:int

the row

column:TableColumnBase<T, ?>

the column

isCellSelectionEnabledback to summary
public final boolean isCellSelectionEnabled()
isSelectedback to summary
public abstract boolean isSelected(int row, TableColumnBase<T, ?> column)

Convenience function which tests whether the given row and column index is currently selected in this table instance. If the table control is in its 'cell selection' mode (where individual cells can be selected, rather than entire rows), and if the column argument is null, this method should return true only if all cells in the given row are selected.

Parameters
row:int

the row

column:TableColumnBase<T, ?>

the column

Returns:boolean

true if the given row and column index is currently selected in this table instance

selectback to summary
public abstract void select(int row, TableColumnBase<T, ?> column)

Selects the cell at the given row/column intersection. If the table control is in its 'cell selection' mode (where individual cells can be selected, rather than entire rows), and if the column argument is null, this method should select all cells in the given row.

Parameters
row:int

the row

column:TableColumnBase<T, ?>

the column

selectAboveCellback to summary
public abstract void selectAboveCell()

Selects the cell directly above the currently selected cell.

selectBelowCellback to summary
public abstract void selectBelowCell()

Selects the cell directly below the currently selected cell.

selectLeftCellback to summary
public abstract void selectLeftCell()

Selects the cell to the left of the currently selected cell.

selectRangeback to summary
public abstract void selectRange(int minRow, TableColumnBase<T, ?> minColumn, int maxRow, TableColumnBase<T, ?> maxColumn)

Selects the cells in the range (minRow, minColumn) to (maxRow, maxColumn), inclusive.

Parameters
minRow:int

the minRow

minColumn:TableColumnBase<T, ?>

the minColumn

maxRow:int

the maxRow

maxColumn:TableColumnBase<T, ?>

the maxColumn

selectRightCellback to summary
public abstract void selectRightCell()

Selects the cell to the right of the currently selected cell.

setCellSelectionEnabledback to summary
public final void setCellSelectionEnabled(boolean value)