public final class Mouse
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
int |
CROSSHAIR |
int |
DEFAULT |
int |
E_RESIZE |
int |
HAND |
int |
LEFT |
int |
MIDDLE |
int |
MOVE |
int |
N_RESIZE |
int |
NE_RESIZE |
int |
NONE |
int |
NW_RESIZE |
int |
RIGHT |
int |
S_RESIZE |
int |
SE_RESIZE |
int |
SW_RESIZE |
int |
TEXT |
int |
W_RESIZE |
int |
WAIT |
Modifier and Type | Method and Description |
---|---|
int |
button()
Returns the value of the mouse button involved when the mouse is pressed,
released, moved, or dragged.
|
boolean |
isAltDown()
Returns true if the keyboard's Alt key is down when the
mouse is pressed, released, moved, or dragged; false otherwise.
|
boolean |
isControlDown()
Returns true if the keyboard's Ctrl key is down when the
mouse is pressed, released, moved, or dragged; false otherwise.
|
boolean |
isMetaDown()
Returns true if the keyboard's Meta key is down when the
mouse is pressed, released, moved, or dragged; false otherwise.
|
boolean |
isShiftDown()
Returns true if the keyboard's Shift key is down when the
mouse is pressed, released, moved, or dragged; false otherwise.
|
void |
setCursor(Image image,
int xPos,
int yPos)
Changes the cursor to the specified Image.
|
void |
setCursor(int cursorType)
Changes the cursor to one of the standard system cursors.
|
Sprite |
sprite()
Returns the topmost Sprite object under the current mouse position.
|
int |
wheelClicks()
Returns the number of clicks as of the last time the wheel
(a special kind of middle mouse button) was rotated.
|
int |
x()
Returns the current x position of the mouse, relative to the upper left hand
corner of the game window.
|
int |
Xchange()
Returns the difference between the current and previous x position of the mouse,
when the mouse is being dragged.
|
int |
y()
Returns the current y position of the mouse, relative to the upper left hand
corner of the game window.
|
int |
Ychange()
Returns the difference between the current and previous y position of the mouse,
when the mouse is being dragged.
|
public final int CROSSHAIR
public final int DEFAULT
public final int HAND
public final int MOVE
public final int TEXT
public final int WAIT
public final int N_RESIZE
public final int E_RESIZE
public final int S_RESIZE
public final int W_RESIZE
public final int NE_RESIZE
public final int NW_RESIZE
public final int SE_RESIZE
public final int SW_RESIZE
public final int NONE
public final int LEFT
public final int MIDDLE
public final int RIGHT
public final int x()
public final int y()
public final int Xchange()
public final int Ychange()
public final int button()
public final boolean isAltDown()
public final boolean isControlDown()
public final boolean isMetaDown()
public final boolean isShiftDown()
public final int wheelClicks()
public final Sprite sprite()
public void setCursor(int cursorType)
public void setCursor(Image image, int xPos, int yPos)