public abstract static class TableView.TableViewSelectionModel<S> extends TableSelectionModel<S>
SelectionModel abstract class to
allow for special support for TableView controls.MultipleSelectionModelBase.BitSetReadOnlyUnbackedObservableList, MultipleSelectionModelBase.ShiftParams| Modifier and Type | Field and Description |
|---|---|
(package private) boolean |
blockFocusCall |
private TableView<S> |
tableView
*
Private fields *
*
|
selectedIndices, selectedIndicesSeq, selectedItemChange| Constructor and Description |
|---|
TableViewSelectionModel(TableView<S> tableView)
Builds a default TableViewSelectionModel instance with the provided
TableView.
|
| Modifier and Type | Method and Description |
|---|---|
abstract void |
clearAndSelect(int row,
TableColumn<S,?> column)
Clears all selection, and then selects the cell at the given row/column
intersection.
|
void |
clearAndSelect(int row,
TableColumnBase<S,?> column)
Clears all selection, and then selects the cell at the given row/column
intersection.
|
abstract void |
clearSelection(int row,
TableColumn<S,?> column)
Removes selection from the specified row/column position (in view indexes).
|
void |
clearSelection(int row,
TableColumnBase<S,?> column)
Removes selection from the specified row/column position (in view indexes).
|
void |
focus(int row) |
(package private) void |
focus(int row,
TableColumn<S,?> column)
*
Private implementation *
*
|
(package private) void |
focus(TablePosition<S,?> pos) |
(package private) TablePosition<S,?> |
getFocusedCell() |
int |
getFocusedIndex() |
protected int |
getItemCount()
Returns the number of items in the data model that underpins the control.
|
protected S |
getModelItem(int index)
Returns the item at the given index.
|
abstract ObservableList<TablePosition> |
getSelectedCells()
A read-only ObservableList representing the currently selected cells
in this TableView.
|
protected java.util.List<S> |
getTableModel()
Convenience method that returns getTableView().getItems().
|
TableView<S> |
getTableView()
Returns the TableView instance that this selection model is installed in.
|
abstract boolean |
isSelected(int row,
TableColumn<S,?> column)
Convenience function which tests whether the given row and column index
is currently selected in this table instance.
|
boolean |
isSelected(int row,
TableColumnBase<S,?> column)
Convenience function which tests whether the given row and column index
is currently selected in this table instance.
|
abstract void |
select(int row,
TableColumn<S,?> column)
Selects the cell at the given row/column intersection.
|
void |
select(int row,
TableColumnBase<S,?> column)
Selects the cell at the given row/column intersection.
|
void |
selectRange(int minRow,
TableColumnBase<S,?> minColumn,
int maxRow,
TableColumnBase<S,?> maxColumn)
Selects the cells in the range (minRow, minColumn) to (maxRow, maxColumn),
inclusive.
|
cellSelectionEnabledProperty, isCellSelectionEnabled, selectAboveCell, selectBelowCell, selectLeftCell, selectRightCell, setCellSelectionEnabledclearAndSelect, clearSelection, clearSelection, createRangeChange, getSelectedIndices, getSelectedItems, isAtomic, isEmpty, isSelected, select, select, selectAll, selectFirst, selectIndices, selectLast, selectNext, selectPrevious, shiftSelection, startAtomic, stopAtomicgetSelectionMode, selectionModeProperty, selectRange, setSelectionModegetSelectedIndex, getSelectedItem, selectedIndexProperty, selectedItemProperty, setSelectedIndex, setSelectedItempublic TableViewSelectionModel(TableView<S> tableView)
tableView - The TableView upon which this selection model should
operate.java.lang.NullPointerException - TableView can not be null.public abstract ObservableList<TablePosition> getSelectedCells()
public boolean isSelected(int row,
TableColumnBase<S,?> column)
isSelected in class TableSelectionModel<S>public abstract boolean isSelected(int row,
TableColumn<S,?> column)
public void select(int row,
TableColumnBase<S,?> column)
select in class TableSelectionModel<S>public abstract void select(int row,
TableColumn<S,?> column)
public void clearAndSelect(int row,
TableColumnBase<S,?> column)
clearAndSelect in class TableSelectionModel<S>public abstract void clearAndSelect(int row,
TableColumn<S,?> column)
public void clearSelection(int row,
TableColumnBase<S,?> column)
clearSelection in class TableSelectionModel<S>public abstract void clearSelection(int row,
TableColumn<S,?> column)
public void selectRange(int minRow,
TableColumnBase<S,?> minColumn,
int maxRow,
TableColumnBase<S,?> maxColumn)
selectRange in class TableSelectionModel<S>public TableView<S> getTableView()
protected java.util.List<S> getTableModel()
protected S getModelItem(int index)
listView.getItems().get(index).getModelItem in class MultipleSelectionModelBase<S>index - The index of the item that is requested from the underlying
data model.protected int getItemCount()
listView.getItems().size(). The valid range of selectable
indices is between 0 and whatever is returned by this method.getItemCount in class MultipleSelectionModelBase<S>public void focus(int row)
focus in class MultipleSelectionModelBase<S>public int getFocusedIndex()
getFocusedIndex in class MultipleSelectionModelBase<S>void focus(int row,
TableColumn<S,?> column)
void focus(TablePosition<S,?> pos)
TablePosition<S,?> getFocusedCell()