| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectwiiremotej.WiiRemoteMouse
wiiremotej.AccelerometerMouse
public abstract class AccelerometerMouse
An interface for implementing mouse functionality using the Wii Remote through the accelerometer.
| Field Summary | |
|---|---|
| static int | NUNCHUK_EXTENSIONValue for device parameter representing the Nunchuck extension's accelerometer. | 
| static int | WII_REMOTEValue for device parameter representing the Wii Remote's accelerometer. | 
| Fields inherited from class wiiremotej.WiiRemoteMouse | 
|---|
| xSensitivity, ySensitivity | 
| Constructor Summary | |
|---|---|
| AccelerometerMouse(double xSensitivity,
                   double ySensitivity,
                   int device)Constructs a new AccelerometerMouse. | |
| Method Summary | |
|---|---|
|  int | getDevice()Returns the device to use for acceleration input. | 
| abstract  void | processMouseEvent(WRAccelerationEvent evt)Processes the given WRAccelerationEvent and moves the mouse if necessary based on user settings and input. | 
|  void | setDevice(int device)Sets the device to the specified device. | 
| 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 | 
|---|
public static final int WII_REMOTE
public static final int NUNCHUK_EXTENSION
| Constructor Detail | 
|---|
public AccelerometerMouse(double xSensitivity,
                          double ySensitivity,
                          int device)
                   throws java.lang.IllegalArgumentException,
                          java.awt.AWTException,
                          java.lang.SecurityException
xSensitivity - the mouse sensitivity in pixels per unit on the X axis. A negative modifier will move the mouse the opposite way.ySensitivity - the mouse sensitivity in pixels per unit on the Y axis. A negative modifier will move the mouse the opposite way.device - the device to use for acceleration input. See constant fields for options.
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.IllegalArgumentExceptionWII_REMOTE, 
NUNCHUK_EXTENSION| Method Detail | 
|---|
public int getDevice()
public void setDevice(int device)
device - the device to use for acceleration input. See constant fields for options.public abstract void processMouseEvent(WRAccelerationEvent evt)
evt - the event to use when calculating mouse movement.| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||