com.jme.input
Interface MouseInputListener

All Known Subinterfaces:
SWTMouseInputListener
All Known Implementing Classes:
ControlFieldListener, TriggersMouseInputListener

public interface MouseInputListener

This interface is used to receive mouse events from MouseInput.update().


Method Summary
 void onButton(int button, boolean pressed, int x, int y)
          Called in KeyInput.update() whenever a mouse button is pressed or released.
 void onMove(int xDelta, int yDelta, int newX, int newY)
          Called in KeyInput.update() whenever the mouse is moved.
 void onWheel(int wheelDelta, int x, int y)
          Called in KeyInput.update() whenever the mouse wheel is rotated.
 

Method Detail

onButton

void onButton(int button,
              boolean pressed,
              int x,
              int y)
Called in KeyInput.update() whenever a mouse button is pressed or released.

Parameters:
button - index of the mouse button that was pressed/released
pressed - true if button was pressed, false if released
x - x position of the mouse while button was pressed/released
y - y position of the mouse while button was pressed/released

onWheel

void onWheel(int wheelDelta,
             int x,
             int y)
Called in KeyInput.update() whenever the mouse wheel is rotated.

Parameters:
wheelDelta - steps the wheel was rotated
x - x position of the mouse while wheel was rotated
y - y position of the mouse while wheel was rotated

onMove

void onMove(int xDelta,
            int yDelta,
            int newX,
            int newY)
Called in KeyInput.update() whenever the mouse is moved.

Parameters:
xDelta - delta of the x coordinate since the last mouse movement event
yDelta - delta of the y coordinate since the last mouse movement event
newX - x position of the mouse after the mouse was moved
newY - y position of the mouse after the mouse was moved