support.convexhull
Class CanvasMouseListener
java.lang.Object
java.awt.event.MouseAdapter
support.convexhull.CanvasMouseListener
- All Implemented Interfaces:
- MouseListener, EventListener
public class CanvasMouseListener
- extends MouseAdapter
Responds to mouse clicks on the Graphical Background
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CanvasMouseListener
public CanvasMouseListener(HullHelper h)
- Default Constructor
- Parameters:
h - The HullHelper upon which to call events
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