RelativeAnalogStickMouse
Keywords: wiiremotej.RelativeAnalogStickMouse 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 RelativeAnalogStickMouse

    java.lang.Object
      wiiremotej.WiiRemoteMouse
          wiiremotej.AnalogStickMouse
              wiiremotej.RelativeAnalogStickMouse

    public class RelativeAnalogStickMouse

extends AnalogStickMouse

A class for implementing a mouse using an analog stick with relative positioning. This means that pressing the analog stick will cause the cursor to move based on the direction of the analog stick. However, the cursor will not be mapped to the analog stick's coordinate system. Any analog stick may be used.

Field Summary

Fields inherited from class wiiremotej.AnalogStickMouse
`CLASSIC_CONTROLLER_LEFT, CLASSIC_CONTROLLER_RIGHT, NUNCHUK`

Fields inherited from class wiiremotej.WiiRemoteMouse
`xSensitivity, ySensitivity`

Constructor Summary
`RelativeAnalogStickMouse(double xSensitivity, double ySensitivity, double xThreshold, double yThreshold, int analogStick)` Creates a new RelativeAnalogStickMouse with the given settings.

Method Summary
`static RelativeAnalogStickMouse` | `getDefault()` Returns a basic relative analog stick mouse with the following settings.
`void` | `processMouseEvent(AnalogStickData analogStickData)` Processes analog stick data from an event and moves the mouse if necessary.

Methods inherited from class wiiremotej.AnalogStickMouse
`getAnalogStick, setAnalogStick`

Methods inherited from class wiiremotej.WiiRemoteMouse
`getXSensitivity, getYSensitivity, moveMouse, setXSensitivity, setYSensitivity`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### RelativeAnalogStickMouse

    public RelativeAnalogStickMouse(double xSensitivity,
                                    double ySensitivity,
                                    double xThreshold,
                                    double yThreshold,
                                    int analogStick)
                             throws java.lang.IllegalArgumentException,
                                    java.awt.AWTException,
                                    java.lang.SecurityException

  Creates a new RelativeAnalogStickMouse with the given settings.

  Parameters:
    `xSensitivity` - pixels to multiply by percent of analog stick's X direction. A negative modifier will move the mouse the opposite way.
    `ySensitivity` - pixels to multiply by percent of analog stick's Y direction. A negative modifier will move the mouse the opposite way.
    `xThreshold` - the amount the analog has to be pushed left or right before responding (percent on the 0 to 1 scale).
    `yThreshold` - the amount the analog has to be pushed up or down before responding (percent on the 0 to 1 scale).
    `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 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 RelativeAnalogStickMouse getDefault()
                                               throws java.awt.AWTException,
                                                      java.lang.SecurityException

  Returns a basic relative analog stick mouse with the following settings. xSensitivity: 10. ySensitivity: 10. xThreshold: 0.05. yThreshold: 0.05. analogStick: NUNHCUCK.

  Returns:
    a basic relative 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.

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