LayoutElementBuilders.Box


@RequiresSchemaVersion(major = 1, minor = 0)
public final class LayoutElementBuilders.Box implements LayoutElementBuilders.LayoutElement


A container which stacks all of its children on top of one another. This also allows to add a background color, or to have a border around them with some padding.

Summary

Nested types

Builder for Box.

Public methods

getContents

Added in 1.0.0
public @NonNull List<LayoutElementBuilders.LayoutElementgetContents()

Gets the child element(s) to wrap.

getHeight

Added in 1.0.0
public @Nullable DimensionBuilders.ContainerDimension getHeight()

Gets the height of this Box. If not defined, this will size itself to fit all of its children (i.e. a WrappedDimension).

getHorizontalAlignment

Added in 1.0.0
public @Nullable LayoutElementBuilders.HorizontalAlignmentProp getHorizontalAlignment()

Gets the horizontal alignment of the element inside this Box. If not defined, defaults to HORIZONTAL_ALIGN_CENTER.

getVerticalAlignment

Added in 1.0.0
public @Nullable LayoutElementBuilders.VerticalAlignmentProp getVerticalAlignment()

Gets the vertical alignment of the element inside this Box. If not defined, defaults to VERTICAL_ALIGN_CENTER.

getWidth

Added in 1.0.0
public @Nullable DimensionBuilders.ContainerDimension getWidth()

Gets the width of this Box. If not defined, this will size itself to fit all of its children (i.e. a WrappedDimension).

toString

public @NonNull String toString()