sdljava.event
Class MouseState

java.lang.Object
  extended by sdljava.event.MouseState

public class MouseState
extends java.lang.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
(package private)  MouseButtonState buttonState
           
(package private)  int x
           
(package private)  int y
           
 
Constructor Summary
MouseState(int x, int y, int buttons)
          Creates a new MouseState instance.
 
Method Summary
 MouseButtonState getButtonState()
          Gets the value of buttonState
 int getX()
          Gets the value of x
 int getY()
          Gets the value of y
 java.lang.String toString()
          Return a string represenation of this object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

x

int x

y

int y

buttonState

MouseButtonState buttonState
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

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

getButtonState

public MouseButtonState getButtonState()
Gets the value of buttonState

Returns:
the value of buttonState

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