org.jscience.architecture.traffic.tools
Class ToolListener

java.lang.Object
  extended by org.jscience.architecture.traffic.tools.ToolListener
All Implemented Interfaces:
java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.util.EventListener

public class ToolListener
extends java.lang.Object
implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener

Serves as MouseListener and MouseMotionListener for View. Asks Controller for current Tool and invokes a method of this Tool when necessary. Created and set by Controller.


Constructor Summary
ToolListener(Controller con, View v)
          Creates a ToolListener.
 
Method Summary
 void mouseClicked(java.awt.event.MouseEvent e)
          Empty implementation, required by the MouseListener interface.
 void mouseDragged(java.awt.event.MouseEvent e)
          DOCUMENT ME!
 void mouseEntered(java.awt.event.MouseEvent e)
          Empty implementation, required by the MouseListener interface.
 void mouseExited(java.awt.event.MouseEvent e)
          Empty implementation, required by the MouseListener interface.
 void mouseMoved(java.awt.event.MouseEvent e)
          Invoked when the mouse cursor is moved over the View.
 void mousePressed(java.awt.event.MouseEvent e)
          Invoked when a mouse button is pressed on the View.
 void mouseReleased(java.awt.event.MouseEvent e)
          Invoked when a mouse button is released on the View.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ToolListener

public ToolListener(Controller con,
                    View v)
Creates a ToolListener.

Parameters:
con - The Controller maintaining the currently selected Tool.
con - The View.
Method Detail

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Invoked when a mouse button is pressed on the View.

Specified by:
mousePressed in interface java.awt.event.MouseListener
Parameters:
e - DOCUMENT ME!

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Invoked when a mouse button is released on the View.

Specified by:
mouseReleased in interface java.awt.event.MouseListener
Parameters:
e - DOCUMENT ME!

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)
Invoked when the mouse cursor is moved over the View.

Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener
Parameters:
e - DOCUMENT ME!

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent e)
DOCUMENT ME!

Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener
Parameters:
e - DOCUMENT ME!

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Empty implementation, required by the MouseListener interface.

Specified by:
mouseEntered in interface java.awt.event.MouseListener
Parameters:
e - DOCUMENT ME!

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Empty implementation, required by the MouseListener interface.

Specified by:
mouseExited in interface java.awt.event.MouseListener
Parameters:
e - DOCUMENT ME!

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Empty implementation, required by the MouseListener interface.

Specified by:
mouseClicked in interface java.awt.event.MouseListener
Parameters:
e - DOCUMENT ME!