Class Trees.Builder<T,R>
java.lang.Object
com.amalgamasimulation.desktop.ui.tables.Trees.Builder<T,R>
- Type Parameters:
T- type of row valueR- column type in tree
- All Implemented Interfaces:
Trees.ChildrenExtractorBuilder<T,,R> Trees.FinalBuilder<T,,R> Trees.ParentBuilder<T,R>
- Enclosing class:
Trees
public static class Trees.Builder<T,R>
extends Object
implements Trees.FinalBuilder<T,R>, Trees.ParentBuilder<T,R>, Trees.ChildrenExtractorBuilder<T,R>
A builder class to set up the properties of a tree constructor
The create() method is used to actually create the tree.
-
Method Summary
Modifier and TypeMethodDescriptioncheckbox()Set up the ability to select tree elements using a check box In the list of columns, a column with a check box will be added to the first placechildrenExtractor(Function<T, List<T>> getChildrenProvider) Set up the retrieval of child elements in the tree.create()This is the finalization method.static <T1,R1> Trees.ParentBuilder <T1, R1> createBuilder(List<T1> elements, Trees.TreeCreator<T1, R1> creatorTree) Set up dynamic update of child elements.When enabled, child elements are calculated during each expansion of the parent element.parent(org.eclipse.swt.widgets.Composite parent) Set up the tree parent elementSet up the ability to select table elements In the list of columns, a column with a rowHeader will be added to the first placestyle(int style) Set additional SWT properties in the treeSet the synchronous data update property in the tree
-
Method Details
-
createBuilder
public static <T1,R1> Trees.ParentBuilder<T1,R1> createBuilder(List<T1> elements, Trees.TreeCreator<T1, R1> creatorTree) -
parent
Description copied from interface:Trees.ParentBuilderSet up the tree parent element- Specified by:
parentin interfaceTrees.ParentBuilder<T,R> - Parameters:
parent- the parent control- Returns:
- builder object
-
childrenExtractor
Description copied from interface:Trees.ChildrenExtractorBuilderSet up the retrieval of child elements in the tree.- Specified by:
childrenExtractorin interfaceTrees.ChildrenExtractorBuilder<T,R> - Parameters:
getChildrenProvider- function to get children in a tree from a parent element- Returns:
- builder object
-
checkbox
Description copied from interface:Trees.FinalBuilderSet up the ability to select tree elements using a check box In the list of columns, a column with a check box will be added to the first place- Specified by:
checkboxin interfaceTrees.FinalBuilder<T,R> - Returns:
- builder object
-
rowHeader
Description copied from interface:Trees.FinalBuilderSet up the ability to select table elements In the list of columns, a column with a rowHeader will be added to the first place- Specified by:
rowHeaderin interfaceTrees.FinalBuilder<T,R> - Returns:
- builder object
-
greedyChildrenCalculation
Description copied from interface:Trees.FinalBuilderSet up dynamic update of child elements.When enabled, child elements are calculated during each expansion of the parent element. If disabled, then the calculation of child elements occurs during the tree update.- Specified by:
greedyChildrenCalculationin interfaceTrees.FinalBuilder<T,R> - Returns:
- builder object
-
syncUpdate
Description copied from interface:Trees.FinalBuilderSet the synchronous data update property in the tree- Specified by:
syncUpdatein interfaceTrees.FinalBuilder<T,R> - Returns:
- builder object
-
style
Description copied from interface:Trees.FinalBuilderSet additional SWT properties in the tree- Specified by:
stylein interfaceTrees.FinalBuilder<T,R> - Parameters:
style-- Returns:
- builder object
-
create
Description copied from interface:Trees.FinalBuilderThis is the finalization method. Call this method to create the tree type of your choice- Specified by:
createin interfaceTrees.FinalBuilder<T,R>
-