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

public static enum WAbstractSlider.Direction extends Enum<WAbstractSlider.Direction>
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
  • Enum Constant Details

  • Method Details

    • values

      public static WAbstractSlider.Direction[] 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 WAbstractSlider.Direction 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
    • getAxis

      public Axis 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