Interface ListComponent<E>

Type Parameters:
E - entity type
All Superinterfaces:
ActionsHolder, Component, Component.BelongToFrame, HasSubParts
All Known Subinterfaces:
DataGrid<E>, GroupTable<E>, Table<E>, Tree<E>, TreeDataGrid<E>, TreeTable<E>
All Known Implementing Classes:
AbstractDataGrid, AbstractTable, DataGridImpl, GroupTableImpl, TableImpl, TreeDataGridImpl, TreeImpl, TreeTableImpl

public interface ListComponent<E> extends Component, Component.BelongToFrame, ActionsHolder
A component that can display tabular data.
  • Method Details

    • isMultiSelect

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

      @Nullable E getSingleSelected()
      Returns an instance of entity corresponding to the selected row of the list component. If nothing is selected, the method returns null. If multiple selection mode is enabled, returns the first selected instance.
      Returns:
      an instance of entity corresponding to the selected row of the list component
    • getSelected

      Set<E> getSelected()
      Returns a set of entity instances corresponding to the selected rows of the list component. If nothing is selected, the method returns a Collections.emptySet().
      Returns:
      a set of entity instances corresponding to the selected rows of the list component
    • setSelected

      void setSelected(@Nullable E item)
      Selects a row of the list component for a given entity instance.
      Parameters:
      item - entity instance to select the row, null to reset the selection
    • setSelected

      void setSelected(Collection<E> items)
      Selects the rows of the list component for a given collection of entity instances.
      Parameters:
      items - collection of entity instances to select rows
    • getItems

      @Nullable DataUnit getItems()
      Returns:
      a list component items