Class TreeSelectionModel<T>

java.lang.Object
io.github.palexdev.materialfx.selection.TreeSelectionModel<T>
All Implemented Interfaces:
ITreeSelectionModel<T>
Direct Known Subclasses:
TreeCheckModel

public class TreeSelectionModel<T>
extends Object
implements ITreeSelectionModel<T>
Concrete implementation of the ITreeSelectionModel interface.

This provides common methods for items selection.

To select an item it should call the TreeSelectionModel associated with the tree which contains the item with AbstractMFXTreeItem.getSelectionModel() and call the select(AbstractMFXTreeItem, MouseEvent) method. In the constructor a listener is added to the ListProperty of this class, which contains all the selected items, and its role is to change the selected property of the item.