Package io.deephaven.multiviewwidget
Class MultiViewBuilder
java.lang.Object
io.deephaven.multiviewwidget.MultiViewBuilder
- All Implemented Interfaces:
ViewFactory,WidgetBuilder
- Direct Known Subclasses:
AggComboWidgetBuilder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull AggViewBuilderaddAggView(@NotNull String name, @NotNull Table source, @Nullable Color tabColor, @NotNull String... defaultGroupingCols) Add an Aggregation view.@NotNull WidgetBuilderaddFilter(@NotNull FilterDescriptor<?> descriptor) Add a defined global filter to the set of filters.@NotNull WidgetBuilderaddGlobalFilter(@NotNull String name, @NotNull Table table, @NotNull SortOrder order) Add a Table backed global filter.@NotNull LeafViewBuilderaddLeafView(@NotNull String name, @NotNull Table source, @Nullable Color tabColor) Add a Leaf view.@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.@NotNull ViewFactoryaddPlotView(@NotNull String name, @Nullable Color tabColor, @NotNull Function<Table[], FigureWidget> plotFactory, @NotNull List<Table> inputs) Add a plot view.@NotNull RollupViewBuilderaddRollupView(@NotNull String name, @NotNull Table source, @Nullable Color tabColor) @NotNull StaticFilterBuilderaddStaticFilter(@NotNull String name) Add a Static (pre-defined) set of selectable global filters to the Global filter set.@NotNull WidgetBuilderAdd a defined view to the set of views.static voidassertNotEmpty(@Nullable Collection<?> c, String message) Requires the input collectioncto be non-empty.static voidassertNotNull(@Nullable Object o, String message) Requires the input objectoto be non-null.@NotNull MultiViewLiveWidgetbuild()Complete definition of the widget and get a real instance of it.@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.@NotNull WidgetBuilderglobalFilterBucket(@NotNull String name, @NotNull Table groupingTable, boolean bucketView) Add a 'bucket' of filters for the specified global filter.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.deephaven.multiviewwidget.builder.ViewFactory
addAggView, addGlobalFilter, addLeafView, addPivotView, addPivotView, addPivotView, addPivotView, addPivotView, addPivotView, addPivotView, addPlotView, addPlotView, addPlotView, addRollupView, collapseGlobalFilter, globalFilterBucket
-
Constructor Details
-
MultiViewBuilder
public MultiViewBuilder()
-
-
Method Details
-
addView
@NotNull public @NotNull WidgetBuilder addView(@NotNull @NotNull String tabName, @NotNull @NotNull ViewTab viewTab) Description copied from interface:WidgetBuilderAdd a defined view to the set of views. NOTE: Internal use only!- Specified by:
addViewin interfaceWidgetBuilder- Parameters:
tabName- the name of the tabviewTab- the actual tab- Returns:
- this
WidgetBuilder
-
addFilter
Description copied from interface:WidgetBuilderAdd a defined global filter to the set of filters. NOTE: Internal use only!- Specified by:
addFilterin interfaceWidgetBuilder- Parameters:
descriptor- the actual filter.- Returns:
- this
WidgetBuilder
-
getBuilder
Description copied from interface:ViewFactoryGet 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- Specified by:
getBuilderin interfaceViewFactory- Returns:
- the parent builder
-
addAggView
@NotNull public @NotNull AggViewBuilder addAggView(@NotNull @NotNull String name, @NotNull @NotNull Table source, @Nullable @Nullable Color tabColor, @NotNull @NotNull String... defaultGroupingCols) Description copied from interface:ViewFactoryAdd an Aggregation view.- Specified by:
addAggViewin interfaceViewFactory- 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.
-
addPivotView
@NotNull public @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) Description copied from interface:ViewFactoryAdd a Pivot view. A Pivot view allows the user to do excel-like pivot table analysis on the underlying table.- Specified by:
addPivotViewin interfaceViewFactory- 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.
-
addLeafView
@NotNull public @NotNull LeafViewBuilder addLeafView(@NotNull @NotNull String name, @NotNull @NotNull Table source, @Nullable @Nullable Color tabColor) Description copied from interface:ViewFactoryAdd a Leaf view. A leaf view is simply a flat view of the original table.- Specified by:
addLeafViewin interfaceViewFactory- 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.
-
addRollupView
@NotNull public @NotNull RollupViewBuilder addRollupView(@NotNull @NotNull String name, @NotNull @NotNull Table source, @Nullable @Nullable Color tabColor) - Specified by:
addRollupViewin interfaceViewFactory
-
addPlotView
@NotNull public @NotNull ViewFactory addPlotView(@NotNull @NotNull String name, @Nullable @Nullable Color tabColor, @NotNull @NotNull Function<Table[], FigureWidget> plotFactory, @NotNull @NotNull List<Table> inputs) Description copied from interface:ViewFactoryAdd a plot view.- Specified by:
addPlotViewin interfaceViewFactory- 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
-
addStaticFilter
Description copied from interface:ViewFactoryAdd a Static (pre-defined) set of selectable global filters to the Global filter set.- Specified by:
addStaticFilterin interfaceViewFactory- Parameters:
name- the name of the view.- Returns:
- a
StaticFilterBuilderto define the filter sets
-
addGlobalFilter
@NotNull public @NotNull WidgetBuilder addGlobalFilter(@NotNull @NotNull String name, @NotNull @NotNull Table table, @NotNull @NotNull SortOrder order) Description copied from interface:ViewFactoryAdd 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.- Specified by:
addGlobalFilterin interfaceViewFactory- Parameters:
name- the name of the filter grouptable- the table containing the distinct valuesorder- default ordering of values within the filter- Returns:
- this
WidgetBuilder
-
globalFilterBucket
@NotNull public @NotNull WidgetBuilder globalFilterBucket(@NotNull @NotNull String name, @NotNull @NotNull Table groupingTable, boolean bucketView) Description copied from interface:ViewFactoryAdd 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.- Specified by:
globalFilterBucketin interfaceViewFactory- 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
-
collapseGlobalFilter
Description copied from interface:ViewFactoryPermits the query-builder to define the default behavior of the Global Filter panel- Specified by:
collapseGlobalFilterin interfaceViewFactory- Parameters:
collapse- true if the panel should start collapsed, false if the panel should start expanded- Returns:
- this
WidgetBuilder
-
build
Description copied from interface:ViewFactoryComplete definition of the widget and get a real instance of it.- Specified by:
buildin interfaceViewFactory- Returns:
- a realized
MultiViewLiveWidget
-
assertNotNull
Requires the input objectoto be non-null. Though we have annotated methods as @NotNull, we cannot enforce scripts to follow said annotations. We'd prefer to fail now rather than later- Parameters:
o- objectmessage- error message- Throws:
IllegalArgumentException-ois null
-
assertNotEmpty
Requires the input collectioncto be non-empty. Though we have annotated methods as @NotNull, we cannot enforce scripts to follow said annotations. We'd prefer to fail now rather than later- Parameters:
c- collectionmessage- error message- Throws:
IllegalArgumentException-cis null or empty
-