ScrollingUpdateApplet (Version 1.3) ScrollingUpdateApplet is an applet that can be used to vertically scroll text over a solid color background, or over a static background image. The text to scroll is read from a file on the host instead of from the HTML, which makes the text easy to update and to maintain. Additionally, the text file can periodically be automatically checked for updates. If an update to the text file is detected, then the vertically scrolling text displayed by the applet is dynamically updated. ScrollingUpdateApplet also has support for a single URL. If the mouse is clicked within the applet area, then the applet will load a pre-assigned URL in an optional target. Also available is the ScrollingUpdate class which can be used to add scrolling text to a Java applet or application. The ScrollingUpdate class is documented separately. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Operation ScrollingUpdateApplet requires that the following class files all be located in the same directory: ScrollingUpdateApplet.class, ScrollingUpdate.class, and NetworkTextFile.class. All of these class files are included in the download package. During initialization, ScrollingUpdateApplet will load the the GIF or JPEG image that will be used as the background image (if specified), and will then read a file on the host to retrieve the text that is to be scrolled vertically over the image. The are a number of parameters (documented below) that control how the text will be rendered over the background. Both the font characteristics and the location of the scroll region within the background image can be specified. The number of words that appear on a single line in the scroll region is automatically determined based upon the font characteristics and the width of the scroll region. Because each line of text is automatically formatted, the text entered in the text file does not need to be manually formatted with carriage returns. If you wish to create a line break in the text, you can enter a <BR> code or a <P>
code in the text file where the line break should be placed. The <BR>
code will place a line break in the text at the location of the code while the <P>
code will insert a blank line in addition to inserting the line break. The <BR>
or <P> code should be entered on a single line, or with at
least one space on either side of the code. The frequency at which the applet checks for changes to the text file can be specified, as well as whether or not a notification indicator should be displayed whenever an update check occurs. The applet determines if the text file has been changed by reading the very first line of text in the file (the file header) and comparing it to the header that was read on the previous read. Note that the header is never displayed, so the header line in the file can be can be anything that you wish, such as the date and time that the file was last changed. When you want to indicate that the text in the file has changed, simply modify the header and save the file. The next time that the applet checks the text file, it will find that the header has changed and will then reload and re-render the text to be scrolled. Scrolling text can be paused in one of two fashions (depending upon a parameter assignment): the scrolling can be paused either by clicking anywhere within the boundaries of the applet, or by moving the mouse within the applet's boundaries. Scrolling will be resumed either when a second mouse click occurs, or when the mouse exits the applet's boundaries. ScrollingUpdateApplet can be configured so that a mouse click within the applet's boundaries will cause a URL to be loaded. There is also a provision for specifying a target for the URL to be loaded. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Sample
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Parameters Following are the HTML parameters for the applet. A parameter marked "Opt" is optional, and a parameter marked "Req" is required.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
xample An example of a HTML APPLET tag with all parameters for this applet is shown below.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Copyright |