Class TreeDataProvider<T>
java.lang.Object
com.vaadin.flow.data.provider.AbstractDataProvider<T,SerializablePredicate<T>>
com.vaadin.flow.data.provider.hierarchy.AbstractHierarchicalDataProvider<T,SerializablePredicate<T>>
com.vaadin.flow.data.provider.hierarchy.InMemoryHierarchicalDataProvider<T,TreeData<T>>
com.vaadin.flow.data.provider.hierarchy.TreeDataProvider<T>
- Type Parameters:
T- data type
- All Implemented Interfaces:
ConfigurableFilterDataProvider<T,,SerializablePredicate<T>, SerializablePredicate<T>> DataProvider<T,,SerializablePredicate<T>> HierarchicalDataProvider<T,,SerializablePredicate<T>> InMemoryDataProvider<T>,Serializable
An in-memory data provider for listing components that display hierarchical
data. Uses an instance of
TreeData as its source of data.- Since:
- 1.2
- Author:
- Vaadin Ltd
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.vaadin.flow.data.provider.hierarchy.HierarchicalDataProvider
HierarchicalDataProvider.HierarchyFormat -
Constructor Summary
ConstructorsConstructorDescriptionTreeDataProvider(TreeData<T> treeData) Constructs a new TreeDataProvider.TreeDataProvider(TreeData<T> treeData, HierarchicalDataProvider.HierarchyFormat hierarchyFormat) Creates a new TreeDataProvider and configures it to return the hierarchical data in the specified format:HierarchicalDataProvider.HierarchyFormat.NESTEDorHierarchicalDataProvider.HierarchyFormat.FLATTENED. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated, for removal: This API element is subject to removal in a future version.Methods inherited from class com.vaadin.flow.data.provider.hierarchy.InMemoryHierarchicalDataProvider
fetchChildren, getChildCount, getDepth, getFilter, getHierarchicalData, getHierarchyFormat, getParent, getSortComparator, hasChildren, setFilter, setSortComparatorMethods inherited from class com.vaadin.flow.data.provider.hierarchy.AbstractHierarchicalDataProvider
refreshItem, withConfigurableFilter, withConfigurableFilter, withConvertedFilterMethods inherited from class com.vaadin.flow.data.provider.AbstractDataProvider
addDataProviderListener, addListener, fireEvent, refreshAll, refreshItemMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.data.provider.DataProvider
addDataProviderListener, getId, refreshAll, refreshItem, refreshItemMethods inherited from interface com.vaadin.flow.data.provider.hierarchy.HierarchicalDataProvider
fetch, getItemIndex, sizeMethods inherited from interface com.vaadin.flow.data.provider.InMemoryDataProvider
addFilter, addFilter, addFilterByValue, addSortComparator, addSortOrder, clearFilters, filteringBy, filteringBy, filteringByEquals, filteringByPrefix, filteringByPrefix, filteringBySubstring, filteringBySubstring, isInMemory, setFilter, setFilterByValue, setSortOrder
-
Constructor Details
-
TreeDataProvider
Constructs a new TreeDataProvider.The data provider should be refreshed after making changes to the underlying
TreeDatainstance.- Parameters:
treeData- the backingTreeDatafor this provider, notnull
-
TreeDataProvider
public TreeDataProvider(TreeData<T> treeData, HierarchicalDataProvider.HierarchyFormat hierarchyFormat) Creates a new TreeDataProvider and configures it to return the hierarchical data in the specified format:HierarchicalDataProvider.HierarchyFormat.NESTEDorHierarchicalDataProvider.HierarchyFormat.FLATTENED.The data provider should be refreshed after making changes to the underlying
TreeDatainstance.- Parameters:
treeData- the backingTreeDatafor this provider, notnullhierarchyFormat- the hierarchy format to return data in, notnull
-
-
Method Details
-
getTreeData
Deprecated, for removal: This API element is subject to removal in a future version.Return the underlyingTreeDataof this provider.- Returns:
- the underlying data of this provider
-
InMemoryHierarchicalDataProvider.getHierarchicalData()instead.