support.convexhull
Class CanvasMouseListener

java.lang.Object
  extended by java.awt.event.MouseAdapter
      extended by support.convexhull.CanvasMouseListener
All Implemented Interfaces:
MouseListener, EventListener

public class CanvasMouseListener
extends MouseAdapter

Responds to mouse clicks on the Graphical Background


Constructor Summary
CanvasMouseListener(HullHelper h)
          Default Constructor
 
Method Summary
 void mouseClicked(MouseEvent e)
          Method called when the mouse is clicked.
 
Methods inherited from class java.awt.event.MouseAdapter
mouseEntered, mouseExited, mousePressed, mouseReleased
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CanvasMouseListener

public CanvasMouseListener(HullHelper h)
Default Constructor

Parameters:
h - The HullHelper upon which to call events
Method Detail

mouseClicked

public void mouseClicked(MouseEvent e)
Method called when the mouse is clicked. On a left click it adds a point to the hull. On a right click it displays the current coordinates of the cursor in the text boxes in the GUIPanel

Specified by:
mouseClicked in interface MouseListener
Overrides:
mouseClicked in class MouseAdapter
Parameters:
e - Default event passed in by Swing