gzz.client
Class JoystickState

java.lang.Object
  |
  +--gzz.client.JoystickState
All Implemented Interfaces:
JoystickListener

public class JoystickState
extends java.lang.Object
implements JoystickListener

The current state of a joystick.


Field Summary
 float[] axes
          The current axis values, normalized to -1..1.
 boolean[] buttons
           
 long time
           
 int timestamp
           
 
Constructor Summary
JoystickState()
           
 
Method Summary
 void axis(long ms, int axis, float value)
          An axis was moved.
 void button(long ms, int button, boolean value)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

timestamp

public int timestamp

time

public long time

axes

public float[] axes
The current axis values, normalized to -1..1.


buttons

public boolean[] buttons
Constructor Detail

JoystickState

public JoystickState()
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

axis

public void axis(long ms,
                 int axis,
                 float value)
Description copied from interface: JoystickListener
An axis was moved.

Specified by:
axis in interface JoystickListener
Parameters:
ms - The timestamp of the event, in milliseconds compatible with System.currentTimeMillis().

button

public void button(long ms,
                   int button,
                   boolean value)
Specified by:
button in interface JoystickListener