JADC (Advanced Digital Clock)

NameJADC (Advanced Digital Clock)
Version1.0.007
Date2006-02-04
AuthorNicola Asuni
CopyrightTecnick.com S.r.l.
Via Ugo Foscolo n.19
09045 Quartu Sant'Elena (CA)
ITALY
www.tecnick.com
LicenseGNU GENERAL PUBLIC LICENSE v.2

[ description | features | example | setup ]

Description

JADC (Advanced Digital Clock) is both a digital clock and a time counter (countdown or countup display, to or from a particular time).
JADC is browser-independent and highly-configurable Java applet, it could be easily customized with your own graphics and time format to achieve an unlimited variety of appearances and behaviors.
This distribution includes 255 images (17 different sets of digits).

Main Features


Example

Setup

To display the JADC (Advanced Digital Clock), copy the .jar file on your site and add the applet tag to your XHTML/HTML document. To customize quickly the applet, I suggest to cut and paste the applet tag code used in the online examples and modify it to fit your needs.

The following tables illustrates the meaning and function of each parameter.

Applet Attributes
(<applet attribute_name="attribute_value" ... >)
name values default required
codebase relative path to applet archive directory (e.g.: "../java/")   yes
archive jadc.jar (name of applet archive)   yes
code com.tecnick.jadc.Jadc.class (name of main class)   yes
width applet width in pixels   yes
height applet height in pixels   yes
hspace applet horizontal space   no
vspace applet vertical space   no
align applet alignment
  • left
  • right
  • top
  • middle
  • bottom
  no
name applet name   no
id applet id   no
alt applet alternate text content   no


The following are the main applet parameters.


Main Parameters
(<param name="param_name" value="param_value" />)
name values default required
counter_mode
  • true the applet act as a time counter
  • false the applet act as a digital clock
false no
local_time
  • true the client local time will be used
  • false the following two parameters (timezone_hours, timezone_minutes) will be used to adjust time
true no
timezone_hours ±0-23
These are the hours to add to counter_time to get UTC time when counter_mode parameter is set to true.
These are the hours to add to UTC to get local time when counter_mode parameter is set to false.
0 no
timezone_minutes ±0-59
These are the minutes to add to counter_time to get UTC time when counter_mode parameter is set to true.
These are the minutes to add to UTC to get local time when counter_mode parameter is set to false.
0 no
display_pattern Custom pattern for date-time display formatting.
Within date and time pattern string, the following letters are interpreted as pattern letters representing the components of a date or time string:
  • y Year
  • M Month
  • d Day
  • H Hour
  • m Minute
  • s Second
  • - Minus symbol
  • + Plus Symbol
  • : Separator Symbol
  • . Separator Symbol
  •   Blank space

additional patterns for clock mode only (counter_mode set to false):
  • w Week in year
  • W Week in month
  • D Day in year
  • F Day of week in month
  • k Hour in day (1-24)
  • K Hour in am/pm (0-11)
  • h Hour in am/pm (1-12)
  • Z RFC 822 time zone
yyyy-MM-dd HH:mm:ss no
input_pattern Custom pattern for counter_time input formatting.
Within date and time pattern string, the following letters are interpreted as pattern letters representing the components of a date or time string:
  • G Era designator (e.g.: AD)
  • y Year
  • M Month in year
  • w Week in year
  • W Week in month
  • D Day in year
  • d Day in month
  • F Day of week in month
  • E Day in week (e.g.: Text Tuesday; Tue)
  • a Am/pm marker (e.g.: PM)
  • H Hour in day (0-23)
  • k Hour in day (1-24)
  • K Hour in am/pm (0-11)
  • h Hour in am/pm (1-12)
  • m Minute in hour
  • s Second in minute
  • z General Time zone (e.g.: PST)
  • Z RFC 822 time zone (e.g.: -0800)
yyyy-MM-dd HH:mm:ss no
counter_time The target time used when counter_mode parameter is set to true.
The format is specified on previous input_pattern parameter.
2000-01-01 00:00:00 no
background_color applet background color
- the color format is a set of three hexadecimal numbers (from 00 to FF) representing primary colors RRGGBB (R=Red, G=Green, B=Blue)
FFFFFF no
background_image relative path to optional background image   no
img_0 relative path to image representing the digit "0"   yes
img_1 relative path to image representing the digit "1"   yes
img_2 relative path to image representing the digit "2"   yes
img_3 relative path to image representing the digit "3"   yes
img_4 relative path to image representing the digit "4"   yes
img_5 relative path to image representing the digit "5"   yes
img_6 relative path to image representing the digit "6"   yes
img_7 relative path to image representing the digit "7"   yes
img_8 relative path to image representing the digit "8"   yes
img_9 relative path to image representing the digit "9"   yes
img_sep relative path to image representing the separator symbol ":"   yes
img_blk relative path to image representing the blank space " "   yes
img_neg relative path to image representing the plus symbol "+"   yes
img_pos relative path to image representing the minus symbol "-"   yes


Open Source projects from the same author >>