Interface TreeGridDataItems<T>

Type Parameters:
T - items type
All Superinterfaces:
com.vaadin.flow.data.provider.DataProvider<T,Void>, DataUnit, GridDataItems<T>, HasType<T>, com.vaadin.flow.data.provider.hierarchy.HierarchicalDataProvider<T,Void>, Serializable
All Known Subinterfaces:
EntityTreeGridDataItems<T>
All Known Implementing Classes:
JmixTreeGridDataProvider

public interface TreeGridDataItems<T> extends GridDataItems<T>, com.vaadin.flow.data.provider.hierarchy.HierarchicalDataProvider<T,Void>
  • Method Details

    • getChildCount

      int getChildCount(T parent)
      Parameters:
      parent - the parent item
      Returns:
      child count of the given parent item
    • getChildren

      Stream<T> getChildren(@Nullable T item)
      Parameters:
      item - the item to obtain children or null to get root items
      Returns:
      children of the given item
    • hasChildren

      boolean hasChildren(T item)
      Specified by:
      hasChildren in interface com.vaadin.flow.data.provider.hierarchy.HierarchicalDataProvider<T,Void>
      Parameters:
      item - the item to check
      Returns:
      true if the item has children, false otherwise
    • getParent

      @Nullable T getParent(T item)
      Parameters:
      item - the item to get parent
      Returns:
      the parent of the given item or null if no parent
    • getHierarchyPropertyName

      String getHierarchyPropertyName()
      Returns the property of entity which forms the hierarchy.
      Returns:
      hierarchy property name
    • getLevel

      int getLevel(T item)
      Returns the hierarchy level of an item.
      Parameters:
      item - the item to get level
      Returns:
      the level of the given item