Enum Class LinearLayout.Orientation
java.lang.Object
java.lang.Enum<LinearLayout.Orientation>
xyz.gmitch215.socketmc.screen.layout.LinearLayout.Orientation
- All Implemented Interfaces:
Serializable
,Comparable<LinearLayout.Orientation>
,Constable
- Enclosing class:
LinearLayout
Represents the orientation for a LinearLayout.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionA LinearLayout moving left to right.A LinearLayout moving up to down. -
Method Summary
Modifier and TypeMethodDescription<T extends LayoutElement>
TaddElement
(@NotNull GridLayout layout, T element, int index, @NotNull LayoutSettings layoutSettings) Adds an element to the layout.void
setSpacing
(@NotNull GridLayout layout, int spacing) Sets the spacing of the layout.static LinearLayout.Orientation
Returns the enum constant of this class with the specified name.static LinearLayout.Orientation[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
HORIZONTAL
A LinearLayout moving left to right. -
VERTICAL
A LinearLayout moving up to down.
-
-
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
-
setSpacing
Sets the spacing of the layout.- Parameters:
layout
- The layout to set the spacing ofspacing
- The spacing to set
-
addElement
@NotNull public <T extends LayoutElement> T addElement(@NotNull @NotNull GridLayout layout, @NotNull T element, int index, @NotNull @NotNull LayoutSettings layoutSettings) throws IllegalArgumentException Adds an element to the layout.- Type Parameters:
T
- The type of the element- Parameters:
layout
- The layout to add the element toelement
- The element to addindex
- The index to add the element atlayoutSettings
- The settings to apply to the element- Returns:
- The element that was added
- Throws:
IllegalArgumentException
- if the layout, element, or settings are null
-