columnGroup
The columnGroup
method is used within setLayoutHints
create column groups, which will be moved so their children are adjacent in the UI.
Syntax
columnGroup(name, children)
columnGroup(name, children, color)
Parameters
Parameter | Type | Description |
---|---|---|
name | String | The column group name. Must be a valid Deephaven column name. |
children | List<String> | The columns and other groups belonging to this group. |
color | Color | The background color for the group in the UI. See Color for a comprehensive list of Color constants. |
color | String | String representing the group's background color in the UI. This can be a named Color constant, or a hex value (e.g., #001122). Hex values will be parsed as follows:
|
Returns
A new table with layout instructions for the UI.
Examples
In the following example, A
and E
form a column group called Vowels
.
import io.deephaven.engine.util.LayoutHintBuilder
source = newTable(
stringCol("A", "A", "a"),
stringCol("B", "B", "b"),
stringCol("C", "C", "c"),
stringCol("D", "D", "d"),
stringCol("E", "E", "e"),
stringCol("Y", "Y", "y"),
intCol("Even", 2, 4),
intCol("Odd", 1, 3)
)
result = source.setLayoutHints(
LayoutHintBuilder.get()
.columnGroup("Vowels", ["A", "E"])
.build()
)
- source
- result