q2_Pkg
Class Q2MouseMotionListener

java.lang.Object
  extended by q2_Pkg.Q2MouseMotionListener
All Implemented Interfaces:
java.awt.event.MouseMotionListener, java.util.EventListener

public class Q2MouseMotionListener
extends java.lang.Object
implements java.awt.event.MouseMotionListener

This class encapsulates a listener for mouse motion events.
If the mouse is moving, then this listener prints to the console which quadrant of the screen the user is moving in. For instance, if the user is moving in the top right quadrant, the string that should be printed to the console is "UPPER-RIGHT" (the strings for the other quadrants are "UPPER-LEFT", "LOWER-RIGHT", "LOWER_LEFT").
If the mouse motion event corresponds to the user dragging the mouse, this listener should do nothing.

Author:
mb

Constructor Summary
Q2MouseMotionListener()
           
 
Method Summary
 void mouseDragged(java.awt.event.MouseEvent e)
           
 void mouseMoved(java.awt.event.MouseEvent e)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Q2MouseMotionListener

public Q2MouseMotionListener()
Method Detail

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent e)
Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)
Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener