Class SimpleListModel<T,E extends DetailModel<T>>
java.lang.Object
cz.masci.springfx.mvci.model.list.SimpleListModel<T,E>
- Type Parameters:
T- The type of the elements in the list.E- The type of theDetailModel<T>which extends.
- All Implemented Interfaces:
Focusable,ListModel<E>,Removable<E>,Selectable<E>,Updatable
public class SimpleListModel<T,E extends DetailModel<T>>
extends Object
implements ListModel<E>, Focusable
SimpleListModel is a generic implementation of the ListModel interface and the Focusable interface.
It provides basic functionality for managing a list of elements and interacting with them.
-
Property Summary
Properties -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final DirtyListProperty<E>protected Runnableprotected Runnableprotected final org.reactfx.value.Var<E> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidRuns predefined command set byFocusable.setOnFocusView(java.lang.Runnable).javafx.collections.ObservableList<E>Returns elementsvoidremoveElement(E element) Runs predefined command set byRemovable.setOnRemoveElement(java.util.function.Consumer<E>)org.reactfx.value.Var<E>Returns selected element propertyvoidselectElement(E item) Runs the predefined command set bySelectable.setOnSelectElement(java.util.function.Consumer<E>)voidRuns predefined command set byUpdatable.setOnUpdateElementsProperty(java.lang.Runnable)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface cz.masci.springfx.mvci.model.list.Focusable
setOnFocusViewMethods inherited from interface cz.masci.springfx.mvci.model.list.Removable
setOnRemoveElementMethods inherited from interface cz.masci.springfx.mvci.model.list.Selectable
setOnSelectElementMethods inherited from interface cz.masci.springfx.mvci.model.list.Updatable
setOnUpdateElementsProperty
-
Property Details
-
selectedElement
- Specified by:
selectedElementPropertyin interfaceSelectable<T>
-
-
Field Details
-
elements
-
selectedElement
-
onSelectElement
-
onUpdateElementsProperty
-
onRemoveElement
-
onFocusView
-
-
Constructor Details
-
SimpleListModel
public SimpleListModel()
-
-
Method Details
-
getElements
Description copied from interface:SelectableReturns elements- Specified by:
getElementsin interfaceSelectable<T>
-
selectedElementProperty
Description copied from interface:SelectableReturns selected element property- Specified by:
selectedElementPropertyin interfaceSelectable<T>
-
removeElement
Description copied from interface:RemovableRuns predefined command set byRemovable.setOnRemoveElement(java.util.function.Consumer<E>)- Specified by:
removeElementin interfaceRemovable<T>
-
updateElementsProperty
public void updateElementsProperty()Description copied from interface:UpdatableRuns predefined command set byUpdatable.setOnUpdateElementsProperty(java.lang.Runnable)- Specified by:
updateElementsPropertyin interfaceUpdatable
-
selectElement
Description copied from interface:SelectableRuns the predefined command set bySelectable.setOnSelectElement(java.util.function.Consumer<E>)- Specified by:
selectElementin interfaceSelectable<T>
-
focusView
public void focusView()Description copied from interface:FocusableRuns predefined command set byFocusable.setOnFocusView(java.lang.Runnable).
-