at.wisch.joystick.event
Class ControllerPovEvent

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

public class ControllerPovEvent
extends AdvancedControllerEvent

The Class ControllerPovEvent. If this event occurs, it means that a POV has changed its direction.

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
ControllerPovEvent(Controller source, long timeStamp, int povIndex, int povValue)
          Instantiates a new ControllerPovEvent.
 
Method Summary
 float getPovValue()
          Gets the POV direction value.
 java.lang.String toString()
          Returns a String describing the ControllerPovEvent.
 
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

ControllerPovEvent

public ControllerPovEvent(Controller source,
                          long timeStamp,
                          int povIndex,
                          int povValue)
Instantiates a new ControllerPovEvent.

Parameters:
source - the Controller that generated the event
timeStamp - the timestamp given for this event
povIndex - the index of the POV that changed its state
povValue - the new POV direction
Method Detail

getPovValue

public float getPovValue()
Gets the POV direction value. Use getControlIndex() to get the POV index.

Returns:
the POV direction
See Also:
ControllerEvent.getControlIndex()

toString

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

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