at.wisch.joystick.event
Class AdvancedControllerEvent

java.lang.Object
  extended by org.lwjgl.input.ControllerEvent
      extended by at.wisch.joystick.event.AdvancedControllerEvent
Direct Known Subclasses:
ControllerAxisEvent, ControllerBallEvent, ControllerButtonEvent, ControllerPovEvent

public abstract class AdvancedControllerEvent
extends ControllerEvent

The Class AdvancedControllerEvent. It extends ControllerEvent to support more advanced controllers. If event listening is enabled, AdvancedControllerEvents occur whenever an input value of a controller changes.

Author:
Martin Wischenbart
See Also:
ControllerEventManager, ControllerEventListener

Field Summary
static int BALL
          Indicates the event was caused by a trackball: the object is a ControllerBallEvent (casting is safe).
static int POV
          Indicates the event was caused by a POV (X or Y axis): the object is a ControllerPovEvent (casting is safe).
 
Fields inherited from class org.lwjgl.input.ControllerEvent
AXIS, BUTTON, POVX, POVY
 
Method Summary
 boolean isBall()
          Check if this event was generated by a trackball.
 boolean isPov()
          Check if this event was generated by a POV.
 boolean isPovX()
          Check if this event was generated by a POV axis.
 boolean isPovY()
          Check if this event was generated by a POV axis.
 boolean isXAxis()
          Check if this event was caused by the X axis.
 boolean isYAxis()
          Check if this event was caused by the Y axis.
abstract  java.lang.String toString()
          Returns a String describing the ControllerEvent.
 
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
 

Field Detail

POV

public static final int POV
Indicates the event was caused by a POV (X or Y axis): the object is a ControllerPovEvent (casting is safe).

See Also:
Constant Field Values

BALL

public static final int BALL
Indicates the event was caused by a trackball: the object is a ControllerBallEvent (casting is safe).

See Also:
Constant Field Values
Method Detail

isPov

public boolean isPov()
Check if this event was generated by a POV.

Returns:
true, if this event was generated by a POV (any axis). false, otherwise.

isPovX

public boolean isPovX()
Check if this event was generated by a POV axis. This implementation does not allow distinguishing between X and Y axis.

Overrides:
isPovX in class ControllerEvent
Returns:
true, if this event was generated by a POV (any axis). false, otherwise.

isPovY

public boolean isPovY()
Check if this event was generated by a POV axis. This implementation does not allow distinguishing between X and Y axis.

Overrides:
isPovY in class ControllerEvent
Returns:
true, if this event was generated by a POV (any axis). false, otherwise.

isBall

public boolean isBall()
Check if this event was generated by a trackball.

Returns:
True if this event was generated by a trackball

isXAxis

public boolean isXAxis()
Check if this event was caused by the X axis.

Overrides:
isXAxis in class ControllerEvent
Returns:
true, if this event was caused by the X axis. false, otherwise.

isYAxis

public boolean isYAxis()
Check if this event was caused by the Y axis.

Overrides:
isYAxis in class ControllerEvent
Returns:
true, if this event was caused by the Y axis. false, otherwise.

toString

public abstract java.lang.String toString()
Returns a String describing the ControllerEvent.

Overrides:
toString in class ControllerEvent
Returns:
a String describing the ControllerEvent