Class AbstractLayout.AbstractChildContainer

java.lang.Object
xyz.gmitch215.socketmc.screen.layout.AbstractLayout.AbstractChildContainer
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ChildContainer, GridLayout.Cell
Enclosing class:
AbstractLayout

protected abstract static class AbstractLayout.AbstractChildContainer extends Object implements Serializable
A utility class to contain various elements inside of a Layout and its settings.
See Also:
  • Constructor Details

  • Method Details

    • getElement

      @NotNull public @NotNull LayoutElement getElement()
      Gets the element this container is holding.
      Returns:
      the element
    • getSettings

      @NotNull public @NotNull LayoutSettings getSettings()
      Gets the settings of this container.
      Returns:
      the settings
    • getHeight

      public final int getHeight()
      Gets the height of the element with vertical padding.
      Returns:
      the height
    • getWidth

      public final int getWidth()
      Gets the width of the element with horizontal padding.
      Returns:
      the width
    • setHorizontalBounds

      public final void setHorizontalBounds(int x, int width)
      Sets the horizontal bounds of the element.
      Parameters:
      x - the x-coordinate
      width - the width
    • setVerticalBounds

      public final void setVerticalBounds(int y, int height)
      Sets the vertical bounds of the element.
      Parameters:
      y - the y-coordinate
      height - the height