public class MouseButton extends Object
Modifier and Type | Field and Description |
---|---|
static MouseButton |
Left
Returns the left mouse button.
|
static MouseButton |
Middle
Returns the middle mouse button.
|
static MouseButton |
Right
Returns the right mouse button.
|
static MouseButton |
Unknown
Returns an unknown mouse button.
|
Constructor and Description |
---|
MouseButton(long index)
Creates a new
MouseButton with the given index. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other) |
long |
getIndex()
The mouse button index.
|
int |
hashCode() |
boolean |
isLeft() |
boolean |
isMiddle() |
boolean |
isRight() |
boolean |
isUnknown() |
public static final MouseButton Unknown
public static final MouseButton Left
public static final MouseButton Middle
public static final MouseButton Right
public MouseButton(long index)
MouseButton
with the given index.
The mouse button index maps to mouse buttons as follows:
Unmapped values can be used to express a custom mouse button.
index
- the mouse button index.public long getIndex()
public boolean isUnknown()
public boolean isLeft()
public boolean isMiddle()
public boolean isRight()