Class SimMouseListener

java.lang.Object
  extended bySimMouseListener
All Implemented Interfaces:
EventListener, MouseListener

class SimMouseListener
extends Object
implements MouseListener

Handle mouse clicks for the BallSimControl window.

Version:
4/18/03, 4/19/94
Author:
Hal Perkins

Constructor Summary
SimMouseListener(SimModel world)
          Constructor for objects of class SimMouseListener
 
Method Summary
 void mouseClicked(MouseEvent e)
          Process mouse click by adding a new ball to the simulation at the location of the click with a random color, size, and velocity
 void mouseEntered(MouseEvent e)
           
 void mouseExited(MouseEvent e)
           
 void mousePressed(MouseEvent e)
           
 void mouseReleased(MouseEvent e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimMouseListener

public SimMouseListener(SimModel world)
Constructor for objects of class SimMouseListener

Parameters:
world - the model object containing the state of the system
Method Detail

mouseClicked

public void mouseClicked(MouseEvent e)
Process mouse click by adding a new ball to the simulation at the location of the click with a random color, size, and velocity

Specified by:
mouseClicked in interface MouseListener
Parameters:
e - the mouse click event

mouseEntered

public void mouseEntered(MouseEvent e)
Specified by:
mouseEntered in interface MouseListener

mouseExited

public void mouseExited(MouseEvent e)
Specified by:
mouseExited in interface MouseListener

mousePressed

public void mousePressed(MouseEvent e)
Specified by:
mousePressed in interface MouseListener

mouseReleased

public void mouseReleased(MouseEvent e)
Specified by:
mouseReleased in interface MouseListener