static class ListView.ListViewBitSetSelectionModel<T> extends MultipleSelectionModelBase<T>
selectionModeProperty
selectedIndexProperty, selectedItemProperty
MultipleSelectionModelBase.SelectedIndicesList, MultipleSelectionModelBase.ShiftParams
Modifier and Type | Field and Description |
---|---|
private int |
itemCount |
private <any> |
itemsContentObserver |
private InvalidationListener |
itemsObserver |
private ListView<T> |
listView
*
Internal properties *
*
|
private int |
previousModelSize |
private <any> |
weakItemsContentObserver |
selectedIndices, selectedItemChange
Constructor and Description |
---|
ListViewBitSetSelectionModel(ListView<T> listView)
*
Constructors *
*
|
Modifier and Type | Method and Description |
---|---|
void |
clearAndSelect(int row)
A method that clears any selection prior to setting the selection to the
given index.
|
protected void |
focus(int row) |
protected int |
getFocusedIndex() |
protected int |
getItemCount()
Returns the number of items in the data model that underpins the control.
|
protected T |
getModelItem(int index)
Returns the item at the given index.
|
void |
selectAll()
Convenience method to select all available indices.
|
private void |
updateDefaultSelection() |
private void |
updateItemCount()
*
Private implementation *
*
|
private void |
updateItemsObserver(<any> oldList,
<any> newList) |
private void |
updateSelection(<any> c) |
clearSelection, clearSelection, getSelectedIndices, getSelectedItems, isAtomic, isEmpty, isSelected, select, select, selectFirst, selectIndices, selectLast, selectNext, selectPrevious, shiftSelection, shiftSelection, startAtomic, stopAtomic
getSelectionMode, selectionModeProperty, selectRange, setSelectionMode
getSelectedIndex, getSelectedItem, selectedIndexProperty, selectedItemProperty, setSelectedIndex, setSelectedItem
private final <any> itemsContentObserver
private final InvalidationListener itemsObserver
private <any> weakItemsContentObserver
private int itemCount
private int previousModelSize
private void updateSelection(<any> c)
public void selectAll()
Convenience method to select all available indices.
selectAll
in class MultipleSelectionModelBase<T>
public void clearAndSelect(int row)
SelectionModel.clearSelection()
first, meaning that observers that are listening to
the selected index
property will not
see the selected index being temporarily set to -1.clearAndSelect
in class MultipleSelectionModelBase<T>
row
- The index that should be the only selected index in this
selection model.protected void focus(int row)
focus
in class MultipleSelectionModelBase<T>
protected int getFocusedIndex()
getFocusedIndex
in class MultipleSelectionModelBase<T>
protected int getItemCount()
MultipleSelectionModelBase
listView.getItems().size()
. The valid range of selectable
indices is between 0 and whatever is returned by this method.getItemCount
in class MultipleSelectionModelBase<T>
protected T getModelItem(int index)
MultipleSelectionModelBase
listView.getItems().get(index)
.getModelItem
in class MultipleSelectionModelBase<T>
index
- The index of the item that is requested from the underlying
data model.private void updateItemCount()
private void updateItemsObserver(<any> oldList, <any> newList)
private void updateDefaultSelection()