sdljava.event

Class SDLJoyButtonEvent

public class SDLJoyButtonEvent extends SDLEvent

A SDLJoyButtonEvent event occurs when ever a user presses or releases a button on a joystick. The field which is the index of the joystick that reported the event and button is the index of the button (for a more detailed explanation see the Joystick section). state is the current state or the button which is either SDL_PRESSED or SDL_RELEASED.

Version: $Id: SDLJoyButtonEvent.java,v 1.5 2005/01/25 02:50:45 ivan_ganza Exp $

Author: Ivan Z. Ganza

Field Summary
SDL_JoyButtonEventswigEvent
Method Summary
intgetButton()
Get the button that was pressed
SDLPressedStategetState()
Get the state of the button
SDL_JoyButtonEventgetSwigEvent()
Gets the value of swigEvent
intgetType()
The type of the this event
intgetWhich()
Get Which joystick the event occured on
voidsetSwigEvent(SDL_JoyButtonEvent argSwigEvent)
Sets the value of swigEvent
StringtoString()
Return a string represenation of this object

Field Detail

swigEvent

SDL_JoyButtonEvent swigEvent

Method Detail

getButton

public int getButton()
Get the button that was pressed

Returns: the button that was pressed

getState

public SDLPressedState getState()
Get the state of the button

Returns: the state of the button

getSwigEvent

public SDL_JoyButtonEvent getSwigEvent()
Gets the value of swigEvent

Returns: the value of swigEvent

getType

public int getType()
The type of the this event

Returns: The type of event

getWhich

public int getWhich()
Get Which joystick the event occured on

Returns: Which joystick the event occured on

setSwigEvent

public void setSwigEvent(SDL_JoyButtonEvent argSwigEvent)
Sets the value of swigEvent

Parameters: argSwigEvent Value to assign to this.swigEvent

toString

public String toString()
Return a string represenation of this object

Returns: a String represenation of this object