class ContainerBuilder
An abstract builder class for
UIContainerinstances.
abstract class ContainerBuilder<
T extends UIContainer = UIContainer,
> extends UIElement.ElementBuilder<T>;
Note
This class is used as a base class for container builders, such as the ones returned byUI.Column()andUI.Row(). You should not use this class directly.
Instance members
with()
Adds content to the container.layout()
Sets the layout options for the container, using UIContainer.layout.wrapContent()
Enables or disables content wrapping.clip()
Enables or disables content clipping.allowFocus()
Allows the container to receive input focus.allowKeyboardFocus()
Allows the container to receive input focus via the keyboard.trackHover()
Enables hover state tracking for this container.onMouseEnter()
Handles theMouseEnterevent.onMouseLeave()
Handles theMouseLeaveevent.distribute()
Sets the distribution of content along the main axis.gravity()
Sets the content gravity mode.gap()
Sets the gap between elements in the container, using UIContainer.gap.reverse()
Reverses the order of elements in the container, using UIContainer.reverse.centerContent()
Centers content both horizontally and vertically.
Inherited members
initializer abstractreadonly
The initializer instance that handles the actual view configuration.build()
Creates a new instance of the UI element.apply()
Applies a view builder function, returning its result.extend()
Extends this builder with custom methods, returning a new builder object.name()
Sets the element name, which can be used to identify the element in the view hierarchy.accessibleRole()
Sets the WAI-ARIA role for accessibility.accessibleLabel()
Sets the WAI-ARIA label for accessibility.hideWhen()
Hides the element when a specified condition is true.hideUnless()
Hides the element unless a specified condition is true.position()
Sets the position of the element within its parent.size()
Sets both the width and height of the element.width()
Sets the outer, minimum, and/or maximum width of the element.minWidth()
Sets the minimum width of the element.maxWidth()
Sets the maximum width of the element.height()
Sets the outer, minimum, and/or maximum height of the element.minHeight()
Sets the minimum height of the element.maxHeight()
Sets the maximum height of the element.flex()
Enables flex-grow on the element, allowing it to take up as much space as possible (or flex-shrink to allow it to shrink).padding()
Sets the padding around the element.margin()
Sets the margin around the element.textColor()
Sets the text color.fg()
Alias for textColor; sets the text color.background()
Sets the background color or gradient.bg()
Alias for background; sets the background color or gradient.border()
Sets the border properties of the element.borderRadius()
Sets the radius of the border corners.dropShadow()
Adds a drop shadow effect.opacity()
Sets the opacity of the element.dim()
Dims the element by reducing its opacity.cursor()
Sets the mouse cursor style when hovering over the element.fontFamily()
Sets the font family.fontSize()
Sets the font size.fontWeight()
Sets the font weight.bold()
Makes the text bold.italic()
Makes the text italic.underline()
Adds an underline to the text.lineHeight()
Sets the line height.textAlign()
Sets the text alignment.style()
Applies a set of style overrides.effect()
Applies a render effect to this element.requestFocus()
Requests input focus for this element after it has been rendered.on()
Adds an event handler to all instances of the UI element.onKey()
Adds an event handler forKeyDownevents with the specified key name.onClick()
Handles theClickevent.onDoubleClick()
Handles theDoubleClickevent.onContextMenu()
Handles theContextMenuevent.onPress()
Handles thePressevent.onRelease()
Handles theReleaseevent.onKeyDown()
Handles theKeyDownevent.onKeyUp()
Handles theKeyUpevent.onFocusIn()
Handles theFocusInevent.onFocusOut()
Handles theFocusOutevent.onChange()
Handles theChangeevent.onInput()
Handles theInputevent.onBeforeRender()
Handles theBeforeRenderevent, emitted before the element is rendered for the first time.onRendered()
Handles theRenderedevent, emitted when the element has been rendered.
Related
class UIContainer abstract
A base view class that represents a container element with no specific layout or styling.
