BillsClock2
How to use BillsClock2 on your website
When you unpack the distribution, you should find a number of files in the
extracted folder, this file (HOW-TO.html) being one of them
*.au files - a variety of sound files from which you can
customise the optional chimes.
*.jpg files - a few basic clock images in 300x300 and 150x150
format. (Note that GIF files are also supported, although we are using JPG's in our
examples.)
billsclock2.jar - a java archive file that contains all the
applet's classfiles in a fast-downloading, compressed format.
FAQ.html - an HTML file that contains
some commonly asked questions and answers concerning BillsClock2
LICENSE.txt - By using this applet,
you agree to the terms of the license. Please read the license agreement carefully.
Installation
Upload the file billsclock2.jar to your web directory. (Be sure
to upload this file as binary and not ascii.) This is a java archve containig all
class files required by the applet in an efficient, compressed format. Do not unpack this
jar file - it is intended to be used as-is.
If you want your clock to chime, choose the .au audio file(s)
that you prefer and upload to the web directory that contains billsclock2.jar. The clock
can optionally chime on the hour and half-hour, and you can use the same or
different audio file for the hour and half-hours. Just make sure that the .au files you
configure the applet to use are in the web directory where the applet will be kept. Upload
audio files as binary and not ascii. (Note that only .au format is supported.)
Pick the .jpg (or .gif) image that you want to use for
your clock face. You can use those provided, or you can find/create your own. If you use
your own image, you will probably have to make some minor changes in the sample HTML code
to reflect the size of the clock if different, and dimensions/placement of the hands.
GIF's are supported, in addition to JPG format. Both images and audio files should be
uploaded (as binary rather than ascii) to the same web directory in which billsclock2.jar
was saved.
Create an HTML page (or use an existing one) to display the applet. This
HTML file should be placed in the same web directory that contains billsclock2.jar.
Sample applet tags are provided below. Read the descriptions
of the applet's parameters to see how you can tweak and configure the applet to
accomodate your own images, sound files, time zones, etc.
|
|
The appearance and initial settings of the applet are controlled by HTML applet
parameter tags. In addition to height and width, the applet's other configurable
parameters are depicted in the table below: If the default value is acceptable, the
parameter can be omitted from the HTML. (Our examples have overspecified some defaults
simply for the sake of showing how all parameters are used.)
|
Name |
Type |
Description |
Default |
| BGCOLOR |
Hex RGB Triplet |
HTML-style Color designation for applet background. If the clock image is transparent,
this is the color that will be visible. |
#FFFFFF (White) |
| FGCOLOR |
Hex RGB Triplet |
HTML-style Color designation for applet foreground |
#000000 (Black) |
| CENTERX |
Integer |
The X-Coordinate of the clock's hands origin point |
.5 x Width |
| CENTERY |
Integer |
The Y-Coordinate of the clock's hands origin point |
.5 x Height |
| FONTFACE |
String |
Name of font face for text display areas: Courier, TimesRoman, or Helvetica |
Helvetica |
| FONTSIZE |
Integer |
Size of date and/or AM PM test in pixels |
9 |
| SWEEPCOLOR |
Hex RGB Triplet |
HTML-style Color designation for applet's second hand |
#FF0000 (Red) |
| MINUTECOLOR |
Hex RGB Triplet |
HTML-style Color designation for applet's minute hand |
#c0c0c0 (Gray) |
| HOURCOLOR |
Hex RGB Triplet |
HTML-style Color designation for applet's hour hand |
#000000 (Black) |
| SYNC_MESSAGE |
String |
Brief message to display while the applet synchronizes with the SNTP server |
"Please stand by..." |
| BGIMAGE |
String |
Name of image file to display as the clock face |
None |
| TIMEZONE |
String |
3-Char abbreviation of zone name (taken from the table
of supported Time Zones) If this parameter is omitted, than the clock will display the
browser's local time. |
None |
| HOUR_CHIMES |
String |
Optional audio file (.au format only) for on the hour chimes. Leave this parameter out
if you do not want hourly chimes. |
None |
| HALFHOUR_CHIMES |
String |
Optional audio file (.au format only) for on the half-hour chimes. Leave this
parameter out if you do not want half-hourly chimes.This can be the same or a different
audio file than hourly chimes |
None |
| SHOWSWEEP |
Integer |
1 will show a moving "second" hand or sweep hand. 0 will disable the sweep
hand. |
1 (Enabled) |
| HOURLENGTH |
Integer |
The length of the hour hand in pixels. |
25 |
| HOURTHICK |
Integer |
The width of the hour hand in pixels. |
8 |
| MINUTELENGTH |
Integer |
The length of the minute hand in pixels. |
40 |
| MINUTETHICK |
Integer |
The width of the minute hand in pixels. |
6 |
| SWEEPLENGTH |
Integer |
The length of the sweep hand in pixels |
40 |
| VERBOSE |
Integer |
1 - Display informational messages in the Java Console. 0 - Do not display general
information in the Java Console. |
1 (Enabled) |
| *USE_SNTP |
Integer |
0 - disable SNTP synchronization. 1 enables SNTP |
0 (SNTP Disabled) |
| SNTP_PORT |
Integer |
Port on which the SNTP Proxy app listens on the home server to relay packets to the
actual NTP server |
1200 |
| SNTP_SAMPLES |
Integer |
The maximum number of SNTP connections to calculate a mean |
4 |
| * Do not enable SNTP if you are not running the
server-side components needed for it to work. These are commercially licensed components
that cannot be redistributed with this applet. It will not hurt anything if you enable it,
but the applet will not synchronize, and this may delay the initiallization of the applet. |
The following time zones are supported by JDK 1.1.8 (and as implemented in Netscape
version 4.x and all versions of MS Internet Explorer 4.x or later)
| Zone ID |
Zone Name |
Offset |
Uses
Daylight Time |
| GMT |
Greenwich Mean Time |
0 |
false |
| UTC |
GMT+00:00 |
0 |
false |
| ECT |
Central European Standard Time |
60 |
true |
| EET |
GMT+02:00 |
120 |
true |
| ART |
GMT+02:00 |
120 |
true |
| EAT |
GMT+03:00 |
180 |
false |
| MET |
GMT+03:30 |
210 |
true |
| NET |
GMT+04:00 |
240 |
false |
| PLT |
GMT+05:00 |
300 |
false |
| IST |
GMT+05:30 |
330 |
false |
| BST |
GMT+06:00 |
360 |
false |
| VST |
GMT+07:00 |
420 |
false |
| CTT |
China Standard Time |
480 |
false |
| JST |
Japan Standard Time |
540 |
false |
| ACT |
GMT+09:30 |
570 |
false |
| AET |
GMT+11:00 |
600 |
true |
| SST |
GMT+11:00 |
660 |
false |
| NST |
GMT+12:00 |
720 |
true |
| MIT |
GMT-11:00 |
-660 |
false |
| HST |
Hawaii Standard Time |
-600 |
false |
| AST |
Alaska Standard Time |
-540 |
true |
| PST |
Pacific Standard Time |
-480 |
true |
| PNT |
Mountain Standard Time |
-420 |
false |
| MST |
Mountain Standard Time |
-420 |
true |
| CST |
Central Standard Time |
-360 |
true |
| EST |
Eastern Standard Time |
-300 |
true |
| IET |
Eastern Standard Time |
-300 |
false |
| PRT |
GMT-04:00 |
-240 |
false |
| CNT |
Newfoundland Standard Time |
-210 |
true |
| AGT |
GMT-03:00 |
-180 |
false |
| BET |
GMT-02:00 |
-180 |
true |
| CAT |
GMT-01:00 |
-60 |
false |
| Note: We have not tested the applet with
all time zones, however these are documented as supported by JavaSoft. |
Back to Bills Clock
New on the Java Boutique:
New Review:
Time Management Made Easy with the Quartz Enterprise Job Scheduler
Why not just use the Java timer API? This open source scheduling
API boasts simplicity, ease-of-integration, a well-rounded feature
set, and it's free!
New Applet:
Reverse Complement
Reverse Complement is a simple applet that converts DNA or RNA
sequences into three useful formats.
Elsewhere on internet.com:
WebDeveloper Java
Lots of Java information on webdeveloper.com
WDVL Java
Thorough Java resource at the Web Developer's Virtual Library.
ScriptSearch Java
Hundreds of free Java code files to download.
jGuru: Your View of the Java Universe
Customizable portal with online training, FAQs, regular news updates, and tutorials.
|