SingleSelectionModel
The selection model used by ListView and TreeView.
NOTE. selectedIndexProperty and selectedItemProperty should change atomically. i.e. when one value changes, the other value must change too, without a period of time when the application can see an inconstancy between them.
T is the type of the elements in the items. If T is nullable, then extra care must be taken when using selectedItem. Change the selection to none
, by setting selectedIndex to -1, rather than setting selectedItem to null. When reading selectedIndex, a null
value has an indeterminate meaning (either no selection, or null
is selected).