at.wisch.joystick.event
Class ControllerAxisEvent

java.lang.Object
  extended by org.lwjgl.input.ControllerEvent
      extended by at.wisch.joystick.event.AdvancedControllerEvent
          extended by at.wisch.joystick.event.ControllerAxisEvent

public class ControllerAxisEvent
extends AdvancedControllerEvent

The Class ControllerAxisEvent. If this event occurs, it means that an axis was moved. Movements within the dead zone are filtered and do not cause such an event.

Author:
Martin Wischenbart
See Also:
ControllerEventManager

Field Summary
 
Fields inherited from class at.wisch.joystick.event.AdvancedControllerEvent
BALL, POV
 
Fields inherited from class org.lwjgl.input.ControllerEvent
AXIS, BUTTON, POVX, POVY
 
Constructor Summary
ControllerAxisEvent(Controller source, long timeStamp, int axisIndex, float axisValue)
          Instantiates a new ControllerAxisEvent.
 
Method Summary
 float getAxisValue()
          Gets the new axis value.
 java.lang.String toString()
          Returns a String describing the AxisControllerEvent.
 
Methods inherited from class at.wisch.joystick.event.AdvancedControllerEvent
isBall, isPov, isPovX, isPovY, isXAxis, isYAxis
 
Methods inherited from class org.lwjgl.input.ControllerEvent
getControlIndex, getSource, getTimeStamp, isAxis, isButton
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ControllerAxisEvent

public ControllerAxisEvent(Controller source,
                           long timeStamp,
                           int axisIndex,
                           float axisValue)
Instantiates a new ControllerAxisEvent.

Parameters:
source - the Controller that generated the event
timeStamp - the timestamp given for this event
axisIndex - the index of the axis that has changed its value
axisValue - the new axis value
Method Detail

getAxisValue

public float getAxisValue()
Gets the new axis value. Use getControlIndex() to get the axis index.

Returns:
the axis value (from -1f to +1f)
See Also:
ControllerEvent.getControlIndex()

toString

public java.lang.String toString()
Returns a String describing the AxisControllerEvent. This String contains the Joystick index, the axis index and the new axis value.

Specified by:
toString in class AdvancedControllerEvent
Returns:
a String describing the AxisControllerEvent