Interface DataGridItems<T>

All Superinterfaces:
DataUnit, HasType<T>
All Known Subinterfaces:
DataGridItems.Sortable<T>, EntityDataGridItems<E>, TreeDataGridItems<T>
All Known Implementing Classes:
ContainerDataGridItems, ContainerTreeDataGridItems, EmptyDataGridItems, EmptyTreeDataGridItems

public interface DataGridItems<T> extends DataUnit, HasType<T>
  • Method Details

    • getItems

      Collection<T> getItems()
      Returns:
      unmodifiable collection of items
    • getItem

      @Nullable T getItem(Object itemId)
      Parameters:
      itemId - the item id
      Returns:
      the item by the given id
    • getItemValue

      @Nullable Object getItemValue(Object itemId, MetaPropertyPath propertyId)
      Parameters:
      itemId - the item id
      propertyId - the property id
      Returns:
      the item value
    • getSelectedItem

      @Nullable T getSelectedItem()
      Returns:
      the current item contained in the source
    • setSelectedItem

      void setSelectedItem(@Nullable T item)
      Set current item in the source.
      Parameters:
      item - the item to set
    • addValueChangeListener

      com.vaadin.flow.shared.Registration addValueChangeListener(Consumer<DataGridItems.ValueChangeEvent<T>> listener)
      Registers a new value change listener.
      Parameters:
      listener - the listener to be added
      Returns:
      a registration object for removing an event listener added to a source
    • addItemSetChangeListener

      com.vaadin.flow.shared.Registration addItemSetChangeListener(Consumer<DataGridItems.ItemSetChangeEvent<T>> listener)
      Registers a new item set change listener.
      Parameters:
      listener - the listener to be added
      Returns:
      a registration object for removing an event listener added to a source
    • addSelectedItemChangeListener

      com.vaadin.flow.shared.Registration addSelectedItemChangeListener(Consumer<DataGridItems.SelectedItemChangeEvent<T>> listener)
      Registers a new selected item change listener.
      Parameters:
      listener - the listener to be added
      Returns:
      a registration object for removing an event listener added to a source
    • containsItem

      boolean containsItem(T item)
      Parameters:
      item - an item to check
      Returns:
      true if the underlying collection contains an item, false otherwise