cs015.SP
Class CloudShape

java.lang.Object
  extended bycs015.SP.CloudShape
All Implemented Interfaces:
java.util.EventListener, java.awt.event.MouseListener

public class CloudShape
extends java.lang.Object
implements java.awt.event.MouseListener

A cloud shape that is capable of knowing when it is clicked on. However nothing happens currently when it is clicked on, react must be overridden to do something useful.

Author:
Matt Chotin (mhc)

Constructor Summary
CloudShape()
          Create the cloud and position it on the screen.
 
Method Summary
 void mouseClicked(java.awt.event.MouseEvent e)
           
 void mouseEntered(java.awt.event.MouseEvent e)
           
 void mouseExited(java.awt.event.MouseEvent e)
           
 void mousePressed(java.awt.event.MouseEvent e)
           
 void mouseReleased(java.awt.event.MouseEvent e)
           
 void react()
          This method is called when a mouse click is detected on the cloud.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CloudShape

public CloudShape()
Create the cloud and position it on the screen.

Method Detail

react

public void react()
This method is called when a mouse click is detected on the cloud. For this class, the method does not do anything, you have to subclass from the Cloud and redefine this method to make it do something userful in response to the mouse click.


mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Specified by:
mouseExited in interface java.awt.event.MouseListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Specified by:
mouseReleased in interface java.awt.event.MouseListener