|
|
|
1. What is the Label Applet?
|
|
The Label applet allows text within an HTML page to change under JavaScript control.
The Label applet works great when you have a heading or subtitle within an
HTML page that needs to be changed dynamically. You might find yourself
needing this capability if you are using the
PMVR
or
GoRound
applets and changing images within a web page (then you probably
also want a heading to change at the same time).
The best way to understand the Label applet is by playing around
with the following demonstration:
Click on the following JavaScript controlled links to change the text
and appearance of the text in the Label applet above:
Text:
abcdefghijklmnopqrstuvwxyz
| This is a new string
Background:
red
| green
| blue
| yellow
| purple
| aqua
| black
| white
| gray
Tile Image:
none
| background.jpg
Foreground:
red
| green
| blue
| yellow
| purple
| aqua
| black
| white
| gray
Font:
Dialog
| Helvetica
| TimesRoman
| Courier
Style:
plain
| bold
| italic
| bold&italic
Align:
left
| center
| right
The example above was created with the following HTML code:
<applet name="Label" code="Label.class" width=400 height=32>
<param name="text" value="This text is changeable">
<param name="foreground" value="0000FF">
</applet>
|
To see an example of the Label applet in use, visit
http://www.idyll-by-the-sea.com/hawaii/index.html.
|
2. Label Applet Parameters
|
|
The following table describes the parameters that the Label applet
can use. In most cases, you will only need to use just a couple
parameters, but it is nice to have total control when you need it.
For the Label applet, only the text parameter is required.
| Label.class Java Applet Parameters |
| Parameter | Type | Description |
| text | String |
The text string to display in the applet
|
| tile | URL |
Background tile image of the applet (default: none)
|
| background | hex-color |
Background color of the applet (default light gray: F0F0F0)
|
| foreground | hex-color |
Foreground color of applet text (default black: 000000)
|
| font | String |
Font name: Dialog, Helvetica, TimesRoman, Courier, Symbol (default: Helvetica)
|
| face | String |
Internationalization support
|
| style | String |
Font style: plain, bold, italic, bold italic (default: plain)
|
| align | String |
Horizontal text alignment: left, center, right (default: center)
|
| skin | URL |
A 2x2 (corners) Image: creates a 'frame' inside the display [5.2a]
|
NOTE: The height of the text displayed in the applet is automatic. A font is
automatically selected and used that will attempt to maximize the text
size within the height constraints of the applet. So, select an applet
height and the text will automatically fill that height! This was done
to allow maximum portability between machines and screen resolutions.
hex-color: A color specified in 'RRGGBB' (red/green/blue) hexadecimal
format. For example, 'FF0000' is pure red, '00FF00' is pure green, '0000FF'
is pure blue, 'FFFFFF' is white, '000000' is black, 'CCCCCC' is light gray,
etc. Please refer to
http://www.utexas.edu/learn/html/colors.html
for a list of sample colors along with 'RRGGBB' values.
|
3. Controlling the Applet via Native Duckware Scripting or JavaScript
|
|
Please review the
Scripting Manual
to understand how all Duckware applets can be scripted by either
using Native Scripting or JavaScript Scripting.
View the HTML source to this web page to see how JavaScript
is able to script the applet above.
|
4. No Nonsense License Agreement
|
|
The Label applet is affordware.
That means that you (a business or person) may try it for
free to see if it works for you.
If you can afford the license fee, you should purchase a license.
If you find anything wrong with the software, let me know and I will try
to fix the problem immediately. You assume the entire risk and liability
of using this software. You may not modify the software in any way. The
software may not be used on adult sites nor to display adult material.
If you violate this license agreement you agree to stop using this software.
If you do not agree to these license terms, do not use this software.
If you do agree to these license terms, you may
purchase a license
and use the Label applet on your web site or CD royalty-free!
|
Copyright © 2000-2009 Duckware
|
|