RowHandle
classclient onlysince 0.1.0com.galdurstudio.galdurui.api.window.RowHandle
Handle to a row of a GaldurWindow: elements placed side by side, left to right, instead
of stacked.
Returned by GaldurWindow.addRow(). Elements are added as in the window, and each
returns its own handle. The elements of a row are centred vertically on each other and
separated by the theme gap (spacing.gap).
RowHandle actions = window.addRow(true);actions.addButton(Component.literal("Confirm"), this::confirm);actions.addButton(Component.literal("Cancel"), window::close);Like any ElementHandle, the row can be disabled, hidden or given a tooltip all at
once:
- disabled, it disables all its elements;
- hidden, it disappears with its elements and frees its space; a row whose elements are all hidden frees its space too;
- its tooltip shows on the elements that have none of their own (including in place of an icon button's label).
An element added while the window is shown appears on the next frame. Call on the client thread. A row does not contain another row.
MEMBERS · 11
Methods 10
addText
Adds a text at the end of the row.
PARAMETERS
RETURNSElementHandle — the element's handle (disable, hide, tooltip)
addButton
Adds a button at the end of the row.
PARAMETERS
RETURNSElementHandle — the element's handle (disable, hide, tooltip)
addIconButton
2 overloadsAdds an icon button showing an item at the end of the row.
PARAMETERS
RETURNSElementHandle — the element's handle (disable, hide, tooltip)
addCheckbox
Adds a checkbox at the end of the row and returns its handle.
PARAMETERS
true if the checkbox is checked on openRETURNSCheckboxHandle — the checkbox handle
setEnabled
from ElementHandleEnables or disables the element. No effect if it is already in that state.
PARAMETERS
false to disable itisEnabled
from ElementHandleRETURNSboolean — true if the element is enabled (the default)
setVisible
from ElementHandleShows or hides the element. Hidden, it frees its space in the window. No effect if it is already in that state.
PARAMETERS
false to hide itisVisible
from ElementHandleRETURNSboolean — true if the element is shown (the default)
setTooltip
from ElementHandleSets the text shown when the element is hovered.
PARAMETERS
null to remove itgetTooltip
from ElementHandleRETURNSComponent — the tooltip text, or null if none