org.jagatoo.input.listeners
Class MouseAdapter

java.lang.Object
  extended by org.jagatoo.input.listeners.MouseAdapter
All Implemented Interfaces:
MouseListener, MouseStopListener

public abstract class MouseAdapter
extends java.lang.Object
implements MouseListener, MouseStopListener

Simple adapter class that implements MouseListener.


Constructor Summary
MouseAdapter()
           
 
Method Summary
 long getMouseStopDelay()
          
 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 onMouseStopped(MouseStoppedEvent e, int x, int y)
          Invoked when a change of the mouse's position has not been registered for a certain amount of time.
 void onMouseWheelMoved(MouseWheelEvent e, int wheelDelta)
          Invoked when the mouse wheel has been moved
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MouseAdapter

public MouseAdapter()
Method Detail

onMouseButtonPressed

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

Specified by:
onMouseButtonPressed in interface MouseListener
Parameters:
e - the MouseEvent with all assotiated data

onMouseButtonReleased

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

Specified by:
onMouseButtonReleased in interface MouseListener
Parameters:
e - the MouseEvent with all assotiated data

onMouseButtonClicked

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

Specified by:
onMouseButtonClicked in interface MouseListener
Parameters:
e - the MouseEvent with all assotiated data

onMouseButtonStateChanged

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

Specified by:
onMouseButtonStateChanged in interface MouseListener
Parameters:
e - the MouseEvent with all assotiated data

onMouseMoved

public 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.

Specified by:
onMouseMoved in interface MouseListener
Parameters:
e - the MouseEvent with all assotiated data

onMouseWheelMoved

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

Specified by:
onMouseWheelMoved in interface MouseListener
Parameters:
e - the MouseEvent with all assotiated data

getMouseStopDelay

public long getMouseStopDelay()

Specified by:
getMouseStopDelay in interface MouseStopListener
Returns:
the number of nano-seconds, the mouse needs to have stopped to fire this MouseStopListener.

onMouseStopped

public void onMouseStopped(MouseStoppedEvent e,
                           int x,
                           int y)
Invoked when a change of the mouse's position has not been registered for a certain amount of time.

Specified by:
onMouseStopped in interface MouseStopListener
Parameters:
e - the MouseStoppedEvent