Enum Class MouseButton

java.lang.Object
java.lang.Enum<MouseButton>
xyz.gmitch215.socketmc.util.input.MouseButton
All Implemented Interfaces:
Serializable, Comparable<MouseButton>, Constable

public enum MouseButton extends Enum<MouseButton>
Represents a button on a mouse.
  • Enum Constant Details

    • LEFT

      public static final MouseButton LEFT
      The left button on the mouse.
    • MIDDLE

      public static final MouseButton MIDDLE
      The middle button on the mouse.
    • BUTTON_4

      public static final MouseButton BUTTON_4
      The fourth button on the mouse.
    • BUTTON_5

      public static final MouseButton BUTTON_5
      The fifth button on the mouse.
    • BUTTON_6

      public static final MouseButton BUTTON_6
      The sixth button on the mouse.
    • BUTTON_7

      public static final MouseButton BUTTON_7
      The seventh button on the mouse.
    • BUTTON_8

      public static final MouseButton BUTTON_8
      The eighth button on the mouse.
  • Method Details

    • values

      public static MouseButton[] 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 MouseButton 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
    • getCode

      public int getCode()
      Gets the code of the button.
      Returns:
      The code of the button.
    • fromCode

      public static MouseButton fromCode(int code)
      Gets the MouseButton from the code.
      Parameters:
      code - The code of the button.
      Returns:
      The MouseButton from the code.