Enum Class MouseButton
- All Implemented Interfaces:
Serializable
,Comparable<MouseButton>
,Constable
Represents a button on a mouse.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe fourth button on the mouse.The fifth button on the mouse.The sixth button on the mouse.The seventh button on the mouse.The eighth button on the mouse.The left button on the mouse.The middle button on the mouse.The right button on the mouse. -
Method Summary
Modifier and TypeMethodDescriptionstatic MouseButton
fromCode
(int code) Gets the MouseButton from the code.int
getCode()
Gets the code of the button.static MouseButton
Returns the enum constant of this class with the specified name.static MouseButton[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
LEFT
The left button on the mouse. -
RIGHT
The right button on the mouse. -
MIDDLE
The middle button on the mouse. -
BUTTON_4
The fourth button on the mouse. -
BUTTON_5
The fifth button on the mouse. -
BUTTON_6
The sixth button on the mouse. -
BUTTON_7
The seventh button on the mouse. -
BUTTON_8
The eighth button on the mouse.
-
-
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
-
getCode
public int getCode()Gets the code of the button.- Returns:
- The code of the button.
-
fromCode
Gets the MouseButton from the code.- Parameters:
code
- The code of the button.- Returns:
- The MouseButton from the code.
-