Class DefaultJoystickButton

java.lang.Object
com.jme3.input.DefaultJoystickButton
All Implemented Interfaces:
JoystickButton

public class DefaultJoystickButton extends Object implements JoystickButton
Default implementation of the JoystickButton interface.
  • Constructor Details

  • Method Details

    • assignButton

      public void assignButton(String mappingName)
      Assign the mapping name to receive events from the given button index on the joystick.
      Specified by:
      assignButton in interface JoystickButton
      Parameters:
      mappingName - The mapping to receive joystick button events.
    • getJoystick

      public Joystick getJoystick()
      Returns the joystick to which this axis object belongs.
      Specified by:
      getJoystick in interface JoystickButton
      Returns:
      the pre-existing instance
    • getName

      public String getName()
      Returns the name of this joystick.
      Specified by:
      getName in interface JoystickButton
      Returns:
      the name of this joystick.
    • getLogicalId

      public String getLogicalId()
      Returns the logical identifier of this joystick axis.
      Specified by:
      getLogicalId in interface JoystickButton
      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 interface JoystickButton
      Returns:
      the buttonId of this joystick axis.
    • toString

      public String toString()
      Overrides:
      toString in class Object