README for ele.zip Installation: ele.zip is a self extracting zip file. Just double click and extract all files to the same directory (folder). EletestDemo.html and EleheadDemo.html need ele.jar to reside in the same directory. ele.zip files: readme.txt //This file EletestDemo.html //demonstrating multi-instances of Ele.class EleheadDemo.html //demonstrating single instance of Ele.class ele.jar //jar file containing all the essential classes ele.jar contains 3 main classes: Eletest.class //a class EletestDemo.html uses demonstrating multi instances of Ele.class. Elehead.class //the class EleheadDemo.html uses demonstrating a single instance of Ele.class. Ele.class //The class that actually draws the elephant head. This readme explains simple usage of Elehead.class and for the Java coders the essential interface to Ele.class. Basic usage of Elehead.class Two requirements: 1. A java-enabled browser; (I've had problems with Netscape4.7; Please report any bugs or fixes to: ele@allelephants.com) 2. A rudimentary understanding of HTML; Insert the following code anywhere in your HTML that you desire the elephant head. Substitute your desired width and height values for the 53 and 38. Important notes: The width and height of the applet should be equal to or greater than the corresponding appwidth and appheight values. The normal aspect ratio for the elephant head on an 800x600 screen is 7:5, width to height. The file ele.jar should be in the same directory (folder) as your HTML page or the "archive=" statement should be made to point it. EX: archive="somefolder/somefolder/ele.jar" Extra: Use the applet tag just like an img tag using "align=", "hspace=", and "vspace=". EX: NOTE: Netscape4.7 and other older browsers might have problems with the "align=", "hspace=", and "vspace=" usage. That's it. Enjoy!! Please report any bugs or fixes to: ele@allelephants.com Ele.class essentials for those who'd like to use it in your own classes. Constructors: public Ele(int xp,int yp,int wd,int ht); /**Constructor; *xp & yp are the starting x & y positions; wd is the width and ht is the height; *These four arguments describe a rectangle just large enough to encompass the head. *if wd<1, a width is assigned that will keep the head in aspect to ht (height). *if ht<1, a height is assigned that will keep the head in aspect to wd (width). *if both wd and ht are less than one, then wd=105 and ht=75. *@param int xp; starting x coordinate. *@param int yp; starting y coordinate. *@param int wd; width of elephant head. *@param int ht; height of elephant head. */ public Ele(); /**Default constructor; *Creates an Ele instance with starting x & y at 0,0; *width=105 and height=75. */ Methods: public void draw(Graphics gr,boolean fill); /**Instance method; *Draws the elephant head described by this instance of Ele in the graphics area *described by Graphics gr. *If fill is false just the outline will be drawn, *otherwise the head is drawn filled with lightGray and tusks are filled with white. *In the future there may be color choices added. *@param Graphics gr; Graphics object of area to draw the elephant head. *@param boolean fill; If true a filled lightGray head is drawn; If false just the *outline is drawn. */ For more info see: http://www.allelphant.com/allmisc/elehead/docs/index.html Please report any bugs or fixes to: ele@allelephants.com