JRelaxTimer

NameJRelaxTimer
Version1.0.001
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 | examples | setup ]

Description

JRelaxTimer is browser-independent and highly-configurable Java applet timer that allows you to open Web pages at specific time intervals. It could be easily customized with your own graphics and options to achieve an unlimited variety of appearances and behaviors.
JRelaxTimer is composed by some independent components that could be showed or hidden by option (logo, buttons, displays, selectors):

JRelaxTimer legend

Buttons meaning

PAUSE button PAUSE: pauses the timer.
STOP button STOP: stop and reset the timers.
PLAY button PLAY: restart the timer after PAUSE or STOP.
BREAK button BREAK: force a Web break page opening.

Main Features


Examples

Each of the following examples opens the JRelaxTimer applet on a small popup window. You may also insert the JRelaxTimer applet on a standard xHTML page with other content and graphic.

Setup

To display the JRelaxTimer, 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 jrelaxtimer.jar (name of applet archive)   yes
code com.tecnick.jrelaxtimer.JRelaxTimer.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
target_url The URL (internet address) of the root containing the break_types directories (e.g.: http://www.mysite.com/relax_pages/).

If the break_types parameter is not specified, this parameter represent the URL of the dynamic page to call at each interval (e.g.: http://www.mysite.com/relax_page.php). The following parameters will be passed to the dynamic page:
  • l this applet license number
  • t current type of break (integer number)
  • b current break number
  • i current interval value in minutes
  yes
break_types A delimited list of values representing the break types.
Each break type is separated by the "|" character.
Each break type is composed by three comma separated values: break type name, directory relative to the target_url path, number of pages inside the directory.
(e.g.: type 1,dir1,7|type 2,dir2,5|type 3,dir3,11)
The pages inside each directory must have a numeric progressive name starting from 1 (e.g.: 1.htm, 2.htm, 3.htm, etc...).
  no
page_extension this is the page extension that will be added to the end of the break pages URL when the break_types parameter is specified .htm no
intervals list of comma separated integer numbers (minutes) representing the possible time intervals 15,30,45,60 no
default_interval integer number representing the default interval time in minutes 30 no
logo_image relative path to the logo image   no
logo_url internet address (URL) to open when clicking on the logo   no
display_started display that shows the starting time
  • true shows the display
  • false hides the display
true no
display_current_time display that shows the current time
  • true shows the display
  • false hides the display
true no
display_elapsed display that shows the elapsed time
  • true shows the display
  • false hides the display
true no
display_counter display that shows the number of the breaks
  • true shows the display
  • false hides the display
true no
display_next display that shows the next break time
  • true shows the display
  • false hides the display
true 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)
000000 no
background_color_started background color of display that shows the starting time
- the color format is a set of three hexadecimal numbers (from 00 to FF) representing primary colors RRGGBB (R=Red, G=Green, B=Blue)
000000 no
background_color_current_time background color of display that shows the current time
- the color format is a set of three hexadecimal numbers (from 00 to FF) representing primary colors RRGGBB (R=Red, G=Green, B=Blue)
000000 no
background_color_elapsed background color of display that shows the elapsed time
- the color format is a set of three hexadecimal numbers (from 00 to FF) representing primary colors RRGGBB (R=Red, G=Green, B=Blue)
000000 no
background_color_next background color of display that shows the next break time
- the color format is a set of three hexadecimal numbers (from 00 to FF) representing primary colors RRGGBB (R=Red, G=Green, B=Blue)
000000 no
background_color_counter background color of display that shows the number of the breaks
- the color format is a set of three hexadecimal numbers (from 00 to FF) representing primary colors RRGGBB (R=Red, G=Green, B=Blue)
000000 no
background_image_started relative path to the background image for the display that shows the starting time   no
background_image_current_time relative path to the background image for the display that shows the current time   no
background_image_elapsed relative path to the background image for the display that shows the elapsed time   no
background_image_next relative path to the background image for the display that shows the next break time   no
background_image_counter relative path to the background image for the display that shows the number of the breaks   no
img_dir_buttons relative path to the directory containing the images for the buttons   no
img_dir_started relative path to the directory containing the images for the display that shows the starting time   no
img_dir_current_time relative path to the directory containing the images for the display that shows the current time   no
img_dir_elapsed relative path to the directory containing the images for the display that shows the elapsed time   no
img_dir_next relative path to the directory containing the images for the display that shows the next break time   no
img_dir_counter relative path to the directory containing the images for the display that shows the number of the breaks   no


Open Source projects from the same author >>