wiiremotej
Class AbsoluteAnalogStickMouse
java.lang.Object
wiiremotej.WiiRemoteMouse
wiiremotej.AnalogStickMouse
wiiremotej.AbsoluteAnalogStickMouse
public class AbsoluteAnalogStickMouse
- extends AnalogStickMouse
A class for implementing a mouse using an analog stick with absolute positioning. This means that the analog stick's coordinate system will be mapped to the
screen's coordinate system. For example, moving the analog stick to the top will move the cursor straight to the top of the screen. Any analog stick may be used.
Note that because this mouse uses absolute positioning, if sensitivity is set to be less than 1, the mouse will not be able to cover the whole screen.
Constructor Summary |
AbsoluteAnalogStickMouse(double xSensitivity,
double ySensitivity,
int analogStick)
Creates a new AbsoluteAnalogStickMouse with the given settings. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbsoluteAnalogStickMouse
public AbsoluteAnalogStickMouse(double xSensitivity,
double ySensitivity,
int analogStick)
throws java.lang.IllegalArgumentException,
java.awt.AWTException,
java.lang.SecurityException
- Creates a new AbsoluteAnalogStickMouse with the given settings.
- Parameters:
xSensitivity
- sensitivity on the X axis. A negative modifier will move the mouse the opposite way.ySensitivity
- sensitivity on the Y axis. A negative modifier will move the mouse the opposite way.analogStick
- the analog stick that this mouse uses. See field constants of this class for possible values.
- Throws:
java.awt.AWTException
- if the platform configuration does not allow low-level input control. This exception is always
thrown when GraphicsEnvironment.isHeadless() returns true.
java.lang.SecurityException
- if createRobot permission is not granted.
java.lang.IllegalArgumentException
processMouseEvent
public void processMouseEvent(AnalogStickData analogStickData)
- Processes analog stick data from an event and moves the mouse if necessary.
- Specified by:
processMouseEvent
in class AnalogStickMouse
- Parameters:
analogStickData
- the analog stick data to process.
getDefault
public static AbsoluteAnalogStickMouse getDefault()
throws java.awt.AWTException,
java.lang.SecurityException
- Returns a basic absolute analog stick mouse with the following settings. xSensitivity: 1. ySensitivity: 1. analogStick: NUNHCUCK.
- Returns:
- a basic absolute analog stick mouse.
- Throws:
java.awt.AWTException
- if the platform configuration does not allow low-level input control. This exception is always
thrown when GraphicsEnvironment.isHeadless() returns true.
java.lang.SecurityException
- if createRobot permission is not granted.