class MouseState
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private IntSet |
buttonsPressed |
private int |
wheel |
(package private) static int |
WHEEL_DOWN |
(package private) static int |
WHEEL_NONE |
(package private) static int |
WHEEL_UP |
private MonocleWindow |
window |
private int |
x |
private int |
y |
Constructor and Description |
---|
MouseState() |
Modifier and Type | Method and Description |
---|---|
(package private) boolean |
canBeFoldedWith(MouseState ms)
Finds out whether two non-null states are identical in everything but
their coordinates
|
(package private) void |
copyTo(MouseState target)
Copies the contents of this state object to another.
|
(package private) int |
getButton()
Returns the Glass button ID used for this state.
|
(package private) IntSet |
getButtonsPressed() |
(package private) int |
getModifiers()
Returns the Glass event modifiers for this state
|
(package private) int |
getWheel() |
(package private) MonocleWindow |
getWindow(boolean recalculateCache)
Returns the Glass window on which the coordinates of this state are located.
|
(package private) int |
getX() |
(package private) int |
getY() |
(package private) void |
pressButton(int button) |
(package private) void |
releaseButton(int button) |
(package private) void |
setWheel(int wheel) |
(package private) void |
setX(int x) |
(package private) void |
setY(int y) |
java.lang.String |
toString() |
static final int WHEEL_NONE
static final int WHEEL_UP
static final int WHEEL_DOWN
private int x
private int y
private int wheel
private MonocleWindow window
private IntSet buttonsPressed
int getX()
void setX(int x)
int getY()
void setY(int y)
int getWheel()
void setWheel(int wheel)
void pressButton(int button)
void releaseButton(int button)
MonocleWindow getWindow(boolean recalculateCache)
recalculateCache
- true if the cached value for the target window
should be recalculated; false if the cached
value should be used to determine the result
of this method.int getButton()
int getModifiers()
void copyTo(MouseState target)
target
- The MouseState to which to copy this state's data.IntSet getButtonsPressed()
public java.lang.String toString()
toString
in class java.lang.Object
boolean canBeFoldedWith(MouseState ms)
ms
- the MouseState to compare to