AccelerometerMouse
Keywords: wiiremotej.AccelerometerMouse class

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## wiiremotej
Class AccelerometerMouse

    java.lang.Object
      wiiremotej.WiiRemoteMouse
          wiiremotej.AccelerometerMouse

Direct Known Subclasses:
  MotionAccelerometerMouse, TiltAccelerometerMouse

    public abstract class AccelerometerMouse

extends WiiRemoteMouse

An interface for implementing mouse functionality using the Wii Remote through the accelerometer.

Field Summary
`static int` | `NUNCHUK_EXTENSION` Value for device parameter representing the Nunchuck extension's accelerometer.
`static int` | `WII_REMOTE` Value 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

### WII_REMOTE

    public static final int WII_REMOTE

  Value for device parameter representing the Wii Remote's accelerometer.

  See Also:
    Constant Field Values

### NUNCHUK_EXTENSION

    public static final int NUNCHUK_EXTENSION

  Value for device parameter representing the Nunchuck extension's accelerometer.

  See Also:
    Constant Field Values

Constructor Detail

### AccelerometerMouse

    public AccelerometerMouse(double xSensitivity,
                              double ySensitivity,
                              int device)
                       throws java.lang.IllegalArgumentException,
                              java.awt.AWTException,
                              java.lang.SecurityException

  Constructs a new AccelerometerMouse.

  Parameters:
    `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.
  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`
  See Also:
    `WII_REMOTE`, `NUNCHUK_EXTENSION`

Method Detail

### getDevice

    public int getDevice()

  Returns the device to use for acceleration input. See constant fields for options.

  Returns:
    the device to use for acceleration input. See constant fields for options.

### setDevice

    public void setDevice(int device)

  Sets the device to the specified device.

  Parameters:
    `device` - the device to use for acceleration input. See constant fields for options.

### processMouseEvent

    public abstract void processMouseEvent(WRAccelerationEvent evt)

  Processes the given WRAccelerationEvent and moves the mouse if necessary based on user settings and input.

  Parameters:
    `evt` - the event to use when calculating mouse movement.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD