GaldurPanelLayout
classclient uniquementdepuis 0.1.0com.galdurstudio.galdurui.api.layout.GaldurPanelLayout
Pas encore traduit : texte d’origine en anglais.
Layout that wraps a child in a themed background panel. Its size is the child's plus the padding on every side, and the 9-slice background follows its final position and size. Combined with the vanilla layouts, screens need no coordinate maths:
LinearLayout column = LinearLayout.vertical().spacing(GaldurTheme.gap());// ... column.addChild(...)GaldurPanelLayout panel = new GaldurPanelLayout(column);addRenderableOnly(panel); // first, so the background is drawn behindpanel.visitWidgets(this::addRenderableWidget);panel.arrangeElements();FrameLayout.centerInRectangle(panel, getRectangle());Unless padding() is set, the padding is read from the theme
(spacing.panel_padding) on every arrangeElements().
Constructeurs 1
GaldurPanelLayout
PARAMÈTRES
LinearLayoutMéthodes 5
padding
Fixes the padding instead of following the theme.
PARAMÈTRES
RENVOIEGaldurPanelLayout — this layout
EXCEPTIONSIllegalArgumentException — if padding is negative
useThemePadding
Goes back to the theme padding (spacing.panel_padding).
RENVOIEGaldurPanelLayout — this layout
withSprite
Replaces the background sprite.
PARAMÈTRES
RENVOIEGaldurPanelLayout — this layout
getPadding
RENVOIEint — the effective padding, in GUI pixels
getChild
RENVOIELayoutElement — the element inside the panel