Package io.deephaven.engine.util
Class LayoutHintBuilder
java.lang.Object
io.deephaven.engine.util.LayoutHintBuilder
The builder class for use in assembling layout hints suitable for use with
applyToTable(Table)
or
GridAttributes.setLayoutHints(String)
.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
The display mode for the search bar. -
Method Summary
Modifier and TypeMethodDescriptionalwaysSubscribed
(String... columns) Indicate that the UI should maintain a subscription to the specified columns within viewports, even if they are out of view.applyToTable
(@NotNull Table table) boolean
Check if saved layouts should be allowed.atBack
(Collection<String> cols) Indicate the specified columns should appear as the last N columns of the table when displayed.atFront
(Collection<String> cols) Indicate the specified columns should appear as the first N columns of the table when displayed.autoFilter
(String... cols) autoFilter
(Collection<String> cols) Indicate the specified columns should be configured as AutoFilter columnsautoFilterFetchSize
(String col, int size) Set the default initial number of rows to fetch for columns that have been marked asAutoFilter
columns.build()
Create an appropriate parameter string suitable for use withGridAttributes.setLayoutHints(String)
.columnGroup
(String name, List<String> children) columnGroup
(String name, List<String> children, Color color) Create a named group of columns in the UIcolumnGroup
(String name, List<String> children, String color) freeze
(Collection<String> cols) Indicate the specified columns should be frozen (displayed as the first N, unmovable columns) upon display.static @NotNull LayoutHintBuilder
fromString
(String attrs) Create a LayoutHintBuilder from the specified parameter string.static @NotNull LayoutHintBuilder
get()
Create a new LayoutHintBuilder.Get the set of columns that should always remain subscribed.Get the set of columns that should be enabled for AutoFilter.int
getAutoFilterFetchSize
(String column) Get the number of rows to fetch in the initial AutoFilter data fetch.Get the ordered set of columns that should be displayed as the last N columns.@NotNull io.deephaven.engine.util.LayoutHintBuilder.ColumnGroup
getColumnGroup
(String name) Get the column group for the specified name.Get the map of column groups for the UI.Get the ordered set of columns that should be frozen.Get the ordered set of columns that should be displayed up front.Get the set of columns allowed to participate in UI-driven rollups.Get the set of columns that should be hidden by default.@NotNull LayoutHintBuilder.SearchDisplayModes
groupableColumns
(String... columns) Set the columns which are allowed to be used as UI-driven rollup columns.groupableColumns
(Collection<String> columns) Set the columns which are allowed to be used as UI-driven rollup columns.hide
(Collection<String> cols) Indicate the specified columns should be hidden by default.savedLayouts
(boolean allowed) Enable or disable saved layouts for the specified table.Set the search bar to explicitly be accessible or inaccessible, or use system default.setSearchBarAccess
(String searchable) Set the search bar to explicitly be accessible or inaccessible, or use system default.
-
Method Details
-
fromString
Create a LayoutHintBuilder from the specified parameter string.- Parameters:
attrs
- the parameter string- Returns:
- a LayoutHintBuilder for the input parameter string
-
get
Create a new LayoutHintBuilder.- Returns:
- a new LayoutHintBuilder
-
atFront
- See Also:
-
atFront
Indicate the specified columns should appear as the first N columns of the table when displayed.- Parameters:
cols
- the columns to show at front- Returns:
- this LayoutHintBuilder
-
atBack
- See Also:
-
atBack
Indicate the specified columns should appear as the last N columns of the table when displayed.- Parameters:
cols
- the columns to show at the back- Returns:
- this LayoutHintBuilder
-
hide
- See Also:
-
hide
Indicate the specified columns should be hidden by default.- Parameters:
cols
- the columns to initially hide- Returns:
- this LayoutHintBuilder
-
columnGroup
- See Also:
-
columnGroup
- See Also:
-
columnGroup
Create a named group of columns in the UI- Parameters:
name
- the column group name. Must be a valid Deephaven column namechildren
- the columns and other groups belonging to this groupcolor
- the background color for the group in the UI- Returns:
- this LayoutHintBuilder
-
autoFilter
- See Also:
-
autoFilter
Indicate the specified columns should be configured as AutoFilter columns- Parameters:
cols
- the columns to enable as AutoFilter columns- Returns:
- this LayoutHintBuilder
-
autoFilterFetchSize
Set the default initial number of rows to fetch for columns that have been marked asAutoFilter
columns.- Parameters:
col
- the column to set the fetch size forsize
- the number of rows to fetch initially- Returns:
- this LayoutHintBuilder
-
freeze
- See Also:
-
freeze
Indicate the specified columns should be frozen (displayed as the first N, unmovable columns) upon display.- Parameters:
cols
- the columns to freeze- Returns:
- this LayoutHintBuilder
-
alwaysSubscribed
Indicate that the UI should maintain a subscription to the specified columns within viewports, even if they are out of view.- Parameters:
columns
- the columns to keep subscribed- Returns:
- this LayoutHintBuilder
-
savedLayouts
Enable or disable saved layouts for the specified table.- Parameters:
allowed
- if layout saving is enabled- Returns:
- this LayoutHintBuilder
-
groupableColumns
Set the columns which are allowed to be used as UI-driven rollup columns.- Parameters:
columns
- the columns.- Returns:
- this LayoutHintBuilder
-
groupableColumns
Set the columns which are allowed to be used as UI-driven rollup columns.- Parameters:
columns
- the columns.- Returns:
- this LayoutHintBuilder
-
setSearchBarAccess
@ScriptApi public LayoutHintBuilder setSearchBarAccess(LayoutHintBuilder.SearchDisplayModes searchable) Set the search bar to explicitly be accessible or inaccessible, or use system default.- Parameters:
searchable
- The display mode to use- Returns:
- This LayoutHintBuilder
-
setSearchBarAccess
Set the search bar to explicitly be accessible or inaccessible, or use system default.- Parameters:
searchable
- The display mode to use- Returns:
- This LayoutHintBuilder
-
build
Create an appropriate parameter string suitable for use withGridAttributes.setLayoutHints(String)
.- Returns:
- this LayoutHintBuilder as a string
-
applyToTable
- Parameters:
table
- The sourceTable
- Returns:
table.setLayoutHints(build())
-
areSavedLayoutsAllowed
public boolean areSavedLayoutsAllowed()Check if saved layouts should be allowed.- Returns:
- if saved layouts are allowed
-
getFrontCols
Get the ordered set of columns that should be displayed up front.- Returns:
- an ordered set of columns to display up as the first N columns
-
getBackCols
Get the ordered set of columns that should be displayed as the last N columns.- Returns:
- an ordered set of columns to display at the end.
-
getHiddenCols
Get the set of columns that should be hidden by default.- Returns:
- the set of columns that should be hidden
-
getAutoFilterCols
Get the set of columns that should be enabled for AutoFilter.- Returns:
- the set of columns enabled for AutoFilter
-
getAutoFilterFetchSize
Get the number of rows to fetch in the initial AutoFilter data fetch.- Parameters:
column
- the column to set the fetch size for- Returns:
- the number of rows to fetch initially
-
getFreezeCols
Get the ordered set of columns that should be frozen.- Returns:
- the ordered set of columns that should be frozen
-
getAlwaysSubscribedCols
Get the set of columns that should always remain subscribed.- Returns:
- the set of columns to be subscribed.
-
getGroupableColumns
Get the set of columns allowed to participate in UI-driven rollups.- Returns:
- the set of columns
-
getSearchDisplayMode
-
getColumnGroups
@NotNull public @NotNull Map<String,io.deephaven.engine.util.LayoutHintBuilder.ColumnGroup> getColumnGroups()Get the map of column groups for the UI.- Returns:
- the map of column groups
-
getColumnGroup
@NotNull public @NotNull io.deephaven.engine.util.LayoutHintBuilder.ColumnGroup getColumnGroup(String name) Get the column group for the specified name.- Parameters:
name
- the name of the column group- Returns:
- the column group if it exists
-