Calendar
This applet displays a calendar at a specified month and year. Each day of the month is represented by a button that may have a URL associated with it if clicked (e.g. for TV schedules or something). The simple example below should show the month of October 1998 with Halloween as a special day.
Downloading
The applet may be downloaded for free by clicking on the TAR-file link below (read the FAQ if you're not sure what to do with a TAR file). The FAQ also has step by step instructions on how to embed an applet into your own webpage.
Calendar2.tar
Once unTARed, you should find the following classes (plus a '.jar' file if you want to use the archive= attribute in the <applet> tag):
- AppletUtil3.class
- Calendar2ech.class
Parameters
Below are descriptions of all the parameters you may use to customize the applets to your webpages. Be sure to enclose any parameters that contain white space in double-quotation marks. Most parameters have default values in case you do not specify your own values, but the first two parameters (AUTHOR and COPYRIGHT) are necessary. If you are not sure how to incorporate an applet into a webpage (with its parameter names and values), looks at the source of this webpage and the applet embedded for an example, or read the FAQ page.
AUTHOR: This parameter must appear exactly as follows:
<param name=AUTHOR value="Eric Harshbarger, http://www.ericharshbarger.org">
COPYRIGHT: This parameter must appear exactly as follows:
<param name=COPYRIGHT value="Calendar applet, Copyright 1998, Eric Harshbarger">
BGCOLOR: This parameter indicates the background color of the applet. Consult the FAQ page if you are unsure what format to use for the parameter's value.
FGCOLOR: This parameter indicates the foreground color of the applet. Consult the FAQ page if you are unsure what format to use for the parameter's value.
HIGHLIGHT.COLOR: This is the color of the text on the buttons associated with SPECIAL.DAYS.
FONTNAME: This value indicates the fontface used by the applet. Java1.0.2 has the following values from which to choose (must be spelled exactly): TimesRoman, Dialog, Courier, Helvetica, DialogInput, Symbol.
FONTSIZE: This value indicates the size of the font used by the applet.
FONTSTYLE: This value indicates the style of the font used by the applet. The value should be one of the following: plain, bold, italic, bolditalic.
START.DATE: If you would like the calendar to begin its display at a month other than the current one, this parameter may specify another month and year as a starting point. The value should take the form of: 'YYYY, MM' (e.g. to start the calendar at April 2013, use '2013, 4'). Month codes are 1-indexed (not 0-indexed); in other words 1=January.
DEFAULT.URL: For any button that does not have a page defined for it in the SPECIAL_DAYS file, the DEFAULT.URL is assigned to it. If DEFAULT.URL is left out, then 'null' is assigned to the button and nothing will happen if it is pressed.
TARGET: This is the targeted browser frame for the various URLs of the applet. The default is '_self'.
SPECIAL.DAYS: This parameter points to a plain text file that lists any days that should be highlighted on the calendar. Each line of the text file should begin with a date code of the form: YYYMMDD (so 31 October 1998 is 19981031) followed by a space and then the URL of the page that should be spawned if that button/date is pressed. Highlighted days will appear in BoldFace as well as written in the HIGHLIGHT.COLOR (some older browsers do not support the HIGHLIGHT.COLOR option).
GUI: This parameter tells the applet what buttons and labels besides the month-buttons to display. The value may include any of: 'weekdays' (to show the days of the week above the buttons, as defined by WEEKDAY.NAMES), 'date' (to show the date header as defined by HEADER.FORMAT), and/or 'arrows' (which allow users to advance or retreat to later or previous months). The default is that all three components are visible ('arrows date weekdays');
HEADER.FORMAT: This parameter's value is a message that will be displayed when GUI has 'date' included in it. Two special strings may be included: %year% and %mon%. %year% will be replaced by the year of the month displayed. %mon% will be replaced with the appropriate month name as defined by MONTH.NAMES. The defualt is simply '%mon% %year%'.
WEEKDAY.NAMES: This is a space separated list of words that define the weekday names to be used if the GUL parameter is supposed to show 'weekdays'. The default is 'Sun Mon Tue Wed Thu Fri Sat'.
MONTH.NAMES: This is a list of words to be used when displaying the %mon% value in the HEADER.FORMAT. The default is 'January February March April May June July August September October November December'.
APPLET DEPOT:
INTRO
-
NEWS
-
APPLETS
-
DEMOS
-
CUSTOM
-
FAQ
-
EMAIL
The Applet Depot and all associated applets, text, scripts, and images, Copyright © 1998-2002 by Eric Harshbarger unless otherwise noted. 'Java' is a registered trademark of Sun Microsystems Incorporated.