AppletWriter Applet

Purchasing the Applet

When using the free evaluation version of TypeWriter, the message "free applets at www.consultcom.com" will be displayed in the browser's status bar every couple of seconds and when the mouse is placed over the applet. The purchased version does not display this message.

To order the purchased version of TypeWriter, please visit http://www.consultcom.com and browse to the TypeWriter page in our Java Software section.


Easy Setup

The easiest way to set up the applet on your site is to start with code found on this page. Cut and paste this sample applet code into your own HTML page. Please make sure the AppletWriterV2Demo.class file is in the same directory as your html file.

After you change your HTML file you must hit 'Reload' on your browser to view the changes. You may need to close and reopen the browser to see the changes.

Once you have this sample applet working within your own page, then begin to customize the parameters for your own site.


Technical Support

If you encounter any problems setting up the AppletWriter applet, please read the applet configuration Frequently Asked Questions section on our web site. Visit http://www.consultcom.com and browse to the TypeWriter page in our Java Software section. The Frequently Asked Questions page lists the solutions to the most common questions that arise when setting up the applet. If your question in not answered there, then email your question to support@consultcom.com. Please be as specific as possible when describing your problem. Be sure to include your order number if it is available.


Applet Parameters

numberOfLines  The number of lines of text to be displayed in the applet.
numberOfPages  The number of "pages" of text to be displayed.
defFgColor  The default text color for all lines. This is specified by the three digit RGB (red, green, blue) value for the color. The three numbers must be separated by commas. For example, the following line sets the font color to red.

<param name=defFgColor value="255,0,0">

defFontSize  The default font size for all text.
defFontStyle  This is the default font style used in the applet. Use one of the following:
  • Font.PLAIN
  • Font.BOLD
  • Font.ITALIC
  • Font.ITALIC+Font.BOLD
defLineHorizAlign  The deafult horizontal alignment of the text. Possible values are:
  • left
  • right
  • middle
defPageVertAlign  The vertical alignment of the text. Possible values are:
  • top
  • bottom
  • center
bgcolor  The background color of the applet. This is specified by the three digit RGB (red, green, blue) value for the color. The three numbers must be separated by commas. For example, the following line sets the background color to red.

<param name=bgcolor value="255,0,0">

defFont  The default font used for all text displayed in the applet. Use one of the following:
  • TimesNewRoman
  • Courier
  • Dialog
  • Helvetica
 
characterSleep  The speed at which the text is typed.
mousePause  Set this value to 'true' if you would like the typing to pause when the mouse is placed over the applet.
defPagePause  The default amount of time the each page is displayed after the entire message has been typed.
linespacing  The amount of vertical space between each line.
vpadding  The amount of vertical space between the top of the applet and the first line of text.
hpadding  The amount of horizntal space between the side of the applet and the text.
pageXTotalLines  The number of lines of text to be displayed on page number X. For example, to set the number of lines to be displayed on the first page, use the parameter page1TotalLines.
pageXPause  The amount of time page number X is displayed after the entire message has been typed. For example, to display the text on page 1 for 4 seconds, set the parameter page1Pause to "4000".
lineX  Each line parameter contains one sentence to be displayed in the applet. The first sentence is specified by the parameter line1, the second by line2, etc.
fontX  Sets the font used for the text on line number X. For example, use the parameter font1 to change the font for line 1. Use one of the following values:
  • TimesNewRoman
  • Courier
  • Dialog
  • Helvetica
 
sizeX  Sets the font size for the text on line number X. For example, use the parameter size1 to change the font size for line 1.  
styleX  This is the font style for the text on line number X. Use one of the following:
  • Font.PLAIN
  • Font.BOLD
  • Font.ITALIC
  • Font.ITALIC+Font.BOLD
colorX  The font color for the text on line number X. This is specified by the three digit RGB (red, green, blue) value for the color. The three numbers must be separated by commas. For example, the following line sets the text color on line 1 to red.

<param name=colorX value="255,0,0">

pageXValign  The vertical alignment of the text on page number X. Possible values are:
  • top
  • bottom
  • center
pageXHalign  The horizontal alignment of the text on page number X. Possible values are:
  • left
  • right
  • middle
sourcefile  The sourcefile parameter may be used in place of the line parameter to specify the text displayed in the applet. To use the sourcefile parameter, set its value to the filename that you want to display. This file must be a text file.

When using the sourcefile parameter you should delete the line1, line2, ...linex, parameters since all of the text will come from the text file. Similarly, if you leave the sourcefile parameter empty, then you should include the string1, string2, ...stringx parameters.

For example, if you want to display text from a text file, the code should look like this:

<param name=sourcefile value="data.txt">

and you can delete all the lines like

<param name=line1 value="Sentence number one.">
<param name=line2 value="Sentence number two.">

In this case, a text file named data.txt must exist in the same directory as the applet's class file. It must also contain two lines, the first containing "Sentence number on." and the second "Sentence number two."

To see this parameter in action, delete the string parameters from this example and set the sourcefile parameter to Data.txt


Applet Usage

The purchased version of the AppletWriter applet may be displayed in multiple locations on one web site (one domain). Our free evaluation version is for unlimited use, however it displays the consulting.com, Inc url in the browser's status bar. The purchased version does not display our url. For more information visit the consulting.com, Inc. web site.