# Switch Buttons

| Class Files: switchb.class, occcolor.class, ocgifix.class, ocjwkey.class Notice Tag: Switch Buttons, Copyright (c) 1997 OpenCube Technologies, Registered (Unique Key ID#)

Applet Tag Template:

- Based on the above sample implementation

Online Documentation at www.opencube.com

- Applet Configuration FAQ
- Technical Document Index

Uploading the applet to the Server

Once you are finished customizing the applet you will need to upload the HTML page containing the applet tag and the two class files ism.class and ismrend.class. Be shore to upload the class files in binary format and ensure that they are located in the same folder as identified by the codebase= value in the applet tag (see below for more information on the codebase value).

The Required Parameters:

Parameter 1, the notice tag, must be included in the applet tag in order for the applet to work. The only other required parameters are at least one image file and highlight image parameter. Usually the easiest way to customize your applet is to cut and paste the applet tag used in the template and modify it to fit your web page.

Color Definition:

This applet uses a simple RGB color scheme. To define a color in one of the color parameters use a value between 0 - 255 for the red, green, and blue components separated by commas and typed out in the correct r,g,b order. Below is a sample of how a color parameter should look, the example specifies several different sample colors for the "bgcolor" parameter.

WHITE: <param name="bgcolor" value="255,255,255">
GREEN: <param name="bgcolor" value="0,255,0">
BLACK: <param name="bgcolor" value="0,0,0">
YELLOW: <param name="bgcolor" value="255,255,0">
OFF WHITE: <param name="bgcolor" value="240,239,234">

The best way to choose the exact color you are looking for without having to guess the numbers is to access your systems Color Picker. Color Pickers usually allow you to drag the mouse over a rainbow type color grid to select a color, and show you the appropriate RGB values. In windows the Color Picker is accessible through MS Paint as well as a majority of the popular Imaging and HTML Authoring Software.

Defining Multiple attributes with One Parameter:

Single parameters used to customize more than one item such as specific images or messages are done so using a range, such as "imagefile0" - "imagefileN". To define a parameter for a specific item (available when noted as above), use "imagefile0" to define, in this case, the location of the first image file - "imagefile1" would define the second image file to display, etc., etc.

The Applet Coordinate System:

The origin of the applets coordinate system is located at the upper left corner of the applet. The x (horizontal) coordinate starts at the left border with 0 and goes as far to the right as the applet is wide (defined with the width tag - see above). The y (vertical) coordinate starts at the top of the applet with 0 and goes down as far as the applet is high (defined with the height tag - see above).

The Applet Parameters

The Applet

Parameter 1
Attribute: Copyright notice.
param name="Notice"
value="Switch Buttons, Copyright (c) 1997 OpenCube Technologies, Registered (Unique Key ID#)"
Note: This must be included for the applet to work.

Parameter 2
Attribute: Applet Background Color
param name = "bgcolor"
Value = R,G,B, Where R,G,B are the red, green, and blue components of the applets background color.
DEFAULT: White

Parameter 3
Attribute: Status bar text when the mouse is over the applet.
param name = "onsbtext"
Value = X, Where X is the message to be displayed in the status bar when the mouse is over the applet area.
DEFAULT: "OpenCube - Switch Buttons"

Parameter 4
Attribute: Status bar text when the mouse is not on applet.
param name = "offsbtext"
Value = X, Where X is the message to be displayed in the status bar when the mouse is located outside of the applet area.
DEFAULT: "Java by OpenCube"

Parameter 5
Attribute: Show URL Links in Status Bar
param name = "showsblinks"
Value = true or false, Where true = yes, show URL link names in the status bar, false = no don not display URL links in the status bar.
DEFAULT: true

Parameter 6
Attribute: Highlight Image Only When Directly Over Image
param name = "honimageonly"
Value = true or false, Where true = yes, highlight the image only when the mouse is directly over the image. False = no, do not undo the previous image highlighting until the mouse is located aver a new image.
DEFAULT: false

The Images & Image Placement

Parameter 7
Attribute: Image File Locations and Names
param name = "imagefile0" - "imagefileN"
Value = X. Where X is the relative location and name of the image file to be displayed in the applet area as a main menu image. This must be defined relative to the location of the HTML document which contains the applet.

Parameter 8
Attribute: Image x (horizontal) locations
param name = "picx0" - "picxN"
Value = X. Where X is the horizontal location of the left border of the image relative to the left margin of the applet. If your applet width is defined as 100, picx="50" would place the left border of the image horizontally dead center.

Parameter 9
Attribute: Image y (vertical) locations
param name = "picy0" - "picyN"
Value = X. Where X is the vertical location of the top border of the image relative to the top of the applet.

The Highlighted Images

Note: The images defined as Highlight images appear as the mouse moves over a main menu image. The highlighted images are automatically placed directly over the main menu image to which they correspond and therefore should have the same dimensions as their associated main menu images.

Parameter 10
Attribute: Image File Locations and Names
param name = "switchfile0" - "switchfileN"
Value = X. Where X is the relative location and name of the image file to be displayed in the applet area when the mouse is over a main menu image. This must be defined relative to the location of the HTML document which contains the applet.

URL Links

Parameter 11
Attribute: Image URL Links
param name = "imagedesturl0" - "imagedesturlN"
value=X, where X is the link for the specific image. URL's can be defined relative to the HTML document containing the applet or fully qualified.

Parameter 12
Attribute: Specific Load Destination Image URL Where?
param name="imageloadwhere0" - "imageloadwhereN"
The "imageloadwhereN" tag specifies where the document specified in the "URL" value should be loaded. The default is "_self". A value equal to the name (case sensitive) of a frame will load the document in that frame.
"_parent" show in the parent frame
"_top" show in the top-most frame
"_self" show in the current frame
"_blank" show in a new unnamed top-level window
"name" show in a new top-level window named name
"frame name" show in the frame named frame name

Note: When targeting a frame location with the name of the frame make certain that the case and names are typed identically. If the applet cannot find the frame the document will be loaded in a new window.

Parameter 13
Attribute: Default Load Destination URL Where?
param name="loadwhere0-0" - "loadwhereN-N"
The "loadwhere" tag specifies where the document specified in the "URL" value should be loaded. The default is "_self". A value equal to the name (case sensitive) of a frame will load the document in that frame.
"_parent" show in the parent frame
"_top" show in the top-most frame
"_self" show in the current frame
"_blank" show in a new unnamed top-level window
"name" show in a new top-level window named name
"frame name" show in the frame named frame name

Note: When targeting a frame location with the name of the frame make certain that the case and names are typed identically. If the applet cannot find the frame the document will be loaded in a new window.

Switch Buttons, © 1996, OpenCube Technologies