@Override
    @Deprecated
    public void assignButton(String mappingName, int buttonId) {
        if (buttonId < 0 || buttonId >= getButtonCount())
            throw new IllegalArgumentException();

        inputManager.addMapping(mappingName, new JoyButtonTrigger(joyId, buttonId));
    }
Assign the mapping name to receive events from the given button index
on the joystick.

@param mappingName The mapping to receive joystick button events.
@param buttonId The button index.

@see Joystick#getButtonCount()
@deprecated Use JoystickButton.assignButton() instead.
jme3-core/src/main/java/com/jme3/input/AbstractJoystick.java