public class DefaultJoystickAxis extends java.lang.Object implements JoystickAxis
LEFT_TRIGGER, POV_X, POV_Y, RIGHT_TRIGGER, X_AXIS, Y_AXIS, Z_AXIS, Z_ROTATION| Constructor and Description |
|---|
DefaultJoystickAxis(InputManager inputManager,
Joystick parent,
int axisIndex,
java.lang.String name,
java.lang.String logicalId,
boolean isAnalog,
boolean isRelative,
float deadZone)
Creates a new joystick axis instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
assignAxis(java.lang.String positiveMapping,
java.lang.String negativeMapping)
Assign the mappings to receive events from the given joystick axis.
|
int |
getAxisId()
Returns the axisId of this joystick axis.
|
float |
getDeadZone()
Returns the suggested dead zone for this axis.
|
Joystick |
getJoystick()
Returns the joystick to which this axis object belongs.
|
java.lang.String |
getLogicalId()
Returns the logical identifier of this joystick axis.
|
java.lang.String |
getName()
Returns the name of this joystick.
|
boolean |
isAnalog()
Returns true if this is an analog axis, meaning the values
are a continuous range instead of 1, 0, and -1.
|
boolean |
isRelative()
Returns true if this axis presents relative values.
|
void |
setDeadZone(float f)
Sets/overrides the dead zone for this axis.
|
java.lang.String |
toString() |
public DefaultJoystickAxis(InputManager inputManager, Joystick parent, int axisIndex, java.lang.String name, java.lang.String logicalId, boolean isAnalog, boolean isRelative, float deadZone)
public void assignAxis(java.lang.String positiveMapping,
java.lang.String negativeMapping)
assignAxis in interface JoystickAxispositiveMapping - The mapping to receive events when the axis is negativenegativeMapping - The mapping to receive events when the axis is positivepublic Joystick getJoystick()
getJoystick in interface JoystickAxispublic java.lang.String getName()
getName in interface JoystickAxispublic java.lang.String getLogicalId()
getLogicalId in interface JoystickAxispublic int getAxisId()
getAxisId in interface JoystickAxispublic boolean isAnalog()
isAnalog in interface JoystickAxispublic boolean isRelative()
isRelative in interface JoystickAxispublic float getDeadZone()
getDeadZone in interface JoystickAxispublic void setDeadZone(float f)
public java.lang.String toString()
toString in class java.lang.Object