Digital Clock

Last updated: 08.05.2002


Files

Parameters

Test Applet


Files

Filename Description Java Class
DigitalClockApplet Implements the digital clock, including specific drawing methods and parameter reading. [Java File] [Class File]
ClockApplet Implements basic clock functionality; threads, time calculation etc. [Java File] [Class File]
ExtendedApplet Implements parameter parsing and other frequently-required applet functionality. [Java File] [Class File]
Project Archive (StuffIt) Sources and CodeWarrior project in StuffIt 5 format for Macintosh users. [StuffIt Archive]  
Project Archive (ZIP) Sources in ZIP format for PC users. [ZIP Archive]  

To download source or class files, click on the file icon with your right mouse button (Windows/UNIX) or click and hold (Macintosh) and choose "Save ..." or "Download ...". Archives containing the sources for this applet are provided in StuffIt 5 and Zip format.

Parameters

Parameter Type Values Default Notes
time-zone int -12 to +12 - offset relative to GMT (in hours). If this parameter is not specified, the clock will show time in the user's time zone.
font String "Helvetica", "TimesRoman", "Courier" Helvetica font family used for the clock display.
fontsize int 4+ 14 size of font used for the clock display.
color Color #rrggbb #FF0000 color of clock text
frame-color Color #rrggbb #CCCCCC color of frame surrounding clock
back-color Color #rrggbb #000000 background color for clock display
frame-width int 0+ 2 width of frame around clock display
date-style String "us", "euro" none style of date display. If not specified, no date will be shown.
draw-in-relief boolean yes, no yes give the clock a 3D look.
draw-raised boolean yes, no yes draw the clock raised ("yes") or indented ("no").
twenty-four-hour boolean yes, no yes Use the twenty-four hour clock.
show-seconds boolean yes, no yes Display seconds.

Test Applet

[raingod:resources:java] -- [up][links][home]