lab3lib.faces
Class Face

java.lang.Object
  extended by lab3lib.faces.Face

public class Face
extends Object

A face that can react when clicked upon.

Author:
Adrienne M Decker Created on: Sep 16, 2006

Constructor Summary
Face()
          Creates a new instance of Face
 
Method Summary
 void closeEyes()
          Tell the face to close its eyes.
 Dimension getDimension()
          Get the current dimension of the face.
 Point getLocation()
          Get the location where the face is.
 void openEyes()
          Tell the face to open its eyes.
 void rollEyes()
          Tell the face to roll its eyes.
 void setColor(Color newColor)
          Sets the color of the face.
 void setDimension(Dimension d)
          Change the dimension of the face.
 void setLocation(Point p)
          Change the location of the face.
 void surprise()
          Tell the face to look surprised.
 void yawn()
          Tell the face to yawn.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Face

public Face()
Creates a new instance of Face

Method Detail

setColor

public void setColor(Color newColor)
Sets the color of the face.

Parameters:
newColor - The color to set the face to.

rollEyes

public void rollEyes()
Tell the face to roll its eyes.


surprise

public void surprise()
Tell the face to look surprised.


yawn

public void yawn()
Tell the face to yawn.


closeEyes

public void closeEyes()
Tell the face to close its eyes.


openEyes

public void openEyes()
Tell the face to open its eyes.


setLocation

public void setLocation(Point p)
Change the location of the face.

Parameters:
p - The upper left hand corner of where the face should be.

getLocation

public Point getLocation()
Get the location where the face is.

Returns:
The upper left hand corner of the face's bounding box.

setDimension

public void setDimension(Dimension d)
Change the dimension of the face.

Parameters:
d - The new dimension for the face.

getDimension

public Dimension getDimension()
Get the current dimension of the face.

Returns:
The face's current dimension.