at.wisch.joystick.event
Class ControllerBallEvent
java.lang.Object
org.lwjgl.input.ControllerEvent
at.wisch.joystick.event.AdvancedControllerEvent
at.wisch.joystick.event.ControllerBallEvent
public class ControllerBallEvent
- extends AdvancedControllerEvent
The Class ControllerBallEvent. If this event occurs, it means that a trackball was moved.
- Author:
- Martin Wischenbart
- See Also:
ControllerEventManager
Constructor Summary |
ControllerBallEvent(Controller source,
long timeStamp,
int ballIndex,
int[] deltas)
Instantiates a new controller ball event. |
Method Summary |
int[] |
getDeltas()
Gets the deltas for X and Y axis. |
java.lang.String |
toString()
Returns a String describing the ControllerBallEvent. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ControllerBallEvent
public ControllerBallEvent(Controller source,
long timeStamp,
int ballIndex,
int[] deltas)
- Instantiates a new controller ball event.
- Parameters:
source
- the Controller that generated the eventtimeStamp
- the timestamp given for this eventballIndex
- the index of the trackball that has moveddeltas
- the deltas describing the movement in X and Y direction (int array of size 2)
getDeltas
public int[] getDeltas()
- Gets the deltas for X and Y axis. Use getControlIndex() to get the trackball index.
- Returns:
- the deltas (an int array of size 2, representing X and Y axis)
- See Also:
ControllerEvent.getControlIndex()
toString
public java.lang.String toString()
- Returns a String describing the ControllerBallEvent. This String contains the Joystick index, the trackball index and the trackball delta values.
- Specified by:
toString
in class AdvancedControllerEvent
- Returns:
- a String describing the ControllerBallEvent