public abstract static class TreeTableView.TreeTableViewSelectionModel<S> extends TableSelectionModel<TreeItem<S>>
SelectionModel
abstract class to
allow for special support for TreeTableView controls.cellSelectionEnabledProperty
selectionModeProperty
selectedIndexProperty, selectedItemProperty
MultipleSelectionModelBase.SelectedIndicesList, MultipleSelectionModelBase.ShiftParams
Modifier and Type | Field and Description |
---|---|
private TreeTableView<S> |
treeTableView
*
Private fields *
*
|
selectedIndices, selectedItemChange
Constructor and Description |
---|
TreeTableViewSelectionModel(TreeTableView<S> treeTableView)
Builds a default TreeTableViewSelectionModel instance with the provided
TreeTableView.
|
Modifier and Type | Method and Description |
---|---|
void |
focus(int row) |
private void |
focus(int row,
TreeTableColumn<S,?> column)
*
Private implementation *
*
|
private void |
focus(TreeTablePosition<S,?> pos) |
private TreeTablePosition<S,?> |
getFocusedCell() |
int |
getFocusedIndex() |
protected int |
getItemCount()
Returns the number of items in the data model that underpins the control.
|
TreeItem<S> |
getModelItem(int index)
Returns the item at the given index.
|
abstract <any> |
getSelectedCells()
A read-only ObservableList representing the currently selected cells
in this TreeTableView.
|
TreeTableView<S> |
getTreeTableView()
Returns the TreeTableView instance that this selection model is installed in.
|
void |
selectRange(int minRow,
TableColumnBase<TreeItem<S>,?> minColumn,
int maxRow,
TableColumnBase<TreeItem<S>,?> maxColumn)
Selects the cells in the range (minRow, minColumn) to (maxRow, maxColumn),
inclusive.
|
cellSelectionEnabledProperty, clearAndSelect, clearSelection, isCellSelectionEnabled, isSelected, select, selectAboveCell, selectBelowCell, selectLeftCell, selectRightCell, setCellSelectionEnabled
clearAndSelect, clearSelection, clearSelection, getSelectedIndices, getSelectedItems, isAtomic, isEmpty, isSelected, select, select, selectAll, selectFirst, selectIndices, selectLast, selectNext, selectPrevious, shiftSelection, shiftSelection, startAtomic, stopAtomic
getSelectionMode, selectionModeProperty, selectRange, setSelectionMode
getSelectedIndex, getSelectedItem, selectedIndexProperty, selectedItemProperty, setSelectedIndex, setSelectedItem
private final TreeTableView<S> treeTableView
public TreeTableViewSelectionModel(TreeTableView<S> treeTableView)
treeTableView
- The TreeTableView upon which this selection model should
operate.java.lang.NullPointerException
- TreeTableView can not be null.public abstract <any> getSelectedCells()
public TreeTableView<S> getTreeTableView()
public TreeItem<S> getModelItem(int index)
listView.getItems().get(index)
.getModelItem
in class MultipleSelectionModelBase<TreeItem<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<TreeItem<S>>
public void focus(int row)
focus
in class MultipleSelectionModelBase<TreeItem<S>>
public int getFocusedIndex()
getFocusedIndex
in class MultipleSelectionModelBase<TreeItem<S>>
public void selectRange(int minRow, TableColumnBase<TreeItem<S>,?> minColumn, int maxRow, TableColumnBase<TreeItem<S>,?> maxColumn)
selectRange
in class TableSelectionModel<TreeItem<S>>
minRow
- the minRowminColumn
- the minColumnmaxRow
- the maxRowmaxColumn
- the maxColumnprivate void focus(int row, TreeTableColumn<S,?> column)
private void focus(TreeTablePosition<S,?> pos)
private TreeTablePosition<S,?> getFocusedCell()