Interface LayoutElement

All Known Subinterfaces:
Layout, Positionable
All Known Implementing Classes:
AbstractButton, AbstractLayout, AbstractTextWidget, AbstractWidget, CheckboxButton, CustomButton, CustomWidget, CycleButton, EditTextWidget, EqualSpacingLayout, FocusedTextWidget, FrameLayout, GridLayout, ImageButton, ImageWidget, LinearLayout, LockButton, PageLayout, SendInstructionButton, TextButton, TextWidget

public interface LayoutElement
Represents an element that can be added to a layout.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Gets the height of this object.
    int
    Gets the width of this object.
    int
    Gets the x-coordinate of this object.
    int
    Gets the y-coordinate of this object.
    void
    setHeight(int height)
    Sets the height of this object.
    default void
    setPosition(int x, int y)
    Sets the position of this object.
    default void
    setSize(int width, int height)
    Sets the size of this object.
    default void
    setSize(int x, int y, int width, int height)
    Sets the position and size of this object.
    default void
    Sets the position and size of this object to match a ElementBounds.
    void
    setWidth(int width)
    Sets the width of this object.
    void
    setX(int x)
    Sets the x-coordinate of this object.
    void
    setY(int y)
    Sets the y-coordinate of this object.
    void
    Visits this object, applying a function to it.
  • Method Details

    • getX

      int getX()
      Gets the x-coordinate of this object.
      Returns:
      the x-coordinate
    • setX

      void setX(int x)
      Sets the x-coordinate of this object.
      Parameters:
      x - the x-coordinate
    • getY

      int getY()
      Gets the y-coordinate of this object.
      Returns:
      the y-coordinate
    • setY

      void setY(int y)
      Sets the y-coordinate of this object.
      Parameters:
      y - the y-coordinate
    • setPosition

      default void setPosition(int x, int y)
      Sets the position of this object.
      Parameters:
      x - the x-coordinate
      y - the y-coordinate
    • getWidth

      int getWidth()
      Gets the width of this object.
      Returns:
      the width
    • setWidth

      void setWidth(int width)
      Sets the width of this object.
      Parameters:
      width - the width
    • getHeight

      int getHeight()
      Gets the height of this object.
      Returns:
      the height
    • setHeight

      void setHeight(int height)
      Sets the height of this object.
      Parameters:
      height - the height
    • setSize

      default void setSize(int width, int height)
      Sets the size of this object.
      Parameters:
      width - the width
      height - the height
    • setSize

      default void setSize(@NotNull @NotNull ElementBounds bounds)
      Sets the position and size of this object to match a ElementBounds.
      Parameters:
      bounds - the bounds to use
    • setSize

      default void setSize(int x, int y, int width, int height)
      Sets the position and size of this object.
      Parameters:
      x - the x-coordinate
      y - the y-coordinate
      width - the width
      height - the height
    • visitWidgets

      void visitWidgets(@Nullable @Nullable Consumer<AbstractWidget> visitor)
      Visits this object, applying a function to it.
      Parameters:
      visitor - the visitor