public class DefaultJoystickButton extends java.lang.Object implements JoystickButton
| Constructor and Description |
|---|
DefaultJoystickButton(InputManager inputManager,
Joystick parent,
int buttonIndex,
java.lang.String name,
java.lang.String logicalId) |
| Modifier and Type | Method and Description |
|---|---|
void |
assignButton(java.lang.String mappingName)
Assign the mapping name to receive events from the given button index
on the joystick.
|
int |
getButtonId()
Returns the unique buttonId of this joystick axis within a given
InputManager context.
|
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.
|
java.lang.String |
toString() |
public DefaultJoystickButton(InputManager inputManager, Joystick parent, int buttonIndex, java.lang.String name, java.lang.String logicalId)
public void assignButton(java.lang.String mappingName)
assignButton in interface JoystickButtonmappingName - The mapping to receive joystick button events.public Joystick getJoystick()
getJoystick in interface JoystickButtonpublic java.lang.String getName()
getName in interface JoystickButtonpublic java.lang.String getLogicalId()
getLogicalId in interface JoystickButtonpublic int getButtonId()
getButtonId in interface JoystickButtonpublic java.lang.String toString()
toString in class java.lang.Object