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
The orientation of the equal spacing layout.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
getPrimaryLength
(@NotNull ChildContainer container) Gets the primary length according to this orientation.int
getPrimaryLength
(@NotNull LayoutElement element) Gets the primary length according to this orientation.int
getPrimaryPosition
(@NotNull LayoutElement element) Gets the primary position of the element.int
getSecondaryLength
(@NotNull ChildContainer container) Gets the secondary length according to this orientation.int
getSecondaryLength
(@NotNull LayoutElement element) Gets the secondary length according to this orientation.int
getSecondaryPosition
(@NotNull LayoutElement element) Gets the secondary position of the element.void
setPrimaryPosition
(@NotNull ChildContainer container, int position) Sets the primary position of the container.void
setSecondaryPosition
(@NotNull ChildContainer container, int position, int length) Sets the secondary position of the container.Returns the enum constant of this class with the specified name.static EqualSpacingLayout.Orientation[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
HORIZONTAL
Horizontally oriented. -
VERTICAL
Vertically oriented.
-
-
Method Details
-
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
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 nameNullPointerException
- 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 ofposition
- 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 ofposition
- The position to set the secondary position tolength
- 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
-