// File jmhPointData.java import java.applet.Applet; import java.awt.*; /** This class stores a point's coordinates and color data. Note that * it extends Point, so a jmhPointData object IS_A Point. * Therefore, objects of this class can all all the methods in the Point * class. This is why getX() and getY() are not implemented here. They * are inherited from the Point class. Now it handles three sets of data. * * @author Francis F Fernandes, fffernan@cs.uml.edu * @version updated by FFF on April 18, 2002 at 4:14 PM */ public class jmhPointData { Color colorC ; // the point's color String charText; //points character if it is a character int intX; int intY; int intXb; int intYb; /** constructor */ jmhPointData ( int intX, int intY, Color colorC, String charText, int intXb, int intYb) { //setLocation( intX, intY ) ; // a method of the Point class commented out because my version of IE didn't like the Point class this.colorC = colorC ; // sets the object's instance variable from the parameter this.charText = charText ; this.intX = intX; // added to get the X value from a stored point FFF this.intY = intY; // added to get the Y value from a stored point FFF this.intXb = intXb; // added to get the secondar X value from a stored point FFF this.intYb = intYb; // added to get the secondar Y value from a stored point FFF } /** this method returns the point's color * @return Color object indicating the point's color */ Color getColor() { return colorC ; } /** this method returns the point's text * @return charText object that has the text that was stored */ String getChar() { return charText; } /** this method returns the point's x coordinate * @return intX object that has the stored x coordinate */ int getX() { return intX; } /** this method returns the point's y coordinate * @return intY object that has the stored y coordinate */ int getY() { return intY; } /** this method returns the point's secondary x coordinate * @return intXb object that has the stored secondary x coordinate */ int getXb() { return intXb; } /** this method returns the point's secondary y coordinate * @return intYb object that has the stored secondary y coordinate */ int getYb() { return intYb; } }