/* Project #3 Arc class for applet imbedded in Java script table Lisa M. Snyder February 2, 1999 Creates an arc ... to be used for the windows in the three wall sections. */ import java.awt.*; import java.awt.event.*; public class arc{ private int x, y, width, height, startAngle, arcAngle; // ---------------------- Default Constructor ---------------------------- public arc() { x = 0; y = 0; width = 40; height = 50; startAngle = 0; arcAngle = 180; } // ---------------------- Constructor ------------------------------------ public arc(int xpt, int ypt, int w, int h, int sA, int aA) { x = xpt; y = ypt; width = w; height = h; startAngle = sA; arcAngle = aA; //System.out.println ("Arch Got Constructed"); } // -----------------------Paint for Class -------------------------------- public void paint(Graphics g, Color c) { //System.out.println ("In arch.paint"); g.setColor (c); g.fillArc (x,y,width,height,startAngle,arcAngle); //System.out.println ("Finished arch.paint"); } // ---------------------- Change ------------------------------------ public void changeArc(int xpt, int ypt, int w, int h, int sA, int aA) { x = xpt; y = ypt; width = w; height = h; startAngle = sA; arcAngle = aA; } // -----------------------End of Class ----------------------------------- }