org.bklab.flow.base.HasHierarchicalDataProviderFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fluent-vaadin-flow Show documentation
Show all versions of fluent-vaadin-flow Show documentation
Broderick Labs for fluent vaadin flow. Inherits common Vaadin components.
package org.bklab.flow.base;
import com.vaadin.flow.component.Component;
import com.vaadin.flow.data.provider.hierarchy.HasHierarchicalDataProvider;
import com.vaadin.flow.data.provider.hierarchy.TreeData;
import com.vaadin.flow.function.ValueProvider;
import org.bklab.flow.IFlowFactory;
import java.util.Collection;
import java.util.stream.Stream;
@SuppressWarnings("unchecked")
public interface HasHierarchicalDataProviderFactory<
T,
C extends Component & HasHierarchicalDataProvider,
E extends HasHierarchicalDataProviderFactory
> extends IFlowFactory {
default E items(Collection rootItems, ValueProvider> childItemProvider) {
get().setItems(rootItems, childItemProvider);
return (E) this;
}
default E items(Stream rootItems, ValueProvider> childItemProvider) {
get().setItems(rootItems, childItemProvider);
return (E) this;
}
default E treeData(TreeData treeData) {
get().setTreeData(treeData);
return (E) this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy