Class TreeDataProvider<T>

java.lang.Object
com.vaadin.data.provider.AbstractDataProvider<T,com.vaadin.server.SerializablePredicate<T>>
io.jmix.ui.component.tree.TreeDataProvider<T>
All Implemented Interfaces:
com.vaadin.data.provider.DataProvider<T,com.vaadin.server.SerializablePredicate<T>>, com.vaadin.data.provider.HierarchicalDataProvider<T,com.vaadin.server.SerializablePredicate<T>>, EnhancedTreeDataProvider<T>, Serializable

public class TreeDataProvider<T> extends com.vaadin.data.provider.AbstractDataProvider<T,com.vaadin.server.SerializablePredicate<T>> implements com.vaadin.data.provider.HierarchicalDataProvider<T,com.vaadin.server.SerializablePredicate<T>>, EnhancedTreeDataProvider<T>
See Also:
  • Field Details

    • treeItems

      protected TreeItems<T> treeItems
    • eventsDelegate

      protected TreeSourceEventsDelegate<T> eventsDelegate
    • itemSetChangeSubscription

      protected Subscription itemSetChangeSubscription
    • valueChangeSubscription

      protected Subscription valueChangeSubscription
    • stateChangeSubscription

      protected Subscription stateChangeSubscription
    • selectedItemChangeSubscription

      protected Subscription selectedItemChangeSubscription
  • Constructor Details

  • Method Details

    • unbind

      public void unbind()
    • getTreeItems

      public TreeItems<T> getTreeItems()
    • getId

      public Object getId(T item)
      Specified by:
      getId in interface com.vaadin.data.provider.DataProvider<T,com.vaadin.server.SerializablePredicate<T>>
    • isInMemory

      public boolean isInMemory()
      Specified by:
      isInMemory in interface com.vaadin.data.provider.DataProvider<T,com.vaadin.server.SerializablePredicate<T>>
    • size

      public int size(com.vaadin.data.provider.Query<T,com.vaadin.server.SerializablePredicate<T>> query)
      Specified by:
      size in interface com.vaadin.data.provider.DataProvider<T,com.vaadin.server.SerializablePredicate<T>>
      Specified by:
      size in interface com.vaadin.data.provider.HierarchicalDataProvider<T,com.vaadin.server.SerializablePredicate<T>>
    • getChildCount

      public int getChildCount(com.vaadin.data.provider.HierarchicalQuery<T,com.vaadin.server.SerializablePredicate<T>> query)
      Specified by:
      getChildCount in interface com.vaadin.data.provider.HierarchicalDataProvider<T,com.vaadin.server.SerializablePredicate<T>>
    • fetchChildren

      public Stream<T> fetchChildren(com.vaadin.data.provider.HierarchicalQuery<T,com.vaadin.server.SerializablePredicate<T>> query)
      Specified by:
      fetchChildren in interface com.vaadin.data.provider.HierarchicalDataProvider<T,com.vaadin.server.SerializablePredicate<T>>
    • hasChildren

      public boolean hasChildren(T item)
      Specified by:
      hasChildren in interface com.vaadin.data.provider.HierarchicalDataProvider<T,com.vaadin.server.SerializablePredicate<T>>
    • getItems

      public Stream<T> getItems()
      Specified by:
      getItems in interface EnhancedTreeDataProvider<T>
    • getParent

      @Nullable public T getParent(T item)
      Specified by:
      getParent in interface EnhancedTreeDataProvider<T>
    • datasourceItemSetChanged

      protected void datasourceItemSetChanged(TreeItems.ItemSetChangeEvent<T> event)
    • datasourceValueChanged

      protected void datasourceValueChanged(TreeItems.ValueChangeEvent<T> event)
    • datasourceStateChanged

      protected void datasourceStateChanged(DataUnit.StateChangeEvent event)
    • datasourceSelectedItemChanged

      protected void datasourceSelectedItemChanged(TreeItems.SelectedItemChangeEvent<T> event)