sdljava.event

Class SDLJoyHatEvent

public class SDLJoyHatEvent extends SDLEvent

A SDLJoyHatEvent event occurs when ever a user moves a hat on the joystick. The field which is the index of the joystick that reported the event and hat is the index of the hat (for a more detailed explanation see the Joystick section). value is the current position of the hat. It is a bitwise OR'd combination of the following values (whose meanings should be pretty obvious):

SDL_HAT_CENTERED
SDL_HAT_UP
SDL_HAT_RIGHT
SDL_HAT_DOWN
SDL_HAT_LEFT

The following defines are also provided:
SDL_HAT_RIGHTUP
SDL_HAT_RIGHTDOWN
SDL_HAT_LEFTUP
SDL_HAT_LEFTDOWN

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

Author: Ivan Z. Ganza

Field Summary
SDL_JoyHatEventswigEvent
Method Summary
intgetHat()
SDL_JoyHatEventgetSwigEvent()
Gets the value of swigEvent
intgetType()
The type of the this event
HatStategetValue()
intgetWhich()
voidsetSwigEvent(SDL_JoyHatEvent argSwigEvent)
Sets the value of swigEvent
StringtoString()
Return a string represenation of this object

Field Detail

swigEvent

SDL_JoyHatEvent swigEvent

Method Detail

getHat

public int getHat()

getSwigEvent

public SDL_JoyHatEvent 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

getValue

public HatState getValue()

getWhich

public int getWhich()

setSwigEvent

public void setSwigEvent(SDL_JoyHatEvent 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