Modern Java
http://www.modernminds.com
L iteTextURLButtonBar Parameters

The following is an example of an HTML APPLET tag for the LiteTextURLButtonBar applet with all possible parameters specified (in normal use, all of these parameters are not required). You can click the parameter name to jump directly to a description of the parameter.

The size of the button bar is determined by the width and height of the applet.

Parameters in bold type are required parameters, while all other parameters are optional.

Note that the VALUEs in the PARAM tags are shown for illustrative purposes only: they are not meant to be interpreted as parameter requirements.


<APPLET CODE="LiteTextURLButtonBar.class" WIDTH="360" HEIGHT="28">
<PARAM NAME="orient" VALUE="h">
<PARAM NAME="stick" VALUE="false">
<PARAM NAME="color" VALUE="999999">
<PARAM NAME="font" VALUE="TimesRoman">
<PARAM NAME="fontSize" VALUE="18">
<PARAM NAME="fontStyle" VALUE="plain">
<PARAM NAME="fontColor" VALUE="7F3E2B">
<PARAM NAME="fontColorOver" VALUE="FF0000">
<PARAM NAME="fontColorDown" VALUE="00FF00">
<PARAM NAME="align" VALUE="center">
<PARAM NAME="buttonBorders" VALUE="all">
<PARAM NAME="borderColorTL" VALUE="FFFFFF">
<PARAM NAME="borderColorBR" VALUE="888888">
<PARAM NAME="borderIntensity" VALUE="50">
<PARAM NAME="borderSize" VALUE="2">
<PARAM NAME="downShift" VALUE="true">
<PARAM NAME="downShiftAmt" VALUE="1">
<PARAM NAME="mouseEnterAudio" VALUE="Enter.au">
<PARAM NAME="mouseClickAudio" VALUE="Click.au">
<PARAM NAME="buttonDownAudio" VALUE="Select.au">
<PARAM NAME="button1Start" VALUE="0">
<PARAM NAME="button1Size" VALUE="40">
<PARAM NAME="button1URL" VALUE="http://www.mysite.com">
<PARAM NAME="button1Target" VALUE="Content">
<PARAM NAME="button1Desc" VALUE="Ny Web Site">
<PARAM NAME="button1Text" VALUE="Home Page">
<PARAM NAME="button1TextOver" VALUE="Go Home">
<PARAM NAME="button1TextDown" VALUE="Go!">
</APPLET>
P arameter Descriptions

Each of the parameters for the TextURLButtonBar applet is described in detail in this section.

APPLET tag

A few of the more commonly used attributes for the applet tag are described below.


WIDTH="pixels"
HEIGHT="pixels"

These required attributes give the width and height (in pixels) of the button bar display area. These values should match the size of the button bar, or the size of the background (if the background image is used).

Note: the applet WIDTH and HEIGHT attributes are used by the applet to determine if the button bar has a vertical or horizontal orientation. If the applet size is wider than it is high, then the button bar is assumed to have a horizontal orientation; otherwise, the button bar is assumed to have a vertical orientation.


CODEBASE="codebaseURL"

This optional attribute specifies the base URL of the applet -- the directory that contains the applet's code. If this attribute is not specified, then the document's URL is used.

CODE="appletFile"

This required attribute gives the name of the file that contains the applet's compiled Applet subclass. This file is relative to the base URL of the applet. It cannot be absolute. This attribute should be set as: CODE="LiteTextURLButtonBar.class"

ALT="alternateText"

This optional attribute specifies any text that should be displayed if the browser understands the APPLET element but cannot run applets written in Java.

ALIGN="alignment"

This optional attribute specifies the alignment of the applet. The possible values of this attribute are the same as those for the IMG element: left, right, top, texttop, middle, absmiddle, baseline, bottom, absbottom.

VSPACE="pixels"
HSPACE="pixels"

These option attributes specify the number of pixels above and below the applet (VSPACE) and on each side of the applet (HSPACE). They're treated the same way as the IMG element's VSPACE and HSPACE attributes.
orient

Normally, the applet will automatically establish the orientation of the button bar based on the applet's dimensions. If the width of the button bar is greater than its height, then the button bar is assumed to have a horizontal orientation. If the height is greater than the width, then the applet is assumed to have a vertical orientation.

Occasionally, this method of determining the button bar's orientation might not be correct. In these cases, you can manually specify the button bar orientation by using the orient parameter.

A parameter value of "h" will tell the applet that the button bar has a horizontal orientation, while a parameter value of "v" will tell the applet that the button bar is orientated vertically.

If this parameter is not specified, then the applet will automatically determine the button bar's orientation.
stick

