Class BaseListModel<I,E extends DetailModel<I>>

java.lang.Object
cz.masci.springfx.mvci.model.list.impl.BaseListModel<I,E>
Type Parameters:
I - The type of the element id identifier.
E - The type of the elements in the list extending DetailModel<I>.
All Implemented Interfaces:
Elements<E>, Focusable, ListModel<E>, Removable<E>, Selectable<E>, Updatable

public class BaseListModel<I,E extends DetailModel<I>> extends Object implements ListModel<E>, Elements<E>
BaseListModel is a generic implementation of the ListModel and Elements interfaces. It provides basic functionality for managing a list of elements and interacting with them.
  • Property Details

  • Field Details

    • elements

      protected final javafx.collections.ObservableList<E extends DetailModel<I>> elements
    • selectedElement

      protected final org.reactfx.value.Var<E extends DetailModel<I>> selectedElement
    • onSelectElement

      protected Consumer<E extends DetailModel<I>> onSelectElement
    • onUpdateElementsProperty

      protected Runnable onUpdateElementsProperty
    • onRemoveElement

      protected Consumer<E extends DetailModel<I>> onRemoveElement
    • onFocusView

      protected Runnable onFocusView
  • Constructor Details

    • BaseListModel

      public BaseListModel()
    • BaseListModel

      public BaseListModel(javafx.util.Callback<E,javafx.beans.Observable[]> extractor)
  • Method Details

    • getElements

      public javafx.collections.ObservableList<E> getElements()
      Description copied from interface: Elements
      Returns elements
      Specified by:
      getElements in interface Elements<I>
    • selectedElementProperty

      public org.reactfx.value.Var<E> selectedElementProperty()
      Description copied from interface: Selectable
      Returns selected element property
      Specified by:
      selectedElementProperty in interface Selectable<I>
      Returns:
      the selectedElement property
    • remove

      public void remove(E element)
      Specified by:
      remove in interface Removable<I>
    • update

      public void update()
      Specified by:
      update in interface Updatable
    • select

      public void select(E item)
      Specified by:
      select in interface Selectable<I>
    • focus

      public void focus()
      Specified by:
      focus in interface Focusable