sdljava.event
public class MouseButtonState extends Object
Version: $Id: MouseButtonState.java,v 1.4 2005/01/19 03:09:12 ivan_ganza Exp $
Field Summary | |
---|---|
int | buttons
Current button state values (possibly ORed together)
|
static Map | buttonStateCache
cache of MouseButtonState instances, one for each possible
mods values
|
static int | SDL_BUTTON_LEFT |
static int | SDL_BUTTON_MIDDLE |
static int | SDL_BUTTON_RIGHT |
static int | SDL_BUTTON_WHEELDOWN |
static int | SDL_BUTTON_WHEELUP |
Constructor Summary | |
---|---|
protected | MouseButtonState(int buttons)
Creates a new MouseButtonState instance.
|
Method Summary | |
---|---|
int | button(int x) |
boolean | buttonLeft()
Get if the left mouse button is pressed
|
boolean | buttonMiddle()
Get if the middle mouse button is pressed
|
boolean | buttonRight()
Get if the right mouse button is pressed
|
static MouseButtonState | get(int buttons)
Get the MouseButtonState instance identified by mods. |
int | getState() |
String | toString()
Return a string represenation of this object
|
boolean | wheelDown()
Get if the wheel is down
|
boolean | wheelUp()
Get if the wheel is up
|
MouseButtonState
instance.
Parameters: buttons an int
value
Returns: if the left mouse button is pressed
Returns: if the middle mouse button is pressed
Returns: if the middle mouse button is pressed
Parameters: mods valid button state (possibly OR'd together)
Returns: The singleton MouseButtonState instance
Returns: a String represenation of this object
Returns: if the wheel is down
Returns: if the wheel is in the up