advertisement
javaboutique
Search Tips
Articles  |   Tutorials  |   Reviews  |   Tools  |   by Category  |   by Date  |   by Name  |   Submit  |   Source  |   Forums  |  
javaboutique
Browse DevX


Partners & Affiliates











advertisement

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.

 

Applet Parameter Details

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.

Supported Time Zones

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

How to Add Java Applets to Your Site

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.

 Avaya DevConnect Center
 Service Component Architecture/Service Data Objects Solution Center
 Intel Go Parallel Portal
 Internet.com eBook Library
 IBM Software Construction Toolbox
 Microsoft RIA Development Center
 Destination .NET
XML error: not well-formed (invalid token) at line 53
advertisement
Receive Articles via our XML/RSS feed
Receive Articles via our XML/RSS feed

JavaBytes
Internet Cyclone
This powerful, easy-to-use, internet optimizer is for Windows 95, 98, ME, NT, 2000 and XP. It's designed to automatically optimize your Windows settings, boosting your Internet connection up to 200%.

Metasploit 3.2 Offers More 'Evil Deeds'
'Thank You Apple. Seriously.'
The Buzz: BlackBerry App Store Seen Next
Is .NET on Linux Finally Ready?
Red Hat Takes on HPC Market, Microsoft
Python's New Release Bridges the Gap
No Flash Seen on iPhone Horizon
Apple Yields to Complaints Over iPhone NDA
Microsoft Shows Some Ankle With Visual Studio
Gentoo Linux Cancels Distribution

Use Explicit Conversion Functions to Avert Reckless Implicit Conversions
Polyglot Programming: Building Solutions by Composing Languages
Automated testing for .NET by Ben Hall
"Supply Chain" SOA with SKOS
Service Component Architecture in Real Life
C++Ox: The Dawning of a New Standard
Getting Started with Virtualization
Master Complex Builds with MSBuild
eCryptfs: Single-File Encryption in Linux
CCXML in Action: A CCXML Auto Attendant

Advertising Info  |   Member Services  |   Contact Us  |   Help  |   Feedback  |   Site Map  |   Network Map  |   About



JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Solutions
Whitepapers and eBooks
IBM Whitepaper: Innovative Collaboration to Advance Your Business
Internet.com eBook: Real Life Rails
Avaya Article: Call Control XML - Powerful, Standards-Based Call Control
Internet.com eBook: The Pros and Cons of Outsourcing
Go Parallel Article: Scalable Parallelism with Intel(R) Threading Building Blocks
Internet.com eBook: Best Practices for Developing a Web Site
IBM CXO Whitepaper: The 2008 Global CEO Study "The Enterprise of the Future"
Avaya Article: Call Control XML in Action - A CCXML Auto Attendant
Go Parallel Article: James Reinders on the Intel Parallel Studio Beta Program
IBM CXO Whitepaper: Unlocking the DNA of the Adaptable Workforce--The Global Human Capital Study 2008
Adobe Acrobat Connect Pro: Web Conferencing and eLearning Whitepapers
Go Parallel Article: Getting Started with TBB on Windows
HP eBook: Storage Networking , Part 1
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Go Parallel Video: Intel(R) Threading Building Blocks: A New Method for Threading in C++
HP Video: Is Your Data Center Ready for a Real World Disaster?
Microsoft Partner Portal Video: Microsoft Gold Certified Partners Build Successful Practices
HP On Demand Webcast: Virtualization in Action
Go Parallel Video: Performance and Threading Tools for Game Developers
Rackspace Hosting Center: Customer Videos
Intel vPro Developer Virtual Bootcamp
HP Disaster-Proof Solutions eSeminar
HP On Demand Webcast: Discover the Benefits of Virtualization
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
Microsoft Download: Silverlight 2 Software Development Kit Beta 2
30-Day Trial: SPAMfighter Exchange Module
Red Gate Download: SQL Toolbelt
Iron Speed Designer Application Generator
Microsoft Download: Silverlight 2 Beta 2 Runtime
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
IBM IT Innovation Article: Green Servers Provide a Competitive Advantage
Microsoft Article: Expression Web 2 for PHP Developers--Simplify Your PHP Applications
Featured Algorithm: Intel Threading Building Blocks - parallel_reduce
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES