org.jagatoo.input.listeners
Interface MouseListener

All Known Subinterfaces:
InputListener
All Known Implementing Classes:
InputAdapter, ListeningInputHandler, MouseAdapter

public interface MouseListener

Listens for generic mouse events by any complying mouse input API. Events include button presses and releases and mouse positions. Exclusive mode is also supported where the mouse does not have a position, but rather mouse movements (deltas) on a given axis are reported.


Method Summary
 void onMouseButtonClicked(MouseButtonClickedEvent e, MouseButton button, int clickCount)
          Invoked when a button click was registered by the mouse device.
 void onMouseButtonPressed(MouseButtonPressedEvent e, MouseButton button)
          Invoked when a button press was registered by the mouse device.
 void onMouseButtonReleased(MouseButtonReleasedEvent e, MouseButton button)
          Invoked when a button release was registered by the mouse device.
 void onMouseButtonStateChanged(MouseButtonEvent e, MouseButton button, boolean state)
          Invoked when a button state-change was registered by the mouse device.
 void onMouseMoved(MouseMovedEvent e, int x, int y, int dx, int dy)
          Invoked when a change of the mouse's position was registered by the mouse device while in non-exclusive mode.
 void onMouseWheelMoved(MouseWheelEvent e, int wheelDelta)
          Invoked when the mouse wheel has been moved
 

Method Detail

onMouseButtonPressed

void onMouseButtonPressed(MouseButtonPressedEvent e,
                          MouseButton button)
Invoked when a button press was registered by the mouse device.

Parameters:
e - the MouseEvent with all assotiated data
button -

onMouseButtonReleased

void onMouseButtonReleased(MouseButtonReleasedEvent e,
                           MouseButton button)
Invoked when a button release was registered by the mouse device.

Parameters:
e - the MouseEvent with all assotiated data
button -

onMouseButtonClicked

void onMouseButtonClicked(MouseButtonClickedEvent e,
                          MouseButton button,
                          int clickCount)
Invoked when a button click was registered by the mouse device.

Parameters:
e - the MouseEvent with all assotiated data
button -
clickCount -

onMouseButtonStateChanged

void onMouseButtonStateChanged(MouseButtonEvent e,
                               MouseButton button,
                               boolean state)
Invoked when a button state-change was registered by the mouse device.

Parameters:
e - the MouseEvent with all assotiated data
button -
state -

onMouseMoved

void onMouseMoved(MouseMovedEvent e,
                  int x,
                  int y,
                  int dx,
                  int dy)
Invoked when a change of the mouse's position was registered by the mouse device while in non-exclusive mode.

Parameters:
e - the MouseEvent with all assotiated data
x -
y -
dx -
dy -

onMouseWheelMoved

void onMouseWheelMoved(MouseWheelEvent e,
                       int wheelDelta)
Invoked when the mouse wheel has been moved

Parameters:
e - the MouseEvent with all assotiated data
wheelDelta -