org.jagatoo.input.managers
Class MouseStopManager

java.lang.Object
  extended by org.jagatoo.input.managers.MouseStopManager

public class MouseStopManager
extends java.lang.Object

Looks for the mouse beeing stopped for a specified amount of milliseconds.


Constructor Summary
MouseStopManager()
           
 
Method Summary
 void addMouseStopListener(MouseStopListener l)
          Adds a MouseStopListener to this Mouse to be notified when the mouse has stopped being moved (for a while).
 void fireOnMouseStopped(Mouse mouse, MouseStoppedEvent e, boolean consumeEvent)
          Fires a MouseStoppedEvent and pushes it back to the pool, if consumeEvent is true.
 void fireOnMouseStopped(MouseStoppedEvent e, MouseStopListener listener, boolean consumeEvent)
          Fires a MouseStoppedEvent and pushes it back to the pool, if consumeEvent is true.
 boolean hasMouseListener()
           
 void notifyMouseMoved(Mouse mouse, long nanoTime)
          Notifies this StopManager of a mouse-moved event, so that it can know, when the mouse has not moved for a while an hence has stopped.
 void removeMouseStopListener(MouseStopListener l)
          Removes a MouseStopListener from the list of notified instances.
 void update(Mouse mouse, long nanoTime)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MouseStopManager

public MouseStopManager()
Method Detail

addMouseStopListener

public void addMouseStopListener(MouseStopListener l)
Adds a MouseStopListener to this Mouse to be notified when the mouse has stopped being moved (for a while).

Parameters:
l -

removeMouseStopListener

public void removeMouseStopListener(MouseStopListener l)
Removes a MouseStopListener from the list of notified instances.

Parameters:
l -

hasMouseListener

public final boolean hasMouseListener()
Returns:
true, of at least one MouseStopListener is currently registered.

fireOnMouseStopped

public final void fireOnMouseStopped(MouseStoppedEvent e,
                                     MouseStopListener listener,
                                     boolean consumeEvent)
Fires a MouseStoppedEvent and pushes it back to the pool, if consumeEvent is true.

Parameters:
e -
listener -
consumeEvent -

fireOnMouseStopped

public final void fireOnMouseStopped(Mouse mouse,
                                     MouseStoppedEvent e,
                                     boolean consumeEvent)
Fires a MouseStoppedEvent and pushes it back to the pool, if consumeEvent is true.

Parameters:
mouse -
e -
consumeEvent -

notifyMouseMoved

public final void notifyMouseMoved(Mouse mouse,
                                   long nanoTime)
Notifies this StopManager of a mouse-moved event, so that it can know, when the mouse has not moved for a while an hence has stopped.

Parameters:
mouse -
nanoTime -

update

public final void update(Mouse mouse,
                         long nanoTime)