| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmodel.fish.display.ParamFishDisplay
public class ParamFishDisplay
Parameterized fish display.
| Field Summary | |
|---|---|
| private static java.awt.geom.AffineTransform | ATX | 
| private static double | BODY_LENGTH | 
| private static double | BODY_WIDTH | 
| private  java.awt.Shape | bodyAndTail | 
| private static double | EYE_SIZE | 
| private  java.awt.Shape | eye1 | 
| private  java.awt.Shape | eye2 | 
| private static int | GRADIENT_SIZE | 
| private static double | TAIL_LENGTH | 
| private static double | TAIL_WIDTH | 
| Constructor Summary | |
|---|---|
| ParamFishDisplay()Default constructor. | |
| ParamFishDisplay(double bodyWidth,
                                 double bodyLength,
                                 double tailWidth,
                                 double tailLength,
                                 double eyeSize)Make an object that knows how to drawFish simple fish. | |
| Method Summary | |
|---|---|
| private  void | buildPaths(double bodyWidth,
                     double bodyLength,
                     double tailWidth,
                     double tailLength,
                     double eyeSize)Set up the paths used for the fish body, tail, and eyes. | 
|  void | draw(java.awt.Graphics2D g2,
         java.awt.Component comp,
         java.awt.Color fishColor)Draw the fish facing north on the Graphics2D object. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
private static final double BODY_WIDTH
private static final double BODY_LENGTH
private static final double TAIL_WIDTH
private static final double TAIL_LENGTH
private static final double EYE_SIZE
private static final int GRADIENT_SIZE
private static final java.awt.geom.AffineTransform ATX
private java.awt.Shape bodyAndTail
private java.awt.Shape eye1
private java.awt.Shape eye2
| Constructor Detail | 
|---|
public ParamFishDisplay(double bodyWidth,
                        double bodyLength,
                        double tailWidth,
                        double tailLength,
                        double eyeSize)
bodyWidth - width of the bodybodyLength - length of the bodytailWidth - width of the tailtailLength - length of the taileyeSize - size of the eyespublic ParamFishDisplay()
| Method Detail | 
|---|
private void buildPaths(double bodyWidth,
                        double bodyLength,
                        double tailWidth,
                        double tailLength,
                        double eyeSize)
bodyWidth - width of the elliptical bodybodyLength - length of the elliptical bodytailWidth - width of the triangular tailtailLength - length of the triangular taileyeSize - diameter of the eye
public void draw(java.awt.Graphics2D g2,
                 java.awt.Component comp,
                 java.awt.Color fishColor)
draw in interface IFishDisplayg2 - drawing surfacecomp - the component to drawFish onfishColor - color of the fish| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||