Fading Headlines Java Applet


Class File Name: fadet.class
Class File Size: 12K
Notice Tag: Fading Messages, Copyright (c) 1997 OpenCube Technologies, Registered 11523

 

For Faster Customization of the applet tags try the template.

 

How to use the applet tags:

The applet tag identifies the location, class file name, and size of a Java applet. Below is a small sample applet tag (or view the source for this document to see the applet tag for the above implementation of this applet). The first part of the tag code="myclass.class" identifies the name of the Java program. The second part codebase="java/" identifies the relative location of the file (leave codebase blank if the class file is located in the same directory as the HTML document. Note: The example below uses Java for the directory name as this is usually the folder name used to store Java class files).

<applet code="myclass.class" codebase="java/" width="500" height="100">
<param name="bgcolor"value="defines the applet background color">
<param name="desc0"value="a message description">
<param name="desturl0"value="a URL that the first description links to">
</applet>

The third and fourth part of the applet tag identifies the width and height of the applet using width="x" and height="x" (measured in screen pixels).

The parameters are defined below the applet start tag with the parameter name first, followed by the value of the parameter. (see below for the complete parameter list for this applet). You may add as many parameters as the applet allows for (If a parameter is not working, first double check that its spelling and case are typed correctly.)

The last part works like all other HTML tags and defines the end of the applet tag </applet>.

 

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 message description parameter ("descN") Usually the easiest way to customize your applet is to cut and paste the applet tag used in the sample 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 "desc0" - "descN". To define a parameter for a specific item (available when noted as above), use "desc0" to define, in this case, the the first message - "desc3" would define the fourth message to use, etc., etc.

 

The Applet Parameters

 

The Applet

Parameter 1
Attribute: Copyright notice.
param name="Notice"
value="Fading Headlines, Copyright (c) 1997 OpenCube Technologies, Registered 1138"
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 - Fading Headlines - Java Applet"

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 not located over the applet area.
DEFAULT: "Java by OpenCube"

 

The Fading Messages

Parameter 5
Attribute: Message
param name="desc0" - "descN"
value=X, where X is the message and optional title to be faded. You may specify an unlimited number of messages with optional titles. To define the message text and title text separate them with a vertical bar ('|'). e.g. My Title|this is the message associated with my title
Note: Messages longer than the width of the applet are automatically put in a multi-line format. The title section of the message must be able to fit on one line.

Parameter 6
Attribute: paragraph Paragraph Text Color
param name= "textcolor"
Value=r,g,b - See above for more information on defining colors. Note: This parameter defines the paragraph text color for all messages.
DEFAULT: Black

Parameter 7
Attribute: Title Text Color
param name= "titlecolor"
Value=r,g,b - See above for more information on defining colors. Note: This parameter defines the Title text color for all messages
DEFAULT: Red

Parameter 8
Attribute: Paragraph Message Font Size
param name="size"
value="X", where X is the default size of all paragraph text.
DEFAULT: 12

Parameter 9
Attribute: Title Message Font Size
param name="titlesize"
value="X", where X is the default size of all title text.
DEFAULT: 16

Parameter 10
Attribute: Paragraph Message Font Name
param name="font"
value="X", where X is the name of a standard Java Font (Dialog, Helvetica, TimesRoman, Courier, Symbol)
DEFAULT: "Helvetica"

Parameter 11
Attribute: Title Message Font Name
param name="titlefont"
value="X", where X is the name of standard Java Font to be used for all paragraph text (Dialog, DialogInput, Helvetica, TimesRoman, Courier,)
DEFAULT: "Helvetica"

Parameter 12
Attribute: Paragraph Font Style
param name="style"
value= bold, italic, bolditalic, plain
DEFAULT: plain

Parameter 13
Attribute: Title Font Style
param name="titlestyle"
value= bold, italic, bolditalic, plain
DEFAULT: plain

Parameter 14
Attribute: Horizontally Center Text
param name="xcentert"
Value = true or false. true = yes center text, false = no left justify text
DEFAULT: False

Parameter 15
Attribute: Vertically Center Text
param name="ycentert"
Value = true or false. true = yes center text, false = no align text with top of applet
DEFAULT: False

Parameter 16
Attribute: Left and Right Margin Width
param name="xoffset"
Value = X, Where X is the width of the right and left margins.
DEFAULT: 5

Parameter 17
Attribute: Extra Space Between the Title and Paragraph Text
param name="extratitlespace"
Value = X, Where X is the extra space to use between the title and paragraph text measured in screen pixels.
DEFAULT: 0

 

 

The Fade Animations and Timing

Parameter 18
Attribute: Default Message Delay Time
param name="delay"
Value = X, Where X the default time to pause all messages in milliseconds (1000 = 1 second)
DEFAULT: 2000 (2 seconds)

Parameter 19
Attribute: Specific Message Delay Time
param name="delay0" - "delayN"
Value = X, Where X the time to pause a specific message in milliseconds (1000 = 1 second). Note: A specific delay will override a delay set with the default delay parameter described above.
DEFAULT: 2000 (2 seconds)

Parameter 20
Attribute: Color Step Value
param name="colorstep"
Value = X, Where X is the number of color units in to jump between fade animation frames. A value of one yields the most complete, however the slowest fade sequence. The larger the value the faster the color change takes place. A good range is anywhere between 1 and 15 depending on how fast a transition you need, The maximum value depending on the color of your text and background is 255.
DEFAULT: 1

Parameter 21
Attribute: Fade Delay Timing
param name="fadedelay"
Value = X, Where X is the amount of time to pause between fade animation frames in milliseconds (1000 = 1 second)
DEFAULT: 0

Parameter 22
Attribute: Fade To Color
param name="fadetocolor"
Value=r,g,b - See above for more information on defining colors. Note: The default for this parameter is the same as the background color setting. The parameter is useful if you do not want to completely fade your message into the background for an added effect.
DEFAULT: Same Color as Background Color

Parameter 23
Attribute: Fade to Light Color
param name="fadelight"
Value=True or False, True = yes fade message into view by making the text incrementally brighter (e.g. black to white). False = no fade message into view by making the text incrementally darker (e.g. white to black). Note: You must set the parameter according to the color of your background and text. If, for example, you are using a back background with white text you must set this parameter to true. The default is false, assuming you are using a light background with a dark colored text.
DEFAULT: False

 

Messages that Act as URL Links

Parameter 24
Attribute: Destination URL Link
param name="desturl0" - "desturlN"
Value = X, Where X is the complete URL location of the document to load (e.g. http://www.opencube.com/index.htm) Only add desturl tags for those lines you wish to act as links.

Parameter 25
Attribute: Default Load Destination URL Link Where? (Frame Targeting)
param name="loadwhere"
The "loadwhere" tag specifies where the document specified in the "desturlN" tags should be loaded. The default is "_self"

"_self" show in the current frame
"_parent" show in the parent frame
"_top" show in the top-most frame
"_blank" show in a new unnamed top-level window
"name" show in a new top-level window named name

Parameter 26
Attribute: Specific Load Destination URL Link Where? (Frame Targeting)
param name="loadwhere0" - "loadwhereN"
The "loadwhere" tag specifies where the document specified in the "desturlN" tag should be loaded. The default is specific with the default loadwhere tag described above

"_self" show in the current frame
"_parent" show in the parent frame
"_top" show in the top-most frame
"_blank" show in a new unnamed top-level window
"name" show in a new top-level window named name

 


Fading Headlines, � 1996, OpenCube Technologies

OpenCube