public class MouseButtonControl extends Control
A MouseButtonControl is a Control that represents a button on the mouse. The button is specified by an integer button code that is equal to one of the MOUSE_ constants of the MouseButtonControl class. All other integers are invalid as button codes.
| Modifier and Type | Field and Description |
|---|---|
static int |
MOUSE_LEFT_BUTTON |
static int |
MOUSE_MIDDLE_BUTTON |
static int |
MOUSE_RIGHT_BUTTON |
| Constructor and Description |
|---|
MouseButtonControl(int buttonCode)
Constructs a MouseButtonControl that represents the mouse button with the
specified button code.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Returns whether the specified object is a MouseButtonControl that is
equal to this MouseButtonControl.
|
int |
getButtonCode()
Returns this MouseButtonControl's button code.
|
java.lang.String |
getName()
Returns a short, descriptive, and unique String name for this Control.
|
int |
hashCode() |
getControlpublic static final int MOUSE_LEFT_BUTTON
public static final int MOUSE_RIGHT_BUTTON
public static final int MOUSE_MIDDLE_BUTTON
public MouseButtonControl(int buttonCode)
throws InvalidControlException
buttonCode - This MouseButtonControl's button codeInvalidControlException - if the button code is invalidpublic final int hashCode()
hashCode in class java.lang.Objectpublic final boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - The object to be compared with this MouseButtonControlpublic java.lang.String getName()
Controlpublic final int getButtonCode()