|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectwiiremotej.WiiRemoteMouse
wiiremotej.WiiRemoteAccelerometerMouse
public abstract class WiiRemoteAccelerometerMouse
An interface for implementing mouse functionality using the Wii Remote through the accelerometer.
| Field Summary | |
|---|---|
protected int |
xSensitivity
The sensitivity of the X-axis (pixels per unit). |
protected int |
ySensitivity
The sensitivity of the Y-axis (pixels per unit). |
| Fields inherited from class wiiremotej.WiiRemoteMouse |
|---|
robot |
| Constructor Summary | |
|---|---|
WiiRemoteAccelerometerMouse(int xSensitivity,
int ySensitivity,
int mouseButton1,
int mouseButton2,
int mouseButton3)
Constructs a new WiiRemoteAccelerometerMouse. |
|
| Method Summary | |
|---|---|
int |
getXSensitivity()
Returns the X sensitivity of this "mouse" in pixels per unit. |
int |
getYSensitivity()
Returns the Y sensitivity of this "mouse" in pixels per unit. |
abstract void |
processMotionEvent(WRAccelerationEvent evt)
Processes the given WRAccelerationEvent and moves the mouse if necessary based on user settings and input. |
void |
processMotionEvent(WREvent[] evts)
Processes the given event(s) and moves the mouse if necessary based on user settings and input. |
void |
setSensitivity(int ySensitivity)
Sets the Y sensitivity of this "mouse" to the given value in pixels per unit. |
void |
setXSensitivity(int xSensitivity)
Sets the X sensitivity of this "mouse" to the given value in pixels per unit. |
| Methods inherited from class wiiremotej.WiiRemoteMouse |
|---|
getMouseButton1, getMouseButton2, getMouseButton3, processButtonEvent, setMouseButton1, setMouseButton2, setMouseButton3 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int xSensitivity
protected int ySensitivity
| Constructor Detail |
|---|
public WiiRemoteAccelerometerMouse(int xSensitivity,
int ySensitivity,
int mouseButton1,
int mouseButton2,
int mouseButton3)
throws java.awt.AWTException,
java.lang.SecurityException
mouseButton1 - the key-press to map to mouse button 1. Use -1 if you don't want to map a key-press.mouseButton2 - the key-press to map to mouse button 2. Use -1 if you don't want to map a key-press.mouseButton3 - the key-press to map to mouse button 3. Use -1 if you don't want to map a key-press.
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.| Method Detail |
|---|
public abstract void processMotionEvent(WRAccelerationEvent evt)
evt - the event to use when calculating mouse movement.
public void processMotionEvent(WREvent[] evts)
throws java.lang.IllegalArgumentException
processMotionEvent in class WiiRemoteMouseevts - the events to use when calculating mouse movement.
java.lang.IllegalArgumentException - if index 0 of evts does not contain a WRAccelerationEvent.public int getXSensitivity()
public int getYSensitivity()
public void setXSensitivity(int xSensitivity)
xSensitivity - the new X sensitivity value.public void setSensitivity(int ySensitivity)
ySensitivity - the new Y sensitivity value.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||