wiiremotej
Class AnalogStickMouse

java.lang.Object
  extended by wiiremotej.WiiRemoteMouse
      extended by wiiremotej.AnalogStickMouse
Direct Known Subclasses:
AbsoluteAnalogStickMouse, RelativeAnalogStickMouse

public abstract class AnalogStickMouse
extends WiiRemoteMouse

A class for implementing a mouse using an analog stick. Any analog stick may be used.


Field Summary
static int CLASSIC_CONTROLLER_LEFT
          Classic controller left analog stick.
static int CLASSIC_CONTROLLER_RIGHT
          Classic controller right analog stick.
static int NUNCHUK
          Nunchuk analog stick.
 
Fields inherited from class wiiremotej.WiiRemoteMouse
xSensitivity, ySensitivity
 
Constructor Summary
AnalogStickMouse(double xSensitivity, double ySensitivity, int analogStick)
          Creates a new AnalogStickMouse with the given settings.
 
Method Summary
 int getAnalogStick()
          Returns this AnalogStickMouse's analog stick.
abstract  void processMouseEvent(AnalogStickData analogStickData)
          Processes analog stick data from an event and moves the mouse if necessary.
 void setAnalogStick(int analogStick)
          Sets the analog stick used by this AnalogStickMouse.
 
Methods inherited from class wiiremotej.WiiRemoteMouse
getDefault, getXSensitivity, getYSensitivity, moveMouse, setXSensitivity, setYSensitivity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NUNCHUK

public static int NUNCHUK
Nunchuk analog stick.


CLASSIC_CONTROLLER_LEFT

public static int CLASSIC_CONTROLLER_LEFT
Classic controller left analog stick.


CLASSIC_CONTROLLER_RIGHT

public static int CLASSIC_CONTROLLER_RIGHT
Classic controller right analog stick.

Constructor Detail

AnalogStickMouse

public AnalogStickMouse(double xSensitivity,
                        double ySensitivity,
                        int analogStick)
                 throws java.lang.IllegalArgumentException,
                        java.awt.AWTException,
                        java.lang.SecurityException
Creates a new AnalogStickMouse 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
Method Detail

processMouseEvent

public abstract void processMouseEvent(AnalogStickData analogStickData)
Processes analog stick data from an event and moves the mouse if necessary.

Parameters:
analogStickData - the analog stick data to process.

getAnalogStick

public int getAnalogStick()
Returns this AnalogStickMouse's analog stick.

Returns:
this AnalogStickMouse's analog stick. See field constants of this class for possible values.
See Also:
setAnalogStick(int)

setAnalogStick

public void setAnalogStick(int analogStick)
Sets the analog stick used by this AnalogStickMouse.

Parameters:
analogStick - the analog stick to use. See field constants of this class for possible values.
See Also:
getAnalogStick()