Class Kanban.KanbanSingleSelectionModel<T>

java.lang.Object
io.jmix.kanbanflowui.component.Kanban.KanbanSingleSelectionModel<T>
Type Parameters:
T - the kanban items type
All Implemented Interfaces:
com.vaadin.flow.data.selection.SelectionModel<Kanban<T>,T>, com.vaadin.flow.data.selection.SelectionModel.Single<Kanban<T>,T>, KanbanSelectionModel<T>, Serializable
Enclosing class:
Kanban<T>

public static class Kanban.KanbanSingleSelectionModel<T> extends Object implements KanbanSelectionModel<T>
The server-side implementation of the interface that controls Kanban's selection state.
See Also:
  • Field Details

    • kanban

      protected final Kanban<T> kanban
    • selectedItem

      protected T selectedItem
    • deselectAllowed

      protected boolean deselectAllowed
  • Constructor Details

    • KanbanSingleSelectionModel

      public KanbanSingleSelectionModel(Kanban<T> kanban)
  • Method Details

    • selectFromClient

      public void selectFromClient(@Nullable T item)
      Description copied from interface: KanbanSelectionModel
      Handles the selection of an item that originates from the client.
      Specified by:
      selectFromClient in interface KanbanSelectionModel<T>
      Parameters:
      item - the item being selected
    • deselectFromClient

      public void deselectFromClient(T item)
      Description copied from interface: KanbanSelectionModel
      Handles the deselection of an item that originates from the client.
      Specified by:
      deselectFromClient in interface KanbanSelectionModel<T>
      Parameters:
      item - the item being deselected
    • select

      public void select(@Nullable T item)
      Specified by:
      select in interface com.vaadin.flow.data.selection.SelectionModel<Kanban<T>,T>
      Specified by:
      select in interface com.vaadin.flow.data.selection.SelectionModel.Single<Kanban<T>,T>
    • getSelectedItem

      public Optional<T> getSelectedItem()
      Specified by:
      getSelectedItem in interface com.vaadin.flow.data.selection.SelectionModel.Single<Kanban<T>,T>
    • setDeselectAllowed

      public void setDeselectAllowed(boolean deselectAllowed)
      Specified by:
      setDeselectAllowed in interface com.vaadin.flow.data.selection.SelectionModel.Single<Kanban<T>,T>
    • isDeselectAllowed

      public boolean isDeselectAllowed()
      Specified by:
      isDeselectAllowed in interface com.vaadin.flow.data.selection.SelectionModel.Single<Kanban<T>,T>
    • deselect

      public void deselect(T item)
      Specified by:
      deselect in interface com.vaadin.flow.data.selection.SelectionModel<Kanban<T>,T>
    • isSelected

      public boolean isSelected(@Nullable T item)
      Specified by:
      isSelected in interface com.vaadin.flow.data.selection.SelectionModel<Kanban<T>,T>
    • addSelectionListener

      public com.vaadin.flow.shared.Registration addSelectionListener(com.vaadin.flow.data.selection.SelectionListener<Kanban<T>,T> listener)
      Specified by:
      addSelectionListener in interface com.vaadin.flow.data.selection.SelectionModel<Kanban<T>,T>
    • getKanban

      protected Kanban<T> getKanban()
    • doSelect

      protected void doSelect(@Nullable T item, boolean userOriginated)
    • fireSelectionEvent

      protected void fireSelectionEvent(com.vaadin.flow.data.selection.SelectionEvent<Kanban<T>,T> event)
    • asSingleSelected

      protected com.vaadin.flow.data.selection.SingleSelect<Kanban<T>,T> asSingleSelected()
    • getItemId

      @Nullable protected Object getItemId(@Nullable T item)