Interface ViewFactory
- All Known Subinterfaces:
AggViewBuilder,FilterItemBuilder,FilterViewFactory,LeafViewBuilder,PivotViewBuilder,PlotViewBuilder,RollupViewBuilder,StaticFilterBuilder,WidgetBuilder
- All Known Implementing Classes:
AggComboWidgetBuilder,AggViewBuilderImpl,FilterItemBuilderImpl,LeafViewBuilderImpl,MultiViewBuilder,PivotViewBuilderImpl,PlotViewBuilderImpl,RollupViewBuilderImpl,StaticFilterBuilderImpl
public interface ViewFactory
A Super-factory that will switch to the appropriate context for each requested view type, finalizing and
adding any currently in construction items to the current set of views.
-
Method Summary
Modifier and TypeMethodDescriptiondefault @NotNull AggViewBuilderaddAggView(@NotNull String name, @NotNull Table source, @NotNull String... defaultGroupingCols) Add an Aggregation view.default @NotNull AggViewBuilderaddAggView(@NotNull String name, @NotNull Table source, @Nullable Color tabColor, @NotNull String... defaultGroupingCols) Add an Aggregation view.default @NotNull WidgetBuilderaddGlobalFilter(@NotNull String name, @NotNull Table table) Add a Table backed global filter.default @NotNull WidgetBuilderaddGlobalFilter(@NotNull String name, @NotNull Table table, @NotNull SortOrder order) Add a Table backed global filter.default @NotNull LeafViewBuilderaddLeafView(@NotNull String name, @NotNull Table source) Add a Leaf view.default @NotNull LeafViewBuilderaddLeafView(@NotNull String name, @NotNull Table source, @Nullable Color tabColor) Add a Leaf view.default @NotNull PivotViewBuilderaddPivotView(@NotNull String name, @NotNull Table source, @NotNull String rowCol, @NotNull String pivotCol, @NotNull String aggCol) Add a Pivot view.default @NotNull PivotViewBuilderaddPivotView(@NotNull String name, @NotNull Table source, @NotNull String rowCol, @NotNull String pivotCol, @NotNull String aggCol, @Nullable AggType aggType) Add a Pivot view.default @NotNull PivotViewBuilderaddPivotView(@NotNull String name, @NotNull Table source, @NotNull Collection<String> defaultRowCols, @NotNull String pivotCol, @NotNull String aggCol) Add a Pivot view.default @NotNull PivotViewBuilderaddPivotView(@NotNull String name, @NotNull Table source, @NotNull Collection<String> defaultRowCols, @NotNull String pivotCol, @NotNull String aggCol, @Nullable AggType aggType) Add a Pivot view.default @NotNull PivotViewBuilderaddPivotView(@NotNull String name, @NotNull Table source, @Nullable Color tabColor, @NotNull String rowCol, @NotNull String pivotCol, @NotNull String aggCol) Add a Pivot view.default @NotNull PivotViewBuilderaddPivotView(@NotNull String name, @NotNull Table source, @Nullable Color tabColor, @NotNull String rowCol, @NotNull String pivotCol, @NotNull String aggCol, @Nullable AggType aggType) Add a Pivot view.default @NotNull PivotViewBuilderaddPivotView(@NotNull String name, @NotNull Table source, @Nullable Color tabColor, @NotNull Collection<String> defaultRowCols, @NotNull String pivotCol, @NotNull String aggCol) Add a Pivot view.default @NotNull PivotViewBuilderaddPivotView(@NotNull String name, @NotNull Table source, @Nullable Color tabColor, @NotNull Collection<String> defaultRowCols, @NotNull String pivotCol, @NotNull String aggCol, @Nullable AggType aggType) Add a Pivot view.default @NotNull ViewFactoryaddPlotView(@NotNull String name, @NotNull Function<Table[], FigureWidget> plotFactory, @NotNull List<Table> inputs) Add a plot view.default @NotNull ViewFactoryaddPlotView(@NotNull String name, @NotNull Function<Table[], FigureWidget> plotFactory, @Nullable Table... inputs) Add a plot view.default @NotNull ViewFactoryaddPlotView(@NotNull String name, @Nullable Color tabColor, @NotNull Function<Table[], FigureWidget> plotFactory, @NotNull List<Table> inputs) Add a plot view.default @NotNull ViewFactoryaddPlotView(@NotNull String name, @Nullable Color tabColor, @NotNull Function<Table[], FigureWidget> plotFactory, @Nullable Table... inputs) Add a plot view.default @NotNull RollupViewBuilderaddRollupView(@NotNull String name, @NotNull Table source) default @NotNull RollupViewBuilderaddRollupView(@NotNull String name, @NotNull Table source, @Nullable Color tabColor) default @NotNull StaticFilterBuilderaddStaticFilter(@NotNull String name) Add a Static (pre-defined) set of selectable global filters to the Global filter set.default @NotNull MultiViewLiveWidgetbuild()Complete definition of the widget and get a real instance of it.default @NotNull WidgetBuilderPermits the query-builder to define the default behavior of the Global Filter panel as collapseddefault @NotNull WidgetBuildercollapseGlobalFilter(boolean collapse) Permits the query-builder to define the default behavior of the Global Filter panel@NotNull WidgetBuilderGet the parent builder in its current state.default @NotNull WidgetBuilderglobalFilterBucket(@NotNull String name, @NotNull Table groupingTable) Add a 'bucket' of filters for the specified global filter.default @NotNull WidgetBuilderglobalFilterBucket(@NotNull String name, @NotNull Table groupingTable, boolean bucketView) Add a 'bucket' of filters for the specified global filter.
-
Method Details
-
getBuilder
Get the parent builder in its current state. May be used to store intermediary states of the builder in order to separate widget-creation into multiple distinct sections- Returns:
- the parent builder
-
addPlotView
@NotNull @ScriptApi @FinalDefault default @NotNull ViewFactory addPlotView(@NotNull @NotNull String name, @NotNull @NotNull Function<Table[], FigureWidget> plotFactory, @Nullable @Nullable Table... inputs) Add a plot view.- Parameters:
name- The visible name of the viewplotFactory- AFunction<Table[], FigureWidget> that will produce a plot given a set of tables.inputs- the ordered set of tables to be provided to the plotFactory after filtering has been applied.- Returns:
- a
PlotViewBuilder
-
addPlotView
@NotNull @ScriptApi @FinalDefault default @NotNull ViewFactory addPlotView(@NotNull @NotNull String name, @Nullable @Nullable Color tabColor, @NotNull @NotNull Function<Table[], FigureWidget> plotFactory, @Nullable @Nullable Table... inputs) Add a plot view.- Parameters:
name- The visible name of the viewtabColor- the color of the tabplotFactory- AFunction<Table[], FigureWidget> that will produce a plot given a set of tables.inputs- the ordered set of tables to be provided to the plotFactory after filtering has been applied.- Returns:
- a
PlotViewBuilder
-
addPlotView
@NotNull @ScriptApi @FinalDefault default @NotNull ViewFactory addPlotView(@NotNull @NotNull String name, @NotNull @NotNull Function<Table[], FigureWidget> plotFactory, @NotNull @NotNull List<Table> inputs) Add a plot view.- Parameters:
name- The visible name of the viewplotFactory- AFunction<Table[], FigureWidget> that will produce a plot given a set of tables.inputs- the ordered set of tables to be provided to the plotFactory after filtering has been applied.- Returns:
- a
PlotViewBuilder
-
addPlotView
@NotNull @ScriptApi default @NotNull ViewFactory addPlotView(@NotNull @NotNull String name, @Nullable @Nullable Color tabColor, @NotNull @NotNull Function<Table[], FigureWidget> plotFactory, @NotNull @NotNull List<Table> inputs) Add a plot view.- Parameters:
name- The visible name of the viewtabColor- the color of the tabplotFactory- AFunction<Table[], FigureWidget> that will produce a plot given a set of tables.inputs- the ordered set of tables to be provided to the plotFactory after filtering has been applied.- Returns:
- a
PlotViewBuilder
-
addAggView
@NotNull @ScriptApi default @NotNull AggViewBuilder addAggView(@NotNull @NotNull String name, @NotNull @NotNull Table source, @Nullable @Nullable Color tabColor, @NotNull @NotNull String... defaultGroupingCols) Add an Aggregation view.- Parameters:
name- the visible name of the viewsource- the source table it is based ontabColor- the color of the tab to displaydefaultGroupingCols- The default set of grouping columns applied.- Returns:
- an
AggViewBuilderto define the view itself.
-
addAggView
@NotNull @ScriptApi @FinalDefault default @NotNull AggViewBuilder addAggView(@NotNull @NotNull String name, @NotNull @NotNull Table source, @NotNull @NotNull String... defaultGroupingCols) Add an Aggregation view. An Aggregation view performs grouping and user defined aggregations on the base table provided.- Parameters:
name- the visible name of the viewsource- the source table it is based ondefaultGroupingCols- The default set of grouping columns applied.- Returns:
- an
AggViewBuilderto define the view itself.
-
addPivotView
@NotNull @ScriptApi default @NotNull PivotViewBuilder addPivotView(@NotNull @NotNull String name, @NotNull @NotNull Table source, @Nullable @Nullable Color tabColor, @NotNull @NotNull Collection<String> defaultRowCols, @NotNull @NotNull String pivotCol, @NotNull @NotNull String aggCol, @Nullable @Nullable AggType aggType) Add a Pivot view. A Pivot view allows the user to do excel-like pivot table analysis on the underlying table.- Parameters:
name- the visible name of the viewsource- the source table it is based ontabColor- the color of the tab to displaydefaultRowCols- a collection of columns whose distinct values will define the rows in the resultant pivot-tablepivotCol- the column whose distinct values will define the columns in the resultant pivot-tableaggCol- the column whose values will be aggregatedaggType- the aggregation to apply to aggCol- Returns:
- an
PivotViewBuilderto define the view itself.
-
addPivotView
@NotNull @ScriptApi @FinalDefault default @NotNull PivotViewBuilder addPivotView(@NotNull @NotNull String name, @NotNull @NotNull Table source, @NotNull @NotNull Collection<String> defaultRowCols, @NotNull @NotNull String pivotCol, @NotNull @NotNull String aggCol, @Nullable @Nullable AggType aggType) Add a Pivot view. A Pivot view allows the user to do excel-like pivot table analysis on the underlying table.- Parameters:
name- the visible name of the viewsource- the source table it is based ondefaultRowCols- a collection of columns whose distinct values will define the rows in the resultant pivot-tablepivotCol- the column whose distinct values will define the columns in the resultant pivot-tableaggCol- the column whose values will be aggregatedaggType- the aggregation to apply to aggCol- Returns:
- an
PivotViewBuilderto define the view itself.
-
addPivotView
@NotNull @ScriptApi @FinalDefault default @NotNull PivotViewBuilder addPivotView(@NotNull @NotNull String name, @NotNull @NotNull Table source, @Nullable @Nullable Color tabColor, @NotNull @NotNull Collection<String> defaultRowCols, @NotNull @NotNull String pivotCol, @NotNull @NotNull String aggCol) Add a Pivot view. A Pivot view allows the user to do excel-like pivot table analysis on the underlying table.- Parameters:
name- the visible name of the viewsource- the source table it is based ontabColor- the color of the tab to displaydefaultRowCols- a collection of columns whose distinct values will define the rows in the resultant pivot-tablepivotCol- the column whose distinct values will define the columns in the resultant pivot-tableaggCol- the column whose values will be aggregated- Returns:
- an
PivotViewBuilderto define the view itself.
-
addPivotView
@NotNull @ScriptApi @FinalDefault default @NotNull PivotViewBuilder addPivotView(@NotNull @NotNull String name, @NotNull @NotNull Table source, @NotNull @NotNull Collection<String> defaultRowCols, @NotNull @NotNull String pivotCol, @NotNull @NotNull String aggCol) Add a Pivot view. A Pivot view allows the user to do excel-like pivot table analysis on the underlying table.- Parameters:
name- the visible name of the viewsource- the source table it is based ondefaultRowCols- a collection of columns whose distinct values will define the rows in the resultant pivot-tablepivotCol- the column whose distinct values will define the columns in the resultant pivot-tableaggCol- the column whose values will be aggregated- Returns:
- an
PivotViewBuilderto define the view itself.
-
addPivotView
@NotNull @ScriptApi @FinalDefault default @NotNull PivotViewBuilder addPivotView(@NotNull @NotNull String name, @NotNull @NotNull Table source, @Nullable @Nullable Color tabColor, @NotNull @NotNull String rowCol, @NotNull @NotNull String pivotCol, @NotNull @NotNull String aggCol, @Nullable @Nullable AggType aggType) Add a Pivot view. A Pivot view allows the user to do excel-like pivot table analysis on the underlying table.- Parameters:
name- the visible name of the viewsource- the source table it is based ontabColor- the color of the tab to displayrowCol- the column whose distinct values will define the rows in the resultant pivot-tablepivotCol- the column whose distinct values will define the columns in the resultant pivot-tableaggCol- the column whose values will be aggregatedaggType- the aggregation to apply to aggCol- Returns:
- an
PivotViewBuilderto define the view itself.
-
addPivotView
@NotNull @ScriptApi @FinalDefault default @NotNull PivotViewBuilder addPivotView(@NotNull @NotNull String name, @NotNull @NotNull Table source, @NotNull @NotNull String rowCol, @NotNull @NotNull String pivotCol, @NotNull @NotNull String aggCol, @Nullable @Nullable AggType aggType) Add a Pivot view. A Pivot view allows the user to do excel-like pivot table analysis on the underlying table.- Parameters:
name- the visible name of the viewsource- the source table it is based onrowCol- the column whose distinct values will define the rows in the resultant pivot-tablepivotCol- the column whose distinct values will define the columns in the resultant pivot-tableaggCol- the column whose values will be aggregatedaggType- the aggregation to apply to aggCol- Returns:
- an
PivotViewBuilderto define the view itself.
-
addPivotView
@NotNull @ScriptApi @FinalDefault default @NotNull PivotViewBuilder addPivotView(@NotNull @NotNull String name, @NotNull @NotNull Table source, @Nullable @Nullable Color tabColor, @NotNull @NotNull String rowCol, @NotNull @NotNull String pivotCol, @NotNull @NotNull String aggCol) Add a Pivot view. A Pivot view allows the user to do excel-like pivot table analysis on the underlying table.- Parameters:
name- the visible name of the viewsource- the source table it is based ontabColor- the color of the tab to displayrowCol- the column whose distinct values will define the rows in the resultant pivot-tablepivotCol- the column whose distinct values will define the columns in the resultant pivot-tableaggCol- the column whose values will be aggregated- Returns:
- an
PivotViewBuilderto define the view itself.
-
addPivotView
@NotNull @ScriptApi @FinalDefault default @NotNull PivotViewBuilder addPivotView(@NotNull @NotNull String name, @NotNull @NotNull Table source, @NotNull @NotNull String rowCol, @NotNull @NotNull String pivotCol, @NotNull @NotNull String aggCol) Add a Pivot view. A Pivot view allows the user to do excel-like pivot table analysis on the underlying table.- Parameters:
name- the visible name of the viewsource- the source table it is based onrowCol- the column whose distinct values will define the rows in the resultant pivot-tablepivotCol- the column whose distinct values will define the columns in the resultant pivot-tableaggCol- the column whose values will be aggregated- Returns:
- an
PivotViewBuilderto define the view itself.
-
addLeafView
@NotNull @ScriptApi default @NotNull LeafViewBuilder addLeafView(@NotNull @NotNull String name, @NotNull @NotNull Table source, @Nullable @Nullable Color tabColor) Add a Leaf view. A leaf view is simply a flat view of the original table.- Parameters:
name- the visible name of the viewsource- the source table it is based ontabColor- the color of the tab to display- Returns:
- an
LeafViewBuilderto define the view itself.
-
addLeafView
@NotNull @ScriptApi @FinalDefault default @NotNull LeafViewBuilder addLeafView(@NotNull @NotNull String name, @NotNull @NotNull Table source) Add a Leaf view. A leaf view is simply a flat view of the original table.- Parameters:
name- the visible name of the viewsource- the source table it is based on- Returns:
- an
LeafViewBuilderto define the view itself.
-
addRollupView
@NotNull @ScriptApi @FinalDefault default @NotNull RollupViewBuilder addRollupView(@NotNull @NotNull String name, @NotNull @NotNull Table source) -
addRollupView
@NotNull @ScriptApi default @NotNull RollupViewBuilder addRollupView(@NotNull @NotNull String name, @NotNull @NotNull Table source, @Nullable @Nullable Color tabColor) -
addStaticFilter
@NotNull @ScriptApi default @NotNull StaticFilterBuilder addStaticFilter(@NotNull @NotNull String name) Add a Static (pre-defined) set of selectable global filters to the Global filter set.- Parameters:
name- the name of the view.- Returns:
- a
StaticFilterBuilderto define the filter sets
-
addGlobalFilter
@NotNull @ScriptApi default @NotNull WidgetBuilder addGlobalFilter(@NotNull @NotNull String name, @NotNull @NotNull Table table, @NotNull @NotNull SortOrder order) Add a Table backed global filter. This filter will allow users to apply filters to the specified column from a set of distinct values found within that column.- Parameters:
name- the name of the filter grouptable- the table containing the distinct valuesorder- default ordering of values within the filter- Returns:
- this
WidgetBuilder
-
addGlobalFilter
@NotNull @ScriptApi default @NotNull WidgetBuilder addGlobalFilter(@NotNull @NotNull String name, @NotNull @NotNull Table table) Add a Table backed global filter. This filter will allow users to apply filters to the specified column from a set of distinct values found within that column.- Parameters:
name- the name of the filter grouptable- the table containing the distinct values- Returns:
- this
WidgetBuilder
-
globalFilterBucket
@NotNull @ScriptApi default @NotNull WidgetBuilder globalFilterBucket(@NotNull @NotNull String name, @NotNull @NotNull Table groupingTable, boolean bucketView) Add a 'bucket' of filters for the specified global filter. A bucket will provide a drop-down menu item that will select all of the items in the specified table for the user.- Parameters:
name- the name of the filter to add a bucket forgroupingTable- the table containing the bucket values.bucketView- indicates that filter should be initialized in bucket-view- Returns:
- this
WidgetBuilder
-
globalFilterBucket
@NotNull @ScriptApi default @NotNull WidgetBuilder globalFilterBucket(@NotNull @NotNull String name, @NotNull @NotNull Table groupingTable) Add a 'bucket' of filters for the specified global filter. A bucket will provide a drop-down menu item that will select all of the items in the specified table for the user.- Parameters:
name- the name of the filter to add a bucket forgroupingTable- the table containing the bucket values.- Returns:
- this
WidgetBuilder
-
collapseGlobalFilter
Permits the query-builder to define the default behavior of the Global Filter panel- Parameters:
collapse- true if the panel should start collapsed, false if the panel should start expanded- Returns:
- this
WidgetBuilder
-
collapseGlobalFilter
Permits the query-builder to define the default behavior of the Global Filter panel as collapsed- Returns:
- this
WidgetBuilder
-
build
Complete definition of the widget and get a real instance of it.- Returns:
- a realized
MultiViewLiveWidget
-