Class EyeBall

java.lang.Object
  extended by EyeBall

public class EyeBall
extends Object

An EyeBall is intended to be inside an Eye.

Author:
David Mutchler and many others before him. Created November 2004, updated August 2005 and September 2008.

Field Summary
protected  Color eyeBallColor
          Color of this eyeball.
protected  Point eyeBallPosition
          Position of this eyeball, relative to the eye (in pixels).
protected  int eyeBallRadius
          Radius of this eyeball.
 
Constructor Summary
EyeBall(Color eyeBallColor)
          Construct an eyeball with the given color.
 
Method Summary
 void draw(Graphics graphics)
          Draw this eyeball at its current position.
 int getRadius()
          Return the radius of this EyeBall.
 void look(int x, int y)
          Move the eyeball to the given position.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

eyeBallColor

protected Color eyeBallColor
Color of this eyeball.


eyeBallPosition

protected Point eyeBallPosition
Position of this eyeball, relative to the eye (in pixels).


eyeBallRadius

protected int eyeBallRadius
Radius of this eyeball.

Constructor Detail

EyeBall

public EyeBall(Color eyeBallColor)
Construct an eyeball with the given color.

Parameters:
eyeBallColor - Color to which to set the eyeBall.
Method Detail

draw

public void draw(Graphics graphics)
Draw this eyeball at its current position.

Parameters:
graphics - Graphics object onto which to draw.

look

public void look(int x,
                 int y)
Move the eyeball to the given position.

Parameters:
x - x-position to which to move the center of the eyeball, relative to the eye.
y - y-position to which to move the center of the eyeball, relative to the eye.

getRadius

public int getRadius()
Return the radius of this EyeBall.

Returns:
Returns the radius of this EyeBall.