Interface ListDataComponent<T>

Type Parameters:
T - item type
All Known Implementing Classes:
DataGrid, Kanban, TreeDataGrid

public interface ListDataComponent<T>
A component that displays list of items.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    deselect(T item)
     
    void
    Deselects all selected rows.
     
    Returns a set of items corresponding to the selected rows of this component.
    Returns an item corresponding to the selected row of this component.
    boolean
     
    void
    Selects the rows of this component for a given collection of items.
    void
    select(T item)
    Selects a row of this component for a given item.
  • Method Details

    • getSingleSelectedItem

      @Nullable T getSingleSelectedItem()
      Returns an item corresponding to the selected row of this component. If nothing is selected, the method returns null. If multiple selection mode is enabled, returns the first selected instance.
      Returns:
      an item corresponding to the selected row of this component
    • getSelectedItems

      Set<T> getSelectedItems()
      Returns a set of items corresponding to the selected rows of this component. If nothing is selected, the method returns a Collections.emptySet().
      Returns:
      a set of item instances corresponding to the selected rows of this component, never null
    • select

      void select(T item)
      Selects a row of this component for a given item.
      Parameters:
      item - item instance to select the row
    • select

      void select(Collection<T> items)
      Selects the rows of this component for a given collection of items.
      Parameters:
      items - collection of items to select rows
    • deselect

      void deselect(T item)
    • deselectAll

      void deselectAll()
      Deselects all selected rows.
    • getItems

      @Nullable DataUnit getItems()
      Returns:
      a data unit that holds component items
    • isMultiSelect

      boolean isMultiSelect()
      Returns:
      true if multiple selection mode is enabled