Package com.jme3.input
Class DefaultJoystickButton
java.lang.Object
com.jme3.input.DefaultJoystickButton
- All Implemented Interfaces:
JoystickButton
Default implementation of the JoystickButton interface.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionDefaultJoystickButton
(InputManager inputManager, Joystick parent, int buttonIndex, String name, String logicalId) -
Method Summary
Modifier and TypeMethodDescriptionvoid
assignButton
(String mappingName) Assign the mapping name to receive events from the given button index on the joystick.int
Returns the unique buttonId of this joystick axis within a given InputManager context.Returns the joystick to which this axis object belongs.Returns the logical identifier of this joystick axis.getName()
Returns the name of this joystick.toString()
-
Constructor Details
-
DefaultJoystickButton
public DefaultJoystickButton(InputManager inputManager, Joystick parent, int buttonIndex, String name, String logicalId)
-
-
Method Details
-
assignButton
Assign the mapping name to receive events from the given button index on the joystick.- Specified by:
assignButton
in interfaceJoystickButton
- Parameters:
mappingName
- The mapping to receive joystick button events.
-
getJoystick
Returns the joystick to which this axis object belongs.- Specified by:
getJoystick
in interfaceJoystickButton
- Returns:
- the pre-existing instance
-
getName
Returns the name of this joystick.- Specified by:
getName
in interfaceJoystickButton
- Returns:
- the name of this joystick.
-
getLogicalId
Returns the logical identifier of this joystick axis.- Specified by:
getLogicalId
in interfaceJoystickButton
- Returns:
- the logical identifier of this joystick.
-
getButtonId
public int getButtonId()Returns the unique buttonId of this joystick axis within a given InputManager context.- Specified by:
getButtonId
in interfaceJoystickButton
- Returns:
- the buttonId of this joystick axis.
-
toString
-