/* * Copyright (c)2000 David R. Adaskin. All Rights Reserved. * * The Preferences class for the Day of the Week Calculator. * */ import com.sun.kjava.*; public class Preferences { RadioGroup rg; RadioButton rb1; RadioButton rb2; RadioButton rb3; public Preferences() { rg = new RadioGroup(2); rb1 = new RadioButton(200,200, "Gregorian"); rg.add(rb1); rb2 = new RadioButton(200,200, "Julian"); rg.add(rb2); setDefaults(); } public void paintPrefs(Graphics g, int x, int y) { g.drawString("Calendar:", x, y, g.PLAIN); rb1.setLocation(x, y+14); rb1.paint(); rb2.setLocation(x, y+25); rb2.paint(); } public RadioGroup getRG() { return rg; } public void setDefaults() { rb1.setState(true); rb2.setState(false); } public void moveOff() { rb1.setLocation(200,200); rb2.setLocation(200,200); } public void handlePenDown(int x, int y) { int i; for (i=0; i