Class CustomMultipleSelectionModel<T>
java.lang.Object
javafx.scene.control.SelectionModel<T>
javafx.scene.control.MultipleSelectionModel<T>
com.dlsc.gemsfx.util.CustomMultipleSelectionModel<T>
- Type Parameters:
T- the type of the items contained in the selection model.
public class CustomMultipleSelectionModel<T>
extends javafx.scene.control.MultipleSelectionModel<T>
CustomMultipleSelectionModel allows for managing the selection state of items in an ObservableList.
It extends from MultipleSelectionModel and adds functionality to maintain a weak reference to the
items list, facilitating the handling of list changes and ensuring selection consistency.
-
Property Summary
PropertiesProperties inherited from class javafx.scene.control.MultipleSelectionModel
selectionModeProperties inherited from class javafx.scene.control.SelectionModel
selectedIndex, selectedItem -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclearAndSelect(int index) voidvoidclearSelection(int index) final javafx.collections.ObservableList<T> getItems()Gets the value of theitemsproperty.javafx.collections.ObservableList<Integer> javafx.collections.ObservableList<T> booleanisEmpty()booleanisSelected(int index) final javafx.beans.property.ListProperty<T> voidselect(int index) voidvoidvoidvoidselectIndices(int index, int... indices) voidvoidvoidfinal voidSets the value of theitemsproperty.Methods inherited from class javafx.scene.control.MultipleSelectionModel
getSelectionMode, selectionModeProperty, selectRange, setSelectionModeMethods inherited from class javafx.scene.control.SelectionModel
getSelectedIndex, getSelectedItem, selectedIndexProperty, selectedItemProperty, setSelectedIndex, setSelectedItem
-
Property Details
-
items
- See Also:
-
-
Constructor Details
-
CustomMultipleSelectionModel
public CustomMultipleSelectionModel()
-
-
Method Details
-
getItems
Gets the value of theitemsproperty.- Property description:
- Returns:
- the value of the
itemsproperty - See Also:
-
setItems
Sets the value of theitemsproperty.- Property description:
- Parameters:
value- the value for theitemsproperty- See Also:
-
itemsProperty
- Returns:
- the
itemsproperty - See Also:
-
getSelectedIndices
-
getSelectedItems
-
selectIndices
public void selectIndices(int index, int... indices) - Specified by:
selectIndicesin classjavafx.scene.control.MultipleSelectionModel<T>
-
selectAll
public void selectAll()- Specified by:
selectAllin classjavafx.scene.control.MultipleSelectionModel<T>
-
clearAndSelect
public void clearAndSelect(int index) - Specified by:
clearAndSelectin classjavafx.scene.control.SelectionModel<T>
-
select
public void select(int index) - Specified by:
selectin classjavafx.scene.control.SelectionModel<T>
-
select
-
clearSelection
public void clearSelection(int index) - Specified by:
clearSelectionin classjavafx.scene.control.SelectionModel<T>
-
clearSelection
public void clearSelection()- Specified by:
clearSelectionin classjavafx.scene.control.SelectionModel<T>
-
isSelected
public boolean isSelected(int index) - Specified by:
isSelectedin classjavafx.scene.control.SelectionModel<T>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin classjavafx.scene.control.SelectionModel<T>
-
selectPrevious
public void selectPrevious()- Specified by:
selectPreviousin classjavafx.scene.control.SelectionModel<T>
-
selectNext
public void selectNext()- Specified by:
selectNextin classjavafx.scene.control.SelectionModel<T>
-
selectFirst
public void selectFirst()- Specified by:
selectFirstin classjavafx.scene.control.MultipleSelectionModel<T>
-
selectLast
public void selectLast()- Specified by:
selectLastin classjavafx.scene.control.MultipleSelectionModel<T>
-