If this parameter is set to "true", then when a button on the button bar is clicked it will "stick" in the button down position until another button is clicked. This can be useful if the button bar is in a frame and is used for site navigation (for example). The user can easily see what button (i.e. what page) that he/she last selected.

If this parameter is set to a button number (i.e., stick="1" would correspond to the first button on the button bar), then that button will be "stuck" in the button down position when the button bar initializes.

If a value for this parameter is not specified, then the the value will default to "false" (buttons will not "stick", but rather will pop-up as soon as the mouse button is released).
color

This parameter specifies the background color for the button bar.

The value for this parameter must be a RGB value in hexadecimal format. For instance, the color red would be "FF0000", and a medium gray would be "888888".

If a value for this parameter is not specified, then the background color will default to white.
font

This parameter specifies the font be used when drawing button text.

The font name can be any of the standard Java fonts (e.g. "Dialog", "Helvetica", "TimesRoman", "Courier", or "Symbol").

If a value for this parameter is not specified, then the button font will default to "Dialog".
fontSize

The size of the button bar text font is assigned using this parameter.

If a value for this parameter is not specified, then the button font size will default to "10".
fontStyle

The style of the button bar text font is assigned using this parameter.

The value for the style parameter can be any one of the following: "plain", "bold", "italic", "italic+bold", or "bold+italic".

If a value for this parameter is not specified, then the button font style will default to "plain".
fontColor

This parameter is used to assign the color to be used when drawing button text on the button bar.

The value for this parameter must be a RGB value in hexadecimal format. For instance, the color red would be "FF0000", and a medium gray would be "888888".

If a value for this parameter is not specified, then button text color will default to blue.
fontColorOver

This parameter is used to assign the button text color used when the mouse is moved within a button's boundaries. For instance, you could set fontColor to blue, and fontColorOver to yellow. Whenever the mouse is moved over a button, the button text will change from blue to yellow; when the mouse is moved off of the button, then the text will change from yellow back to blue.

The value for this parameter must be a RGB value in hexadecimal format. For instance, the color red would be "FF0000", and a medium gray would be "888888".

If a value for this parameter is not specified, then the color will default to the same value as the fontColor.
fontColorDown

This parameter is used to assign the button text color used when the mouse is clicked on a button. For instance, you could set fontColor to blue, fontColorOver to yellow, and fontColorDown to red. Whenever the mouse is moved over a button, the text color will change from blue to yellow and when the button is clicked, the button text will change from yellow to red. When the mouse button is released, then the text will change from red back to yellow and when the mouse is moved off of the button, the text color will change from yellow back to blue.

The value for this parameter must be a RGB value in hexadecimal format. For instance, the color red would be "FF0000", and a medium gray would be "888888".

If a value for this parameter is not specified, then the color will default to the same value as the fontColorOver.
align

The alignment of button text within each button is controlled using this parameter.

There are three valid values that this parameter accepts: "left", "center", and "right".

If a value for this parameter is not specified, then the button text alignment will default to "center".
buttonBorders

This parameter controls whether borders are drawn around buttons.

The four valid values for this parameter are (these values are case sensitive):
  • "all" - borders are drawn around the buttons on all button bars


  • "none" - borders are not drawn around buttons


  • "base" - borders are drawn around buttons on the base button bar only


  • "other" - borders are drawn around buttons on all button bars except the base button bar
If button borders are drawn, then the border characteristics are determined by the parameters borderColorTL, borderColorBR, borderIntensity, and borderSize.

If a value for this parameter is not specified, then the parameter value will default to "none".
borderColorTL

Normally, button borders (see the buttonBorders parameter) are drawn by "lightening" or "darkening" the borders around a button image by the percentage specified by the borderIntensity parameter. However, it is possible to manually specify a solid color to use when drawing a border.

This parameter allows you to manually specify the color used to draw the top and left button borders.

The value for this parameter must be a RGB value in hexadecimal format. For instance, the color red would be "FF0000", and a medium gray would be "888888".
borderColorBR

Normally, button borders (see the buttonBorders parameter) are drawn by "lightening" or "darkening" the borders around a button image by the percentage specified by the borderIntensity parameter. However, it is possible to manually specify a solid color to use when drawing a border.

This parameter allows you to manually specify the color used to draw the bottom and right button borders.

The value for this parameter must be a RGB value in hexadecimal format. For instance, the color red would be "FF0000", and a medium gray would be "888888".
borderIntensity

Normally, button borders (see the buttonBorders parameter) are drawn by "lightening" or "darkening" the borders around a button image by the percentage specified by this parameter.

Lightening and darkening button borders instead of using solid colors can result in some interesting effects as the button text can become part of the border.

