com.jme.input
Interface MouseInput

All Known Implementing Classes:
LWJGLMouseInput

public interface MouseInput

MouseInput defines an interface to communicate with the mouse input device.

Version:
$Id: MouseInput.java,v 1.6 2004/04/22 22:26:30 renanse Exp $
Author:
Mark Powell

Field Summary
static int BUTTON_1
           
static int BUTTON_1_2
           
static int BUTTON_1_2_3
           
static int BUTTON_1_3
           
static int BUTTON_2
           
static int BUTTON_2_3
           
static int BUTTON_3
           
 
Method Summary
 void destroy()
          destroy cleans up the native mouse interface.
 int getButtonIndex(java.lang.String buttonName)
          getButtonIndex gets the button code for a given button name.
 java.lang.String getButtonName(int buttonIndex)
          getButtonName gets the button name for a given button code.
 MouseButtonStateType getButtonState()
           
 MouseButtonStateType getPreviousButtonState()
           
 int getWheelDelta()
          getWheelDelta gets the change in the mouse wheel.
 int getXAbsolute()
          getXAbsolute gets the absolute x axis value.
 int getXDelta()
          getXDelta gets the change along the x axis.
 int getYAbsolute()
          getYAbsolute gets the absolute y axis value.
 int getYDelta()
          getYDelta gets the change along the y axis.
 boolean isButtonDown(int buttonCode)
          isButtonDown returns true if a given button is pressed, false if it is not pressed.
 boolean isCreated()
          isCreated returns true if the mouse input is created, false otherwise.
 boolean isCursorVisible()
          isCursorVisible
 void poll()
          poll updates the mouse.
 void setCursorVisible(boolean v)
          setCursorVisible sets the visiblity of the hardware cursor.
 void updateState()
          updateState updates the mouse state.
 

Field Detail

BUTTON_1

public static final int BUTTON_1
See Also:
Constant Field Values

BUTTON_2

public static final int BUTTON_2
See Also:
Constant Field Values

BUTTON_3

public static final int BUTTON_3
See Also:
Constant Field Values

BUTTON_1_2

public static final int BUTTON_1_2
See Also:
Constant Field Values

BUTTON_1_3

public static final int BUTTON_1_3
See Also:
Constant Field Values

BUTTON_2_3

public static final int BUTTON_2_3
See Also:
Constant Field Values

BUTTON_1_2_3

public static final int BUTTON_1_2_3
See Also:
Constant Field Values
Method Detail

destroy

public void destroy()
destroy cleans up the native mouse interface.


getButtonIndex

public int getButtonIndex(java.lang.String buttonName)
getButtonIndex gets the button code for a given button name.

Parameters:
buttonName - the name to get the code for.
Returns:
the code for the given button name.

isButtonDown

public boolean isButtonDown(int buttonCode)
isButtonDown returns true if a given button is pressed, false if it is not pressed.

Parameters:
buttonCode - the button code to check.
Returns:
true if the button is pressed, false otherwise.

getButtonName

public java.lang.String getButtonName(int buttonIndex)
getButtonName gets the button name for a given button code.

Parameters:
buttonIndex - the code to get the name for.
Returns:
the name for the given button code.

isCreated

public boolean isCreated()
isCreated returns true if the mouse input is created, false otherwise.

Returns:
true if the mouse input is created, false otherwise.

poll

public void poll()
poll updates the mouse.


getWheelDelta

public int getWheelDelta()
getWheelDelta gets the change in the mouse wheel.

Returns:
the change in the mouse wheel.

getXDelta

public int getXDelta()
getXDelta gets the change along the x axis.

Returns:
the change along the x axis.

getYDelta

public int getYDelta()
getYDelta gets the change along the y axis.

Returns:
the change along the y axis.

getXAbsolute

public int getXAbsolute()
getXAbsolute gets the absolute x axis value.

Returns:
the absolute x axis value.

getYAbsolute

public int getYAbsolute()
getYAbsolute gets the absolute y axis value.

Returns:
the absolute y axis value.

updateState

public void updateState()
updateState updates the mouse state.


setCursorVisible

public void setCursorVisible(boolean v)
setCursorVisible sets the visiblity of the hardware cursor.

Parameters:
v - true turns the cursor on false turns it off

isCursorVisible

public boolean isCursorVisible()
isCursorVisible

Returns:
the visibility of the hardware cursor

getButtonState

public MouseButtonStateType getButtonState()
Returns:
the state of the mouse buttons.

getPreviousButtonState

public MouseButtonStateType getPreviousButtonState()
Returns:
the previous state of the mouse buttons.