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

    • 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