| Modifier and Type | Field and Description |
|---|---|
| private ReadOnlyIntegerWrapper | focusedIndex
The index of the current item in the FocusModel which has the focus. |
| private ReadOnlyObjectWrapper | focusedItem
The current item in the FocusModel which has the focus. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | focus(int
The index of the item to get focus. index)Causes the item at the given index to receive the focus. |
| public final ReadOnlyIntegerProperty | |
| public final ReadOnlyObjectProperty | |
| public void | |
| public void | |
| public final int | |
| public final T | |
| protected abstract int | Returns: the number of items in the data model that underpins the controlReturns the number of items in the data model that underpins the control. |
| protected abstract T | Returns: Returns null if the index is out of bounds, or an element of type T that is related to the given index.The index of the item that is requested from the underlying
data model. index)Returns the item at the given index. |
| public boolean | Returns: True if the given index is focused, false otherwise.The index to check as to whether it is currently focused
or not. index)Convenience method to inform if the given index is currently focused in this SelectionModel. |
| pack-priv final void | |
| pack-priv final void |
| focusedIndex | back to summary |
|---|---|
| private ReadOnlyIntegerWrapper focusedIndex The index of the current item in the FocusModel which has the focus. It is possible that this will be -1, but only if the control is empty. If the control is not itself focused, this property will still reference the row index that would receive the keyboard focus if the control itself were focused. | |
| focusedItem | back to summary |
|---|---|
| private ReadOnlyObjectWrapper<T> focusedItem The current item in the FocusModel which has the focus. It is possible that this will be null, but only if the control is empty. If the control is not itself focused, this property will still reference the item that would receive the keyboard focus if the control itself were focused. | |
| FocusModel | back to summary |
|---|---|
| public FocusModel() Creates a default FocusModel instance. | |
| focus | back to summary |
|---|---|
| public void focus(int index) Causes the item at the given index to receive the focus. This does not
cause the current selection to change. Updates the focusedItem and
focusedIndex properties such that
| |
| focusedIndexProperty | back to summary |
|---|---|
| public final ReadOnlyIntegerProperty focusedIndexProperty() | |
| focusedItemProperty | back to summary |
|---|---|
| public final ReadOnlyObjectProperty | |
| focusNext | back to summary |
|---|---|
| public void focusNext() Attempts to give focus to the row after to the currently focused row. If the current focus owner is the last row, calling this method will have no result. | |
| focusPrevious | back to summary |
|---|---|
| public void focusPrevious() Attempts to give focus to the row previous to the currently focused row. If the current focus owner is the first row, or is -1 (representing that there is no current focus owner), calling this method will have no result. | |
| getFocusedIndex | back to summary |
|---|---|
| public final int getFocusedIndex() | |
| getFocusedItem | back to summary |
|---|---|
| public final T getFocusedItem() | |
| getItemCount | back to summary |
|---|---|
| protected abstract int getItemCount() Returns the number of items in the data model that underpins the control.
An example would be that a ListView focus model would likely return
| |
| getModelItem | back to summary |
|---|---|
| protected abstract T getModelItem(int index) Returns the item at the given index. An example using ListView would be
| |
| isFocused | back to summary |
|---|---|
| public boolean isFocused(int index) Convenience method to inform if the given index is currently focused in this SelectionModel. Is functionally equivalent to calling .
| |
| setFocusedIndex | back to summary |
|---|---|
| pack-priv final void setFocusedIndex(int value) | |
| setFocusedItem | back to summary |
|---|---|
| pack-priv final void setFocusedItem(T value) | |