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

    Properties
    Type
    Property
    Description
    final javafx.beans.property.ListProperty<T>
     

    Properties inherited from class javafx.scene.control.MultipleSelectionModel

    selectionMode

    Properties inherited from class javafx.scene.control.SelectionModel

    selectedIndex, selectedItem
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    clearAndSelect(int index)
     
    void
     
    void
    clearSelection(int index)
     
    final javafx.collections.ObservableList<T>
    Gets the value of the items property.
    javafx.collections.ObservableList<Integer>
     
    javafx.collections.ObservableList<T>
     
    boolean
     
    boolean
    isSelected(int index)
     
    final javafx.beans.property.ListProperty<T>
     
    void
    select(int index)
     
    void
    select(T obj)
     
    void
     
    void
     
    void
    selectIndices(int index, int... indices)
     
    void
     
    void
     
    void
     
    final void
    setItems(javafx.collections.ObservableList<T> value)
    Sets the value of the items property.

    Methods inherited from class javafx.scene.control.MultipleSelectionModel

    getSelectionMode, selectionModeProperty, selectRange, setSelectionMode

    Methods inherited from class javafx.scene.control.SelectionModel

    getSelectedIndex, getSelectedItem, selectedIndexProperty, selectedItemProperty, setSelectedIndex, setSelectedItem

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Property Details

  • Constructor Details

    • CustomMultipleSelectionModel

      public CustomMultipleSelectionModel()
  • Method Details

    • getItems

      public final javafx.collections.ObservableList<T> getItems()
      Gets the value of the items property.
      Property description:
      Returns:
      the value of the items property
      See Also:
    • setItems

      public final void setItems(javafx.collections.ObservableList<T> value)
      Sets the value of the items property.
      Property description:
      Parameters:
      value - the value for the items property
      See Also:
    • itemsProperty

      public final javafx.beans.property.ListProperty<T> itemsProperty()
      Returns:
      the items property
      See Also:
    • getSelectedIndices

      public javafx.collections.ObservableList<Integer> getSelectedIndices()
      Specified by:
      getSelectedIndices in class javafx.scene.control.MultipleSelectionModel<T>
    • getSelectedItems

      public javafx.collections.ObservableList<T> getSelectedItems()
      Specified by:
      getSelectedItems in class javafx.scene.control.MultipleSelectionModel<T>
    • selectIndices

      public void selectIndices(int index, int... indices)
      Specified by:
      selectIndices in class javafx.scene.control.MultipleSelectionModel<T>
    • selectAll

      public void selectAll()
      Specified by:
      selectAll in class javafx.scene.control.MultipleSelectionModel<T>
    • clearAndSelect

      public void clearAndSelect(int index)
      Specified by:
      clearAndSelect in class javafx.scene.control.SelectionModel<T>
    • select

      public void select(int index)
      Specified by:
      select in class javafx.scene.control.SelectionModel<T>
    • select

      public void select(T obj)
      Specified by:
      select in class javafx.scene.control.SelectionModel<T>
    • clearSelection

      public void clearSelection(int index)
      Specified by:
      clearSelection in class javafx.scene.control.SelectionModel<T>
    • clearSelection

      public void clearSelection()
      Specified by:
      clearSelection in class javafx.scene.control.SelectionModel<T>
    • isSelected

      public boolean isSelected(int index)
      Specified by:
      isSelected in class javafx.scene.control.SelectionModel<T>
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in class javafx.scene.control.SelectionModel<T>
    • selectPrevious

      public void selectPrevious()
      Specified by:
      selectPrevious in class javafx.scene.control.SelectionModel<T>
    • selectNext

      public void selectNext()
      Specified by:
      selectNext in class javafx.scene.control.SelectionModel<T>
    • selectFirst

      public void selectFirst()
      Specified by:
      selectFirst in class javafx.scene.control.MultipleSelectionModel<T>
    • selectLast

      public void selectLast()
      Specified by:
      selectLast in class javafx.scene.control.MultipleSelectionModel<T>