lab3lib.faces
Class Eye

java.lang.Object
  extended by cse115.graphics.AbstractGraphic
      extended by cse115.graphics.AbstractColorableGraphic
          extended by cse115.graphics.Ellipse
              extended by lab3lib.faces.Eye
All Implemented Interfaces:
CenterLocatable, Colorable, ColorableGraphic, Graphic, Locatable, Rotatable, Sizeable

public class Eye
extends Ellipse

An eye that can be put on a face. Based on the Eye written by Carl Alphonce - ask him about the behaviors.

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

Constructor Summary
Eye(Face myFace)
          Creates a new instance of Eye
 
Method Summary
 void close()
          Tell the eye to close
 void open()
          Tell the eye to open
 void openWide()
          Tell the eye to open wide (become larger).
 void roll(int increment)
          Tell this eye to roll.
 void setDimension(Dimension d)
          Changes the Dimension of this Graphic
 void setLocation(Point p)
          Changes the location of this graphic
 
Methods inherited from class cse115.graphics.Ellipse
actualPaint, getShape
 
Methods inherited from class cse115.graphics.AbstractColorableGraphic
getColor, paint, setColor
 
Methods inherited from class cse115.graphics.AbstractGraphic
addMouseListener, addMouseMotionListener, contains, getBounds, getCenterLocation, getContainer, getDimension, getLocation, getMouseListeners, getMouseMotionListeners, getRotation, intersects, move, rotate, setCenterLocation, setContainer, setRotation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface cse115.graphics.Graphic
addMouseListener, addMouseMotionListener, contains, getBounds, getMouseListeners, getMouseMotionListeners, intersects, setContainer
 
Methods inherited from interface cse115.graphics.Sizeable
getDimension
 
Methods inherited from interface cse115.graphics.CenterLocatable
getCenterLocation, setCenterLocation
 
Methods inherited from interface cse115.graphics.Locatable
getLocation, move
 
Methods inherited from interface cse115.graphics.Rotatable
getRotation, rotate, setRotation
 

Constructor Detail

Eye

public Eye(Face myFace)
Creates a new instance of Eye

Parameters:
myFace - The face the eye belongs to.
Method Detail

setDimension

public void setDimension(Dimension d)
Description copied from class: AbstractGraphic
Changes the Dimension of this Graphic

Specified by:
setDimension in interface Sizeable
Overrides:
setDimension in class AbstractGraphic
Parameters:
d - The new dimension for the eye.
See Also:
AbstractGraphic.setDimension(java.awt.Dimension)

setLocation

public void setLocation(Point p)
Description copied from class: AbstractGraphic
Changes the location of this graphic

Specified by:
setLocation in interface Locatable
Overrides:
setLocation in class AbstractGraphic
Parameters:
p - The new point for the eye.
See Also:
AbstractGraphic.setLocation(java.awt.Point)

roll

public void roll(int increment)
Tell this eye to roll.

Parameters:
increment - The amount in pixels the eye should roll for each animation.

openWide

public void openWide()
Tell the eye to open wide (become larger).


close

public void close()
Tell the eye to close


open

public void open()
Tell the eye to open