SettingRow
Specialized settings row holding a label on the left and an interactive control on the right.
Overview
SettingRow is a specialized subclass of PanelRowWidget created specifically for settings dialogs, preference panes, and option forms. The left slot hosts an integrated Label, while the right slot contains the interactive control (such as a Slider, Checkbox, Dropdown, or TextField).
Focus Redirection
A key usability feature of SettingRow is automatic focus redirection: the left Label is configured with label.focusTarget(control), so clicking on the label automatically passes keyboard and pointer focus to the associated control.
Volume Setting Row
SettingRow volumeRow = new SettingRow("Master Volume", volumeSlider)
.controlWidth(120.0f)
.rowHeight(24.0f);
Related links
API
SettingRow::label()
Get Label
Returns the underlying Label instance for advanced text styling.
Returns Label: the live Label instance.
SettingRow::labelText(String)
Sets the plain-text title for the setting label.
| Parameter | Type | Description |
|---|---|---|
labelText |
String |
label text string |
Returns SettingRow: this widget for fluent configuration.
SettingRow::control(Widget)
Set Control
Sets the interactive control widget on the right side.
| Parameter | Type | Description |
|---|---|---|
control |
Widget |
the control widget (e.g. Slider, Toggle, TextField) |
Returns SettingRow: this widget for fluent configuration.
SettingRow::controlWidth(float)
Set Control Width
Sets a fixed width for the right control slot.
| Parameter | Type | Description |
|---|---|---|
controlWidth |
float |
width in pixels or AUTO |
Returns SettingRow: this widget for fluent configuration.