public interface Joystick
Modifier and Type | Method and Description |
---|---|
void |
assignAxis(java.lang.String positiveMapping,
java.lang.String negativeMapping,
int axisId)
Deprecated.
Use JoystickAxis.assignAxis() instead.
|
void |
assignButton(java.lang.String mappingName,
int buttonId)
Deprecated.
Use JoystickButton.assignButton() instead.
|
java.util.List<JoystickAxis> |
getAxes()
Returns a read-only list of all joystick axes for this Joystick.
|
JoystickAxis |
getAxis(java.lang.String logicalId)
Returns the JoystickAxis with the specified logical ID.
|
int |
getAxisCount()
Returns the number of axes on this joystick.
|
JoystickButton |
getButton(java.lang.String logicalId)
Returns the JoystickButton with the specified logical ID.
|
int |
getButtonCount()
Returns the number of buttons on this joystick.
|
java.util.List<JoystickButton> |
getButtons()
Returns a read-only list of all joystick buttons for this Joystick.
|
int |
getJoyId()
Returns the joyId of this joystick.
|
java.lang.String |
getName()
Returns the name of this joystick.
|
JoystickAxis |
getPovXAxis()
Returns the POV X axis for this joystick.
|
JoystickAxis |
getPovYAxis()
Returns the POV Y axis for this joystick.
|
JoystickAxis |
getXAxis()
Returns the X axis for this joystick.
|
int |
getXAxisIndex()
Gets the index number for the X axis on the joystick.
|
JoystickAxis |
getYAxis()
Returns the Y axis for this joystick.
|
int |
getYAxisIndex()
Gets the index number for the Y axis on the joystick.
|
void |
rumble(float amount)
Rumbles the joystick for the given amount/magnitude.
|
void rumble(float amount)
amount
- The amount to rumble. Should be between 0 and 1.@Deprecated void assignButton(java.lang.String mappingName, int buttonId)
mappingName
- The mapping to receive joystick button events.buttonId
- The button index.getButtonCount()
@Deprecated void assignAxis(java.lang.String positiveMapping, java.lang.String negativeMapping, int axisId)
positiveMapping
- The mapping to receive events when the axis is negativenegativeMapping
- The mapping to receive events when the axis is positiveaxisId
- The axis index.getAxisCount()
JoystickAxis getAxis(java.lang.String logicalId)
logicalId
- The id of the axis to search for as returned by JoystickAxis.getLogicalId().java.util.List<JoystickAxis> getAxes()
JoystickButton getButton(java.lang.String logicalId)
logicalId
- The id of the axis to search for as returned by JoystickButton.getLogicalId().java.util.List<JoystickButton> getButtons()
JoystickAxis getXAxis()
E.g. for most gamepads, the left control stick X axis will be returned.
JoystickAxis.assignAxis(java.lang.String, java.lang.String)
JoystickAxis getYAxis()
E.g. for most gamepads, the left control stick Y axis will be returned.
JoystickAxis.assignAxis(java.lang.String, java.lang.String)
JoystickAxis getPovXAxis()
JoystickAxis.assignAxis(java.lang.String, java.lang.String)
JoystickAxis getPovYAxis()
JoystickAxis.assignAxis(java.lang.String, java.lang.String)
int getXAxisIndex()
E.g. for most gamepads, the left control stick X axis will be returned.
assignAxis(java.lang.String, java.lang.String, int)
int getYAxisIndex()
E.g. for most gamepads, the left control stick Y axis will be returned.
assignAxis(java.lang.String, java.lang.String, int)
int getAxisCount()
int getButtonCount()
java.lang.String getName()
int getJoyId()