Skip to main content
Version: Java (Groovy)

freeze

The freeze method is used within setLayoutHints to freeze columns in place at the front of the table. They will always be visible even when scrolling horizontally.

Syntax

freeze(cols...)

Parameters

ParameterTypeDescription
colsString...

The columns to freeze in place at the front of the table.

colsCollection<String>

Indicate the specified columns should be frozen (displayed as the first N, unmovable columns) upon display.

Returns

A new table with layout instructions for the UI.

Examples

In the following example, the column Even is frozen to the front of the table.

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()
.freeze("Even")
.build()
)