Enum Class WAbstractSlider.Direction
java.lang.Object
java.lang.Enum<WAbstractSlider.Direction>
io.github.cottonmc.cotton.gui.widget.WAbstractSlider.Direction
- All Implemented Interfaces:
Serializable
,Comparable<WAbstractSlider.Direction>
,Constable
- Enclosing class:
WAbstractSlider
The direction enum represents all four directions a slider can face.
For example, a slider whose value grows towards the right faces right.
The default direction for vertical sliders is UP
and
the one for horizontal sliders is RIGHT
.
- Since:
- 2.0.0
-
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 TypeMethodDescriptiongetAxis()
Gets the direction's axis.boolean
Returns whether this slider is inverted.static WAbstractSlider.Direction
Returns the enum constant of this class with the specified name.static WAbstractSlider.Direction[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UP
-
DOWN
-
LEFT
-
RIGHT
-
-
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
-
getAxis
Gets the direction's axis.- Returns:
- the axis
-
isInverted
public boolean isInverted()Returns whether this slider is inverted.An inverted slider will have reversed keyboard control.
- Returns:
- whether this slider is inverted
-