Interface TreeDataGridItems<T>

Type Parameters:
T - items type
All Superinterfaces:
DataGridItems<T>, DataGridItems.Sortable<T>, DataUnit
All Known Implementing Classes:
ContainerTreeDataGridItems, EmptyTreeDataGridItems

public interface TreeDataGridItems<T> extends DataGridItems.Sortable<T>
A common interface for providing data for the TreeDataGrid component.
  • 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)
      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