If you prefer to manually specify solid border colors, see the borderColorTL and the borderColorBR parameters.

The value for this parameter must be between "0" and "100" percent.

If a value for this parameter is not specified, then the value will default to "50" percent.
borderSize

If borders are drawn for buttons (see the buttonBorders parameter), then this parameter will determine the width of the border that surrounds each button.

If a value for the borderSize parameter is not specified, then the value will default to "1".
downShift

When the mouse is clicked while over a button, you can specify that the button image be offset or "shifted" down and to the right. This gives the illusion that the button has been depressed.

If this parameter is assigned a value of "true", then when the mouse is clicked on a button it will be shifted down and to the right by the number of pixels specified by the downShiftAmt parameter. Note that downShift can be enabled regardless of whether borders (see the buttonBorders parameter) are being drawn for the buttons or not.

One thing to bear in mind when using the downShift parameter is that the downShift effect is produced by copying the button image, moving it down and to the right, then drawing it over the original button image. In some circumstances portions of the original button text might be left in the border region resulting in a less-than-desirable appearance. In this situation, it is recommended that you use solid color borders (see the borderColorTL and borderColorBR parameters).

This parameter's value can be either "true" or "false". If the parameter is not assigned a value, then the value will default to "false" (buttons will not be shifted).
downShiftAmt

If buttons are shifted down and to the right when they are clicked (see the downShift parameter), then this parameter will determine the number of pixels that the button will be shifted.

If a value for the downShiftAmt parameter is not specified, then the value will default to the value of the borderSize parameter.
mouseEnterAudio

This optional parameter is used to specify the file name of an AU audio clip file that will be played each time that the mouse is moved within a button's boundaries.

Due to applet security restrictions, the audio clip path is based starting with the directory where the Java code is located (as opposed to starting with the directory where the HTML page is located).

Note that the applet does not support WAV or other audio file formats. There are a number of utilities available that can be used to convert audio files to AU format.
mouseClickAudio

This optional parameter is used to specify the file name of an AU audio clip file that will be played each time that the mouse button is pressed down (as opposed to releasing the mouse button) while it is within a button's boundaries.

Due to applet security restrictions, the audio clip path is based starting with the directory where the Java code is located (as opposed to starting with the directory where the HTML page is located).

Note that the applet does not support WAV or other audio file formats. There are a number of utilities available that can be used to convert audio files to AU format.
buttonDownAudio

This optional parameter is used to specify the file name of an AU audio clip file that will be played each time that the mouse button is released after being pressed down within a button's boundaries. (The parameter is called buttonDownAudio because the audio file is played when the button has been activated, or in other words, has been cycled through the "down" state.)

Due to applet security restrictions, the audio clip path is based starting with the directory where the Java code is located (as opposed to starting with the directory where the HTML page is located).

Note that the applet does not support WAV or other audio file formats. There are a number of utilities available that can be used to convert audio files to AU format.
buttonXXStart

The position of each button on your button bar is defined by the buttonXXStart and the buttonXXSize parameters.

Each button bar button is uniquely identified by the "XX" portion of the parameter name. For instance, if you have three buttons on the button bar, the parameter name for the button 1 starting position would be "button1Start", the button 2 starting position parameter name would be "button2Start", and button 3 starting position parameter name would be "button3Start". One button
XXStart parameter is required for each and every button that you wish to define on the button bar. (Note that the XX portion of the buttonXXStart parameter is always replaced with a number -- you should never have a parameter literally called "buttonXXStart").

The start location specified by the button
XXStart parameter corresponds to the location of the left edge (in the case of horizontal button bars) or top edge (in the case of vertical button bars) of the button being defined. For instance, suppose that there are three buttons on a horizontal button bar. Each button is 20 pixels wide and the buttons are arranged edge-to-edge. The value for the button1Start parameter would be "0" (the left-most edge of the button bar), button2Start would be "20" ( = 0 + 20), and button3Start would be "40" ( = 20 + 20).

Remember that the button
XXStart parameter tells the applet what location on the button bar (measured from the left or top edge) that the button begins.
buttonXXSize

The position of each button on your button bar is defined by the buttonXXSize and the buttonXXStart parameters.

Each button bar button is uniquely identified by the "XX" portion of the parameter name. For instance, if you have three buttons on the button bar, the button 1 size parameter name would be "button1Size", the button 2 size parameter name would be "button2Size", and the button 3 size parameter name would be "button3Size". One button
XXSize parameter is required for each and every button that you wish to define on the button bar. (Note that the XX portion of the buttonXXSize parameter is always replaced with a number -- you should never have a parameter literally called "buttonXXSize").

