sdljava.event
Class SDLJoyHatEvent

java.lang.Object
  extended by sdljava.event.SDLEvent
      extended by sdljava.event.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
(package private)  SDL_JoyHatEvent swigEvent
           
 
Fields inherited from class sdljava.event.SDLEvent
activeEvent, dummyEvent, exposeEvent, joyAxisEvent, joyBallEvent, joyButtonEvent, joyHatEvent, mouseButtonEvent, mouseMotionEvent, quitEvent, resizeEvent, SDL_ACTIVEEVENT, SDL_ACTIVEEVENTMASK, SDL_ADDEVENT, SDL_APPACTIVE, SDL_APPINPUTFOCUS, SDL_APPMOUSEFOCUS, SDL_BUTTON_LEFT, SDL_BUTTON_MIDDLE, SDL_BUTTON_RIGHT, SDL_BUTTON_WHEELDOWN, SDL_BUTTON_WHEELUP, SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL, SDL_DISABLE, SDL_ENABLE, SDL_GETEVENT, SDL_IGNORE, SDL_JOYAXISMOTION, SDL_JOYAXISMOTIONMASK, SDL_JOYBALLMOTION, SDL_JOYBALLMOTIONMASK, SDL_JOYBUTTONDOWN, SDL_JOYBUTTONDOWNMASK, SDL_JOYBUTTONUP, SDL_JOYBUTTONUPMASK, SDL_JOYEVENTMASK, SDL_JOYHATMOTION, SDL_JOYHATMOTIONMASK, SDL_KEYDOWN, SDL_KEYDOWNMASK, SDL_KEYUP, SDL_KEYUPMASK, SDL_MOUSEBUTTONDOWN, SDL_MOUSEBUTTONDOWNMASK, SDL_MOUSEBUTTONUP, SDL_MOUSEBUTTONUPMASK, SDL_MOUSEEVENTMASK, SDL_MOUSEMOTION, SDL_MOUSEMOTIONMASK, SDL_NOEVENT, SDL_PEEKEVENT, SDL_PRESSED, SDL_QUERY, SDL_QUIT, SDL_QUITMASK, SDL_RELEASED, SDL_SYSWMEVENT, SDL_SYSWMEVENTMASK, SDL_USEREVENT, SDL_VIDEOEXPOSE, SDL_VIDEOEXPOSEMASK, SDL_VIDEORESIZE, SDL_VIDEORESIZEMASK, sdlKeyboardEvent, sysWMEvent, userEvent
 
Constructor Summary
SDLJoyHatEvent()
           
 
Method Summary
 int getHat()
           
 SDL_JoyHatEvent getSwigEvent()
          Gets the value of swigEvent
 int getType()
          The type of the this event
 HatState getValue()
           
 int getWhich()
           
 void setSwigEvent(SDL_JoyHatEvent argSwigEvent)
          Sets the value of swigEvent
 java.lang.String toString()
          Return a string represenation of this object
 
Methods inherited from class sdljava.event.SDLEvent
enableKeyRepeat, enableUNICODE, eventState, getAppState, getKeyName, getModState, getMouseState, getRelativeMouseState, joystickEventState, pollEvent, pollEvent, processEvent, pumpEvents, setModState, waitEvent, waitEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

swigEvent

SDL_JoyHatEvent swigEvent
Constructor Detail

SDLJoyHatEvent

public SDLJoyHatEvent()
Method Detail

getSwigEvent

public SDL_JoyHatEvent getSwigEvent()
Gets the value of swigEvent

Returns:
the value of swigEvent

setSwigEvent

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

Parameters:
argSwigEvent - Value to assign to this.swigEvent

getWhich

public int getWhich()

getHat

public int getHat()

getValue

public HatState getValue()

getType

public int getType()
The type of the this event

Specified by:
getType in class SDLEvent
Returns:
The type of event

toString

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

Overrides:
toString in class java.lang.Object
Returns:
a String represenation of this object