| Demo | View | Download | Description and Features Illustrated |
|---|---|---|---|
| Demos 1 & 2 use all default applet params, resulting in small html files | |||
| Demo1 |
HTML DataFile |
HTML | Simple demo using a file of names on server and allowing no local name editing. |
| Demo2 | HTML | HTML | Simple demo using local name editing only. |
| Demos 3 & 4 use applet color, timing, fontsize and other params | |||
| Demo3 |
HTML DataFile |
HTML | Small bowl demo with local name editing, all colors used, and slower randpause, but shorter randtime |
| Demo4 |
HTML DataFile |
HTML | |
| Demos 5 & 6 use html forms, cgi, and the Java appet together | |||
| Demo5 |
HTML DataFile |
HTML | |
| Demo6 |
HTML DataFile |
HTML | |
|
Java Code
Form's CGI Code |
Java Code
Java Class CGI Code |
||
| General Notes -- | |
| 1. | Demos use a class subdirectory to hold the java.class file; the name file must
reside in this subdirectory. This can easily be changed ...
html, java class and name file must reside on same server ... |
| 2. | Downloaded files have original tabs. In viewed files, the tabs are translated
to spaces for readability. List tabbed source files with Courier New, 9pt, tab=3.
Files have original filenames in beginning comments. |
| 3. | Selection without replacement. |
| 4. | Bowl shape depends on applet size and maxname param.
Excess name width. |
| 5. | Name file - blank names not included. Structure. Name can be any character string, eg. the last 4 digits of students SSNO. |
| 6. | Randomization pasue adjusted for bowl size ... No. swaps = randtime/randpause. How randomization is done. |
| 7. | Font & font sizes - actual font depends on mapping of fonts on local computer. Font size can be changed, but font type is fixed as 'Dialog'. |
| Demo Notes -- | |
| 1. | Demo5 & Demo6 are ... |
| Applet Params (all are optional) | ||
| Name | Default | Description |
|---|---|---|
| datafile | none | The filename on the server containing the names to display; this is a line-by-line file, each line containing one name. If not given, implies local name editing only. |
| delimiter | , (comma) | Field delimiter for the datafile. |
| nameloc | 1 | Postion of the name field in each line of file, starting from position 1 = beginning of line. |
| edit | Allow editing of bowl names. If datafile is given, this defaults to 'no',
otherwise local name editing is implied and this param is set to 'yes'
and cannot be changed.
Values = yes, no. |
|
| title | "Select Random Name" |
Text appearing above the bowl of names, using bigfont size. Use "" (ie. empty string) to eliminate this text area, and use " " (ie. non-breaking space) to create a blank text area. |
| maxname | 25 | Specifies the maximum number of names the bowl can hold. This number, along with the applet's width and height, determine the general bowl shape. Range = 10 to 100. (Note size + 1) |
| Colors are given as 6 hexidecimal digits: rrggbb (eg, red=FF0000): | ||
| bgcolor | white | Background color for entire applet |
| textcolor | blue | Color for all text in applet |
| bowlcolor | cyan | Color inside the bowl |
| wincolor | yellow | Background color of winner's text area |
| plugcolor | gray | Color of bowl outline and plug at base of bowl |
| errorcolor | red | Background color of status line when an error is found |
| All time values in msec (0.001 sec): | ||
| randtime | 4000 | Total time to randomize (ie shake) the bowl. Range: 100 - 10000 |
| randpause | 30 | Short pause between individual name swaps during the bowl randomization. Range: 1 - 1000 |
| selpause | 300 | Time between the steps of the selection animation after randomization. Range: 10 - 2000 |
| Both font sizes are given in points: | ||
| regfontsize | 12 | Size of all text except the title and winner text. Range: 8 - 20 |
| bigfontsize | 16 | Size of title and winner text; this text is displayed in boldface. Range: regfontsize - 24 |