Skip to main content
Version: Java (Groovy)

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

ParameterTypeDescription
nameString

The column group name. Must be a valid Deephaven column name.

childrenList<String>

The columns and other groups belonging to this group.

colorColor

The background color for the group in the UI. See Color for a comprehensive list of Color constants.

colorString

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:

  • The first two digits set the Red component.
  • The second two digits set the Blue component.
  • The final two digits set the Green component. Hex values must be preceded by a #.

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()
)