RowHandle
classclient uniquementdepuis 0.1.0com.galdurstudio.galdurui.api.window.RowHandle
Pas encore traduit : texte d’origine en anglais.
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.
MEMBRES · 11
Méthodes 10
addText
Adds a text at the end of the row.
PARAMÈTRES
RENVOIEElementHandle — the element's handle (disable, hide, tooltip)
addButton
Adds a button at the end of the row.
PARAMÈTRES
RENVOIEElementHandle — the element's handle (disable, hide, tooltip)
addIconButton
2 surchargesAdds an icon button showing an item at the end of the row.
PARAMÈTRES
RENVOIEElementHandle — the element's handle (disable, hide, tooltip)
addCheckbox
Adds a checkbox at the end of the row and returns its handle.
PARAMÈTRES
true if the checkbox is checked on openRENVOIECheckboxHandle — the checkbox handle
setEnabled
de ElementHandleEnables or disables the element. No effect if it is already in that state.
PARAMÈTRES
false to disable itisEnabled
de ElementHandleRENVOIEboolean — true if the element is enabled (the default)
setVisible
de ElementHandleShows or hides the element. Hidden, it frees its space in the window. No effect if it is already in that state.
PARAMÈTRES
false to hide itisVisible
de ElementHandleRENVOIEboolean — true if the element is shown (the default)
setTooltip
de ElementHandleSets the text shown when the element is hovered.
PARAMÈTRES
null to remove itgetTooltip
de ElementHandleRENVOIEComponent — the tooltip text, or null if none