sdljava.event

Class MouseState

public class MouseState extends Object

The current state of the mouse. The x and y position as well as the button state.

Version: $Id: MouseState.java,v 1.1 2004/12/27 06:23:49 ivan_ganza Exp $

Author: Ivan Z. Ganza

Field Summary
MouseButtonStatebuttonState
intx
inty
Constructor Summary
MouseState(int x, int y, int buttons)
Creates a new MouseState instance.
Method Summary
MouseButtonStategetButtonState()
Gets the value of buttonState
intgetX()
Gets the value of x
intgetY()
Gets the value of y
StringtoString()
Return a string represenation of this object

Field Detail

buttonState

MouseButtonState buttonState

x

int x

y

int y

Constructor Detail

MouseState

public MouseState(int x, int y, int buttons)
Creates a new MouseState instance.

Parameters: x an int value y an int value buttons an int value

Method Detail

getButtonState

public MouseButtonState getButtonState()
Gets the value of buttonState

Returns: the value of buttonState

getX

public int getX()
Gets the value of x

Returns: the value of x

getY

public int getY()
Gets the value of y

Returns: the value of y

toString

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

Returns: a String represenation of this object