Class ContainerTreeDataGridItems<E>

java.lang.Object
io.jmix.ui.component.data.datagrid.ContainerDataGridItems<E>
io.jmix.ui.component.data.datagrid.ContainerTreeDataGridItems<E>
All Implemented Interfaces:
DataGridItems<E>, DataGridItems.Sortable<E>, DataUnit, ContainerDataUnit<E>, EntityDataGridItems<E>, EntityDataUnit, TreeDataGridItems<E>

public class ContainerTreeDataGridItems<E> extends ContainerDataGridItems<E> implements TreeDataGridItems<E>
  • Constructor Details

    • ContainerTreeDataGridItems

      public ContainerTreeDataGridItems(CollectionContainer<E> container, String hierarchyProperty, boolean showOrphans)
    • ContainerTreeDataGridItems

      public ContainerTreeDataGridItems(CollectionContainer<E> container, String hierarchyProperty)
  • Method Details

    • getChildCount

      public int getChildCount(E parent)
      Specified by:
      getChildCount in interface TreeDataGridItems<E>
      Parameters:
      parent - the parent item
      Returns:
      child count of the given parent item
    • getChildren

      public Stream<E> getChildren(@Nullable E item)
      Specified by:
      getChildren in interface TreeDataGridItems<E>
      Parameters:
      item - the item to obtain children or null to get root items
      Returns:
      children of the given item
    • hasChildren

      public boolean hasChildren(E item)
      Specified by:
      hasChildren in interface TreeDataGridItems<E>
      Parameters:
      item - the item to check
      Returns:
      true if the item has children, false otherwise
    • getParent

      @Nullable public E getParent(E item)
      Specified by:
      getParent in interface TreeDataGridItems<E>
      Parameters:
      item - the item to get parent
      Returns:
      the parent of the given item or null if no parent
    • getHierarchyPropertyName

      public String getHierarchyPropertyName()
      Description copied from interface: TreeDataGridItems
      Returns the property of entity which forms the hierarchy.
      Specified by:
      getHierarchyPropertyName in interface TreeDataGridItems<E>
      Returns:
      hierarchy property name