FindinSite-CD: Search engine for CD/DVD   .
Powered by FindinSite-MS
. Home | Examples | Starting | Set up | Advanced | Languages | Purchasing | Email .
. .
  Screen layout | Applet parameters | Indexes & Subsets | Search page HTML


PHD Utilities API documentation


This page tells you how to specify various parameters to PHD Java applets. You should be able to specify these parameters in the same way in all PHD applets.

Colour Parameters

The colour parameters can either be a Red, Green and Blue (RGB) hexadecimal digit triplet, or a named colour.

As RGB hexadecimal values, specify the colour parameter as either "RRGGBB" or "#RRGGBB", where each hexadecimal number can be between 00 and FF.

As RGB decimal values, specify the colour parameter as either "rrr.ggg.bbb" or "#rrr.ggg.bbb", where each number can be between 0 and 255.

Alternatively, just use one of the following colour names: aqua, black, blue, cyan, darkGray, fushia, gray, green, lightGray, lime, magenta, maroon, olive, orange, pink, purple, red, silver, teal, navy, white or yellow. Examples:

  <PARAM name=FgColor VALUE=darkgray>
  <PARAM name=BgColor VALUE=FF0080>
  <PARAM name=BgColour VALUE="#FF0080">
  <PARAM name=IconBgColor VALUE="255.0.128">

Font Parameters

The font parameter allows a complete font definition to be specified. It is loosely based on how style sheets define fonts.

One or more font properties may be specified:

Syntax:["font:"] [option]*
option:<weight>, <style>, <size> or <font name>
size:<integer> or <integer>"pt"
font name:eg "TimesRoman"
Properties should be placed in single quotes if they contain spaces. Tabs, CRs or NLs are made into spaces.

Properties that begin with a digit are assumed to refer to point sizes. For other properties, "bold" and "italic" are tried first. Then an attempt is made to match the font name to those available. The first available font name (and font size) are used, and the others ignored.

Unrecognised properties are ignored.


  <PARAM name=font VALUE="font: bold italic 20pt Helvetica Dialog">
  <PARAM name=FormFont VALUE="12 bold Courier">
  <PARAM name=LineFont VALUE="bold 'Elementary Bold'">
  <PARAM name=TextFont VALUE="10pt">
Note that the standard JDK 1.0 font names are Dialog, Helvetica, TimesRoman, Courier and Symbol. PC's TrueType fonts are not visible. IE3.0 has a symbol font called ZapfDingbats.

In a JDK 1.1 environment the standard font names are Dialog, DialogInput, Serif, SansSerif and MonoSpaced (although the JDK 1.0 font names are supported). In JDK 1.1, you can alter the Java Runtime file which defines the mapping to your own computer's fonts.

C String Parameters

This is an ordinary string parameter to an applet, but with the ability to enter characters that you would not normally be able to use.

The applet documentation will tell you what use is made of the parameter. Note that applets may not necessarily cope with all the wierd characters which you can specify with this technique.

The idea is that a special character is represented in the parameter string by an 'escape sequence', ie an escape character, a backslash \, followed by one or more other characters. The escape sequence is replaced with the character you want to use. For example \t is the escape sequence for a tab character, so a\tb means the a character, followed by a tab character, followed by b.
Developers among you will recognise the syntax as that used in C programming.

Note that to have a real backslash character you must put two backslashes in your parameter.

Escape Sequence Meaning Hexadecimal Decimal
\\ Backslash character, \ 5C 92
\t Tab character 08 8
\n Linefeed character, LF 0A 10
\r Carriage return character, CR 0C 13
Decimal code
The character with the specified decimal value, d, dd or ddd.
For example, \34 is the code for a double quotes character.
Hexadecimal code
The character with the specified hexadecimal value, h, hh or hhhh
As all character are in UNICODE, up to 4 hex digits may be given.
For example, \u22 is the code for a double quotes character.
Note the decimal and hexadecimal escape sequences attempt to match as many digits as possible, so \130 is a single character with the code for decimal 130, not two characters, the first with decimal code 13 and a following 0 character.

A common use of this parameter is to specify a double quotes character; do this by specifying \u22 or \34.

Another common use is to specify a space at the end of a parameter; do this by specifying \u20 or \32.

If you use a decimal or hexadecimal code then you must know which code to use to get the character that you want. These are commonly available. We hope to provide a link to a suitable web page soon.

By the way, \u by itself just comes out as "\u".


  <PARAM name=lbl VALUE="String with space at end\32">
  <PARAM name=lbl2 VALUE="\u22Double quoted string\u22">
  <PARAM name=string VALUE="DOS filename:\r\n\tC:\\AUTOEXEC.BAT">

PHD Computer Consultants Ltd makes no representations or warranties about the suitability of the software, either express or implied, including but not limited to the implied warranties of merchantability and fitness for a particular purpose. PHD Computer Consultants Ltd shall not be liable for any damages suffered by a user as a result of using, modifying or distributing the software or its derivatives.
  All site Copyright © 1996-2011 PHD Computer Consultants Ltd, PHDCC   Privacy  

Last modified: 8 February 2006.

Valid HTML 4.01 Transitional Valid CSS!