Enum Class EqualSpacingLayout.Orientation

java.lang.Object
java.lang.Enum<EqualSpacingLayout.Orientation>
xyz.gmitch215.socketmc.screen.layout.EqualSpacingLayout.Orientation
All Implemented Interfaces:
Serializable, Comparable<EqualSpacingLayout.Orientation>, Constable
Enclosing class:
EqualSpacingLayout

public static enum EqualSpacingLayout.Orientation extends Enum<EqualSpacingLayout.Orientation>
The orientation of the equal spacing layout.
  • Enum Constant Details

  • Method Details

    • values

      public static EqualSpacingLayout.Orientation[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static EqualSpacingLayout.Orientation valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getPrimaryLength

      public int getPrimaryLength(@NotNull @NotNull LayoutElement element) throws IllegalArgumentException
      Gets the primary length according to this orientation.
      Parameters:
      element - The element to get the primary length of
      Returns:
      The primary length of the element.
      Throws:
      IllegalArgumentException - if the element is null
    • getPrimaryLength

      public int getPrimaryLength(@NotNull @NotNull ChildContainer container) throws IllegalArgumentException
      Gets the primary length according to this orientation.
      Parameters:
      container - The container to get the primary length of
      Returns:
      The primary length of the container.
      Throws:
      IllegalArgumentException
    • getSecondaryLength

      public int getSecondaryLength(@NotNull @NotNull LayoutElement element) throws IllegalArgumentException
      Gets the secondary length according to this orientation.
      Parameters:
      element - The element to get the secondary length of
      Returns:
      The secondary length of the element.
      Throws:
      IllegalArgumentException - if the element is null
    • getSecondaryLength

      public int getSecondaryLength(@NotNull @NotNull ChildContainer container) throws IllegalArgumentException
      Gets the secondary length according to this orientation.
      Parameters:
      container - The container to get the secondary length of
      Returns:
      The secondary length of the container.
      Throws:
      IllegalArgumentException - if the container is null
    • setPrimaryPosition

      public void setPrimaryPosition(@NotNull @NotNull ChildContainer container, int position) throws IllegalArgumentException
      Sets the primary position of the container.
      Parameters:
      container - The container to set the primary position of
      position - The position to set the primary position to
      Throws:
      IllegalArgumentException - if the container is null
    • setSecondaryPosition

      public void setSecondaryPosition(@NotNull @NotNull ChildContainer container, int position, int length)
      Sets the secondary position of the container.
      Parameters:
      container - The container to set the secondary position of
      position - The position to set the secondary position to
      length - The length of the container
    • getPrimaryPosition

      public int getPrimaryPosition(@NotNull @NotNull LayoutElement element) throws IllegalArgumentException
      Gets the primary position of the element.
      Parameters:
      element - The element to get the primary position of
      Returns:
      The primary position of the element
      Throws:
      IllegalArgumentException - if the element is null
    • getSecondaryPosition

      public int getSecondaryPosition(@NotNull @NotNull LayoutElement element) throws IllegalArgumentException
      Gets the secondary position of the element.
      Parameters:
      element - The element to get the secondary position of
      Returns:
      The secondary position of the element
      Throws:
      IllegalArgumentException - if the element is null