Package jltk
Class Mouse
- java.lang.Object
-
- jltk.Mouse
-
public class Mouse extends Object
-
-
Constructor Summary
Constructors Constructor Description Mouse()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
button()
Return the number of the mouse botton, that was pressed last.static int
getX()
Return the current x-coordinate of the mouse cursor on the current window., no matter if the mouse is pressed or not.static int
getY()
Return the current y-coordinate of the mouse cursor on the current window., no matter if the mouse is pressed or not.static boolean
isPressed()
Returns true, if the mouse is pressed, just in the moment this method is called.static boolean
wasDoubleclick()
Return true, if the last mouse click was a double click.
-
-
-
Method Detail
-
getX
public static int getX()
Return the current x-coordinate of the mouse cursor on the current window., no matter if the mouse is pressed or not.- Returns:
- x-coordinate of the mouse cursor
-
getY
public static int getY()
Return the current y-coordinate of the mouse cursor on the current window., no matter if the mouse is pressed or not.- Returns:
- y-coordinate of the mouse cursor
-
isPressed
public static boolean isPressed()
Returns true, if the mouse is pressed, just in the moment this method is called.- Returns:
- true, if mouse is pressed.
-
wasDoubleclick
public static boolean wasDoubleclick()
Return true, if the last mouse click was a double click.- Returns:
- true, if the last click was a double click.
-
button
public static int button()
Return the number of the mouse botton, that was pressed last. Mostly 1 is the left button, 2 the middle button an 3 the right button. If no button was pressed, 0 is returned.- Returns:
- The number of mouse button
-
-