static class ListView.ListViewFocusModel<T> extends FocusModel<T>
focusedIndexProperty, focusedItemProperty
Modifier and Type | Field and Description |
---|---|
private int |
itemCount |
private <any> |
itemsContentListener |
private InvalidationListener |
itemsObserver |
private ListView<T> |
listView |
private <any> |
weakItemsContentListener |
Constructor and Description |
---|
ListViewFocusModel(ListView<T> listView) |
Modifier and Type | Method and Description |
---|---|
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.
|
private boolean |
isEmpty() |
private void |
updateDefaultFocus() |
private void |
updateItemCount() |
private void |
updateItemsObserver(<any> oldList,
<any> newList) |
focus, focusedIndexProperty, focusedItemProperty, focusNext, focusPrevious, getFocusedIndex, getFocusedItem, isFocused, setFocusedIndex, setFocusedItem
private int itemCount
private final InvalidationListener itemsObserver
private final <any> itemsContentListener
private <any> weakItemsContentListener
private void updateItemsObserver(<any> oldList, <any> newList)
protected int getItemCount()
FocusModel
listView.getItems().size()
. The valid range of focusable
indices is between 0 and whatever is returned by this method.getItemCount
in class FocusModel<T>
protected T getModelItem(int index)
FocusModel
listView.getItems().get(index)
.getModelItem
in class FocusModel<T>
index
- The index of the item that is requested from the underlying
data model.private boolean isEmpty()
private void updateItemCount()
private void updateDefaultFocus()