The button size specified by the button
XXSize parameter corresponds to the width (in the case of horizontal button bars) or height (in the case of vertical button bars) of the button being defined. For instance, suppose that there are three buttons on a horizontal button bar. Each button is 20 pixels wide and the buttons are arranged edge-to-edge. The value for the button1Size, button2Size, and button3Size parameters would all be "20".

Remember that the button
XXSize parameter tells the applet how many pixels the button extends from the value of the buttonXXStart parameter.
buttonXXURL

Whenever a button on the button bar is clicked, the URL specified as the value of the buttonXXURL parameter is loaded (see also the buttonXXTarget parameter).

A URL is assigned to a button by a parameter whose name is formed by replacing the "XX" portion of the button
XXURL parameter name with the button number. For instance, the URL for button 1 will have a parameter name of "button1URL", the URL for button 2 will have a parameter name of "button2URL", etc.

If a button position has been defined using a buttonXXStart and a buttonXXSize parameter, but no button
XXURL parameter is defined, or if a badly formed URL is entered as the value of the buttonXXURL parameter, then the button will be disabled.

The value of the button
XXURL parameter can be any valid URL. For instance,

<PARAM NAME="button1URL" VALUE="http://www.modernminds.com">

Note that you can also use the "mailto" option to launch a user's mail client. For example:

<PARAM NAME="button1URL" VALUE="mailto:comments@modernminds.com">

(Make sure that you do not use the buttonXXTarget parameter if you are using "mailto".)

Note that the XX portion of the button
XXURL parameter is always replaced with a number -- you should never have a parameter literally called "buttonXXURL".
buttonXXTarget

Whenever a button on the button bar is clicked, the URL specified as the value of the buttonXXURL parameter is loaded in the frame specified by the buttonXXTarget parameter. If the buttonXXTarget parameter is not specified, then the URL is loaded into the current frame.

A target frame is assigned to a button's URL by a parameter whose name is formed by replacing the "XX" portion of the button
XXTarget parameter name with the button number. For instance, the target frame for the button 1 URL will have a parameter name of "button1Target", the target frame for the button 2 URL will have a parameter name of "button2Target", etc.

The value of the button
XXTarget parameter can be any valid target frame name or symbol (some browsers will open a new browser window if the target name does not exist).

Some special symbolic values are (warning: these values might not work for every browser):

_blank
Always load this link into a new, unnamed window

_self
Always load this link over the current page

_parent
Always load this link over the parent page (becomes self if there was no parent)

_top
Always load this link at the top level (becomes self if current page is at the top)

Note that the XX portion of the button
XXTarget parameter is always replaced with a number -- you should never have a parameter literally called "buttonXXTarget"
buttonXXDesc

Whenever the mouse is moved within a button's boundaries, a line of text can be displayed on the browser's status line to give the user a description of the button's purpose or function. The text is cleared from the status line when the mouse is moved outside of the button's boundaries.

A line of text is assigned to a button by a parameter whose name is formed by replacing the "XX" portion of the button
XXDesc parameter name with the button number. For instance, the descriptive text for button 1 will have a parameter name of "button1Desc", the descriptive text for button 2 will have a parameter name of "button2Desc", etc.

If this parameter is not specified for a button, then no text will be displayed on the status line when the mouse is moved within the button's boundaries.
buttonXXText

This parameter assigns base state button text for the button identified by "XX" portion of the buttonXXText parameter name. The base state is the state a button is in when the mouse is not within the button's boundaries.

If the parameter name, for example, is "button1Text" and the parameter value is "Home", then the first button on the button bar will be labeled with the text "Home".

This parameter is required for each button that will appear on the button bar.
buttonXXTextOver

This parameter assigns the "mouseOver" state button text for the button identified by "XX" portion of the buttonXXText parameter name. The mouseOver state is the state a button is in when the mouse is moved within the button's boundaries.

If the parameter name, for example, is "button1TextOver" and the parameter value is "Go Home", then when the mouse is moved over the first button on the button bar the button will display the text "Go Home".

If a value for this parameter is not specified, then the button will display the text assigned by the buttonXXText parameter when the mouse is moved within a button's boundaries.
buttonXXTextDown

This parameter assigns the "mouseDown" state button text for the button identified by "XX" portion of the buttonXXText parameter name. The mouseDown state is the state a button is in when the mouse is clicked within the button's boundaries.

If the parameter name, for example, is "button1TextDown" and the parameter value is "Go!", then when the mouse is clicked on the first button on the button bar the button will display the text "Go!".

If a value for this parameter is not specified, then the button will display the text assigned by the buttonXXTextOver parameter when the mouse is clicked on a button.
Copyright © 1997 by Modern Minds, Inc.