net.nexttext.input
Class Mouse
java.lang.Object
net.nexttext.input.InputSource
net.nexttext.input.Mouse
- All Implemented Interfaces:
- Locatable
- Direct Known Subclasses:
- MouseDefault
public abstract class Mouse
- extends InputSource
- implements Locatable
An input source for mouse information.
Constructor Summary |
Mouse()
|
Method Summary |
processing.core.PVector |
getLocation()
Locatable interface. |
processing.core.PVector |
getPosition()
|
abstract int |
getX()
Get the current x position of the mouse |
abstract int |
getY()
Get the current y position of the mouse |
abstract boolean |
isPressed(int button)
Get if the specified button is pressed or not |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LEFT
public static int LEFT
CENTER
public static int CENTER
RIGHT
public static int RIGHT
Mouse
public Mouse()
isPressed
public abstract boolean isPressed(int button)
- Get if the specified button is pressed or not
- Parameters:
button
- is a static button definition.
- Returns:
- if the specified button is pressed.
getX
public abstract int getX()
- Get the current x position of the mouse
getY
public abstract int getY()
- Get the current y position of the mouse
getPosition
public processing.core.PVector getPosition()
getLocation
public processing.core.PVector getLocation()
- Locatable interface.
- Specified by:
getLocation
in interface Locatable
- Returns:
- The object's location in absolute coordinates.