ModernJava
http://www.modernminds.com
M odule WVPanelTypewriter

The "typewriter" text module (WVPanelTypewriter) scrolls text vertically (bottom to top) in a manner similar to a typewriter. Text is typed character-by-character along the bottom line. When the line is full, all of the text is smoothly scrolled up one line and the next line of text is typed at the bottom.

The WVPanelTypewriter module is always added to a WildView display by using a <PANEL> tag in a WildView layout file.

This module's documentation is divided into four sections:
M odule Attributes

Each possible attribute that can be specified for a panel tag that uses the WVPanelTypewriter module is listed below along with a link to the attribute's description.

Be aware that attribute values are shown for illustrative purposes only: refer to each attribute's description for information regarding attribute requirements.

<PANEL
   module="WVPanelTypewriter"
   name=Typewriter
   clock=45
   x=10
   y=10
   w=200
   h=100
   mouseX=20
   mouseY=20
   mouseW=180
   mouseH=80
   font="TimesRoman"
   fontSize=14
   fontStyle=bold
   fontColor=FFFF00
   scrollRate=2
   charClock=150
   justify=center
   pause=enter
   background=FFFFFF
   lineWidth=150
   initWait=Image1Panel
   leading=-2
>

Note that attribute names and attribute values are always converted to lowercase internally (this does not apply to the tag type name -- "PANEL" -- which must always be in uppercase characters).

If you wish to preserve the case of an attribute value (e.g., you are specifying a file name that has upper and lower case characters), then you should surround the attribute value with quotation marks. Also, if there is a space character in an attribute value, then you should use quotation marks around the entire attribute value.

A ttribute Descriptions

Each attribute of the WVPanelTypewriter panel tag is defined below. The attribute's use is described and the valid attribute values are listed.
module

The module attribute identifies the Java component that will be associated with the panel.

In order to use the WVPanelTypewriter module, this attribute must be set as:

module="WVPanelTypewriter"

Note that the module name is within quotation marks in order to preserve the case of the characters.

Be sure that the spelling and the capitalization of the module name match exactly, or WildView will not be able to locate the module.
name

The name attribute allows you to assign a name to the panel.

Panel names are primarily used in conjunction with triggers in order to identify what panel a trigger is being sent to, or in some cases, what panel the trigger was received from.

Panel names are also used by WildView when logging error conditions in order to identify the panel that encountered the error.

The name attribute is optional, but if it is not specified then you will not be able to send triggers to this panel from other panels.
clock

The clock attribute defines how frequently the module will get a chance to draw in the WildView display area.

For the WVPanelTypewriter module, the clock attribute controls how fast the text will be scrolled toward the top of the panel when a line of text has been filled. To elaborate, when the WVPanelTypewriter module finishes "typing" a line of text at the bottom of the panel display area, the text that has been typed so far is scrolled up by one line so that the next line of text can be typed at the bottom of the panel display area. The value of the clock attribute determines how fast the scrolling is performed.

The clock attribute value is expressed in milliseconds (250 milliseconds is equivalent to ¼ seconds -- which would be very slow for this module).

To increase the scrolling speed, decrease the clock value; to decrease the scrolling speed , increase the clock value.

A good value to try initially is 40 milliseconds. Using this value, the attribute specification will be:

clock=40

Note that the scrollRate attribute also affects the scrolling speed.

Do not confuse this attribute with the charClock attribute, which controls how fast individual characters are "typed" at the bottom of the panel display area.

For best results, the clock attribute value should always be greater than the charClock attribute value.

If the clock attribute is not specified, then the clock value defaults to zero, which disables animation (i.e., nothing will ever be drawn in the panel).
x

The x attribute determines where the left edge of the panel will be located in the WildView display area.

For instance, if the WildView display area has a total width of 200, and if a value of 100 is specified for the panel's x attribute, then the panel will be drawn with its left edge located in the middle of the WildView display.

A module will only draw within the rectangle defined by the x, y, w, and h attributes.

Panel Area

In order for a panel to be completely visible in the WildView display area, the x attribute value must be greater than or equal to zero and less than the total width of the WildView display area.

If the x attribute is not specified, then the attribute's value will default to zero (i.e., the left edge of the WildView display area).
y

The y attribute determines where the top edge of the panel will be located in the WildView display area.

For instance, if the WildView display area has a total height of 100, and if a value of 50 is specified for the panel's y attribute, then the panel will be drawn with its top edge located in the middle of the WildView display.

A module will only draw within the rectangle defined by the x, y, w, and h attributes.

Panel Area

In order for a panel to be completely visible in the WildView display area, the y attribute value must be greater than or equal to zero and less than the total height of the WildView display area.

If the y attribute is not specified, then the attribute's value will default to zero (i.e., the top edge of the WildView display area).
w

The w attribute determines the width of the panel in the WildView display area.

For instance, if the WildView display area has a total width of 200, and if the panel's x attribute has a value of 20, and the panel's w attribute has a value of 160 (positioning the right edge of the panel at 20 + 160 = 180), then the panel will be centered horizontally in the WildView display (there is a margin of 20 to the left of the left panel edge and a margin of 200 - 180 = 20 to the right of the right panel edge).

A module will only draw within the rectangle defined by the x, y, w, and h attributes.

Panel Area

In order for a panel to be completely visible in the WildView display area, the w attribute value added to the x attribute value must be less than or equal to the total width of the WildView display area.

If the w attribute is not specified, then the attribute's value will default to zero (i.e., the panel will not be visible in the WildView display area).
h

The h attribute determines the height of the panel in the WildView display area.

For instance, if the WildView display area has a total height of 100, and if the panel's y attribute has a value of 10, and the panel's h attribute has a value of 80 (positioning the bottom edge of the panel at 10 + 80 = 90), then the panel will be centered vertically in the WildView display (there is a margin of 10 above the top panel edge and a margin of 100 - 90 = 10 below the bottom panel edge).

A module will only draw within the rectangle defined by the x, y, w, and h attributes.

Panel Area

In order for a panel to be completely visible in the WildView display area, the h attribute value added to the y attribute value must be less than or equal to the total height of the WildView display area.

If the h attribute is not specified, then the attribute's value will default to zero (i.e., the panel will not be visible in the WildView display area).
mouseX

The mouseX attribute is an optional attribute that defines the left most side of a rectangle in which mouse events will be recognized by the panel.

Normally, the mouse area (defined by the mouseX, mouseY, mouseW, and mouseH attributes) is identical to the panel display area (defined by the x, y, w, and h attributes).

Occasionally it is useful to define a mouse area that is different from the display area. For instance, you might have a small panel in a corner of a WildView display that contains vertically scrolling text. If you want the scrolling to pause whenever the mouse enters the WildView display area (as opposed to when the mouse enters the panel area), you can define a mouse area equal to the entire WildView display area (of which the scrolling text panel occupies just a part).

A module will only respond to mouse events that occur within the rectangle defined by the mouseX, mouseY, mouseW, and mouseH attributes.

The illustration below shows a panel with a mouse area that is smaller than the panel area.

Mouse Area

If the mouseX attribute is not specified, then the attribute's value will default to value of the x attribute.
mouseY

The mouseY attribute is an optional attribute that defines the top most side of a rectangle in which mouse events will be recognized by the panel.

Normally, the mouse area (defined by the mouseX, mouseY, mouseW, and mouseH attributes) is identical to the panel display area (defined by the x, y, w, and h attributes).

Occasionally it is useful to define a mouse area that is different from the display area. For instance, you might have a small panel in a corner of a WildView display that contains vertically scrolling text. If you want the scrolling to pause whenever the mouse enters the WildView display area (as opposed to when the mouse enters the panel area), you can define a mouse area equal to the entire WildView display area (of which the scrolling text panel occupies just a part).

A module will only respond to mouse events that occur within the rectangle defined by the mouseX, mouseY, mouseW, and mouseH attributes.

The illustration below shows a panel with a mouse area that is smaller than the panel area.

Mouse Area

If the mouseY attribute is not specified, then the attribute's value will default to value of the y attribute.
mouseW

The mouseW attribute is an optional attribute that defines the width of a rectangle in which mouse events will be recognized by the panel.

Normally, the mouse area (defined by the mouseX, mouseY, mouseW, and mouseH attributes) is identical to the panel display area (defined by the x, y, w, and h attributes).

Occasionally it is useful to define a mouse area that is different from the display area. For instance, you might have a small panel in a corner of a WildView display that contains vertically scrolling text. If you want the scrolling to pause whenever the mouse enters the WildView display area (as opposed to when the mouse enters the panel area), you can define a mouse area equal to the entire WildView display area (of which the scrolling text panel occupies just a part).

A module will only respond to mouse events that occur within the rectangle defined by the mouseX, mouseY, mouseW, and mouseH attributes.

The illustration below shows a panel with a mouse area that is smaller than the panel area.

Mouse Area

If the mouseW attribute is not specified, then the attribute's value will default to value of the w attribute.
mouseH

The mouseH attribute is an optional attribute that defines the height of a rectangle in which mouse events will be recognized by the panel.

Normally, the mouse area (defined by the mouseX, mouseY, mouseW, and mouseH attributes) is identical to the panel display area (defined by the x, y, w, and h attributes).

Occasionally it is useful to define a mouse area that is different from the display area. For instance, you might have a small panel in a corner of a WildView display that contains vertically scrolling text. If you want the scrolling to pause whenever the mouse enters the WildView display area (as opposed to when the mouse enters the panel area), you can define a mouse area equal to the entire WildView display area (of which the scrolling text panel occupies just a part).

A module will only respond to mouse events that occur within the rectangle defined by the mouseX, mouseY, mouseW, and mouseH attributes.

The illustration below shows a panel with a mouse area that is smaller than the panel area.

Mouse Area

If the mouseH attribute is not specified, then the attribute's value will default to value of the h attribute.
font

This attribute specifies the typeface to be used when drawing the text.

The font name can be any of the standard Java fonts:
  • "Dialog"
  • "Helvetica"
  • "TimesRoman"
  • "Courier"
  • "Symbol"
Note that the font name must be surrounded with quotation marks in order for Java to find and load the correct font.

If a value for this attribute is not specified, then the text font will default to "Courier".
fontSize

This attribute assigns the size of the font used to draw the text.

If a value for this attribute is not specified, then the text font size will default to 10.
fontStyle

This attribute assigns the style of the font used to draw the text.

The value for the style attribute can be any one of the following:
  • plain
  • bold
  • italic
  • italic+bold
  • bold+italic
If a value for this parameter is not specified, then the font style will default to "plain".
fontColor

This attribute assigns the font color used to draw the text.

The value for this attribute must be a RGB value in hexadecimal format. For instance, the color red would be FF0000, and a medium gray would be 888888.

If a value for this attribute is not specified, then the font color will default to black.
scrollRate

Whenever the WVPanelTypewriter module finishes "typing" a line of text at the bottom of the panel display area, the text that has been typed so far is scrolled up by one line so that the next line of text can be typed at the bottom of the panel display area.

The speed at which the text is scrolled is primarily governed by the clock attribute, which determines how long it takes to scroll the text upward by the number of pixels specified by the scrollRate attribute.

The scrollRate attribute defaults to one pixel if not specified, and this default value will produce the smoothest scrolling animation.

A scrollRate value that is greater than one is useful if you wish to increase the speed at which the text is scrolled, but you do not want to decrease the clock value (the lower the clock value, the faster is the animation, but the greater are the demands that are placed on the computer).

While increasing the scrollRate attribute value will result in text that scrolls faster, in will also result in animation that is "rougher" or "choppier."

The scrollRate attribute must be greater than or equal to 1 and less than or equal to the number of pixels in the line height. Note that you do not need to know the number of pixels in the line height; if you specify a value that is too high, WildView will automatically set the correct maximum value.
charClock

The value of the charClock attribute determines how quickly characters are "typed" on the bottom line of the panel's display area. Think of this attribute as controlling how quickly the typewriter keys are pressed.

The charClock attribute value is expressed in milliseconds (250 milliseconds is equivalent to ¼ seconds -- which would be rather slow for this module).

To increase the typing speed, decrease the charClock value; to decrease the typing speed, increase the charClock value.

A good value to try initially is 125 milliseconds (8 characters per second). Using this value, the attribute specification will be:

charClock=125

Do not confuse this attribute with the clock attribute, which controls how fast text is scrolled upward once a line of text has been completely "typed" at the bottom of the panel display area.

For best results, the charClock attribute value should always be less than the clock attribute value.

If the charClock attribute is not specified, then the charClock value defaults to 150 ms.
justify

The justify attribute enables you to specify the text justification within the panel display area.

The valid values for the justify attribute are:
  • left - text is justified against the left side of the panel display area
  • center - text is justified in the center of the panel display area
  • right - text is justified against the right side of the panel display area
If a value for this attribute is not specified, then the text will be left justified.
pause

The pause attribute allows you to specify an action that, when detected, will cause the typing or scrolling animation to pause. By allowing the panel display to be paused, you give the person reading the text the ability to pause the display of the text in a situation where the text is being displayed too quickly to be read.

There are three valid values that can be assigned to this attribute:
  • false - the animation cannot be paused
  • enter - the animation will pause whenever the mouse enters the panel's mouse area
  • click - the animation will pause whenever the mouse is clicked within the panel's mouse area
(See the mouseX, mouseY, mouseW, and mouseH attributes for details concerning the mouse area.)

There are some situations where you will want to be sure that the animation can not be paused. For instance, if you are using triggers to synchronize animation in two or more panels, then allowing the user to pause one or more of those panels might cause the panel synchronization to become unsynchronized.

If this attribute is not specified, then the attribute default value will be "false" (animation cannot be paused).
background

The background color of the panel's display area is assigned using this attribute.

The attribute's value may be a color in RGB hexadecimal format (for example, the color red would be FF0000, and a medium gray would be 888888), or it may be the special value "clear".

If the special value "clear" is used as the background color, then the panel area will not be filled with a color, but rather the text will be displayed over whatever image lies under the panel area.

If the background attribute is not specified, then the background color will default to "clear".
lineWidth

The lineWidth attribute controls the maximum width of a line of text that can be drawn within the panel's display area.

The lineWidth value can be set to a value less than the width of the panel's display area in order to allow extra space to the right of the text (if the text is left justified), or to the left of the text (if the text is right justified), or to either side of the text (if the text is center justified).

If this attribute is not specified, then the lineWidth will default to the same value as the panel's display width.
initWait

The initWait attribute can be used to assign an id that the panel will wait for before drawing anything in its display area. In other words, the panel will wait until it receives a <TRIGGER> with the specified id, before it will begin to "type" the text.

One of the more common ways of using this attribute is in conjunction with a <CLEAR> tag embedded in the text to be typed.

When embedding a <CLEAR> tag in the text for a WVPanelTypewriter panel, you may set the panel's background to an image contained in a WVPanelImage panel. However, when WildView initializes a WVPanelTypewriter panel, there is no guarantee that the image in the WVPanelImage panel has been completely loaded.

Since a WVPanelImage panel can send a trigger to another panel when its image has been completely loaded, we can use the WVPanelTypewriter initWait attribute to cause the WVPanelTypewriter panel to wait until it receives this trigger before it begins typing the text and executing the <CLEAR> tags embedded in the text.
leading

The leading attribute is used to control the space between each line of text.

If you specify a negative value, then the space between each line of text will be decreased by that number of pixels. For instance, a value of -3 would decrease the space between each line of text by three pixels.

If a positive value is specified, then the space between each line of text will be increased by that number of pixels. For instance, a value of 2 would increase the space between each line of text by two pixels.

Note that the actual amount of space between lines of text may vary depending upon the browser and operating system being used. Also, a leading adjustment value may not be larger than the total height of the line of text. If you specify a value that is too large, it will automatically be changed to the largest value allowed.

If this attribute is not specified, then no adjustment will be made to the default spacing between lines of text (i.e., the value will default to zero).
T ags

The text that is to be scrolled follows the <PANEL> tag. The WVPanelTypewriter module allows the following tags to be embedded in the text:
  • <BR> - insert a line break in the text
  • <P> - insert a paragraph break in the text
  • <WAIT> - stop scrolling the text
  • <TRIGGER> - send a trigger to a panel
  • <RATE> - change the text scroll rate
  • <CLEAR> - clear the display area and optionally set a background image
  • <SET> - load another panel set
  • <LOAD> - load one or more URLs
<BR>

The <BR> tag places a line break in the panel's formatted text following the character of text that immediately precedes the tag. A line break is equivalent to a carriage return and a line feed.

The format of the <BR> tag is:

<BR>

An example of the <BR> tag is:

Text in panel set:

... this is some<BR> sample text ...

Text as displayed:

... this is some
sample text ...

A line break tag can be placed immediately before another tag in order to ensure that the tag which follows the <BR> tag is associated with line that begins with the first character following the <BR> tag.

This can sometimes be important because the automatic line formatting behavior of the panel will yield different results depending upon the version of Java and the operating system being used. The variation in line formatting on different platforms will thus make it difficult (if not impossible in some cases) to predict exactly what line an individual word will be associated with.

By using a <BR> tag you can define precisely where one line ends and where the next line begins.
<P>

The <P> tag places a paragraph break in the panel's formatted text following the character that immediately precedes the tag. A paragraph break is a line break followed by a blank line.

The format of the <P> tag is:

<P>

An example of the <P> tag is:

Text in panel set:

... this is some<P> sample text ...

Text as displayed:

... this is some

sample text ...

A paragraph break tag can be placed immediately before another tag in order to ensure that the tag which follows the <P> tag is associated with the line of text that begins the following paragraph.

This can sometimes be important because the automatic line formatting behavior of the panel will yield different results depending upon the version of Java and the operating system being used. The variation in line formatting on different platforms will thus make it difficult (if not impossible in some cases) to predict exactly what line an individual word will be associated with.

By using a <P> tag you can define precisely where one paragraph ends and where the next paragraph begins.
<WAIT>

The <WAIT> tag allows you stop the typing and scrolling animation immediately before the line of text that contains the <WAIT> tag is displayed. Animation is resumed when the panel receives a <TRIGGER>, or when an (optional) timeout expires.

The format of the <WAIT> tag is:

<WAIT id=idName timeout=seconds>

The <WAIT> tag attributes are:
  • id

    This optional attribute is the ID that a <TRIGGER> must send in order for animation to resume. If the attribute is omitted, then any <TRIGGER> sent to this panel will cause the animation to resume.

  • timeout

    If a timeout attribute is specified, then the animation will resume if a <TRIGGER> is received (with the appropriate id, if specified), or when the number of seconds specified for the timeout attribute have elapsed.
A <WAIT> tag with a timeout attribute is a good way to insert a pause of a specific number of seconds between paragraphs or between sections of text, if desired.

Note that the <WAIT> causes animation to stop immediately before the line that contains the <WAIT> tag is displayed. Since WildView automatically creates line breaks in the text based on the width of the display area (or based on the lineWidth attribute, if specified), occasionally you might be surprised at where the <WAIT> occurs.

A method that can be used to ensure that a <WAIT> occurs on a specific line is to use the <P> paragraph tag or the <BR> line break tag to force a line break in the text immediately before the <WAIT> tag.
<TRIGGER>

The <TRIGGER> tag allows you send a message to one or more panels immediately before the line of text that contains the <TRIGGER> tag is displayed.

The format of the <TRIGGER> tag is:

<TRIGGER panel=panelName id=idName ... >

The <TRIGGER> tag attributes are:
  • panel

    This required attribute is the name of a panel (or panels) to which this trigger should be sent.

    The attribute value can be the name of a single panel to which the trigger should be sent, as for example:

    panel=panel1

    or, multiple panels can be sent a trigger by separating the panel names with commas, like:

    panel=panel1,panel2,panel3

    Note that without quotation marks, you cannot put spaces in the attribute value. If you surround the attribute value with quotation marks, however, you can place spaces in the attribute value: in fact, you can use spaces instead of commas to separate the panel names to which triggers should be sent.

    With quotation marks, you can use spaces after a comma:

    panel="panel1, panel2, panel3"

    Or you can use spaces instead of commas:

    panel="panel1 panel2 panel3"

  • id

    This optional attribute is commonly used, and so it is documented here.

    The attribute is most often specified when another panel has executed a <WAIT> tag and is waiting for a <TRIGGER> with a specific ID.

    In this case, you can cause the <WAIT>ing panel to resume by sending it a <TRIGGER> with an id attribute that matches the id for which the panel is <WAIT>ing.

  • ...

    The ellipse indicates that there can be any number of additional attribute/value pairs that can be sent to the panel.

    The attributes in the <TRIGGER> that are recognized by the target panel depends upon the module that was used to create the panel.

    See the documentation for the appropriate module to determine what <TRIGGER> attributes can be sent to the particular target panel.
Note that the <TRIGGER> is sent immediately before the line that contains the <TRIGGER> tag is displayed. Since WildView automatically creates line breaks in the text based on the width of the display area (or based on the lineWidth attribute, if specified), occasionally you might be surprised at where the <TRIGGER> occurs.

A method that can be used to ensure that a <TRIGGER> occurs on a specific line is to use the <P> paragraph tag or the <BR> line break tag to force a line break in the text immediately before the <TRIGGER> tag.
<RATE>

The <RATE> tag allows you to change the scrollRate at which the text is scrolled once a line of text line has been completely "typed."

The format of the <RATE> tag is:

<RATE pixels>

where the pixels value is equal to the number of pixels to advance the scrolling for each master clock (see the scrollRate attribute for more information regarding how this works).

Be aware that there is no attribute name for this tag, just a value. For instance, if you want to change the rate to 2 pixels, the tag might look like:

... some sample text.<P><RATE 2>Some additional text ...

Note that the <RATE> change is performed immediately before the line that contains the <RATE> tag is displayed. Since WildView automatically creates line breaks in the text based on the width of the display area (or based on the lineWidth attribute, if specified), occasionally you might be surprised at where the <RATE> change occurs.

A method that can be used to ensure that a <RATE> change occurs on a specific line is to use the <P> paragraph tag or the <BR> line break tag to force a line break in the text immediately before the <RATE> tag.
<CLEAR>

The <CLEAR> tag causes the display area to be cleared by scrolling all of the text currently being displayed off of the top of the display area.

Optionally, the panel's background can also be replaced by an image being displayed in a WVPanelImage panel.

Note that the panel's display area is cleared before the line that contains the <CLEAR> tag is displayed.

The format of the <CLEAR> tag is:

<CLEAR grab=ImagePanelName>

The optional <CLEAR> tag attribute, grab, allows you to "grab" the image that is currently being displayed by an image panel and use it as a background image for the WVPanelTypewriter panel (i.e., the text will be typed over the "grabbed" image).

Note that the image panel does not need to be visible in order to "grab" its image. If you are using the image panel only to provide a background image for the WVPanelTypewriter panel, then you can position the image panel at a location outside of the WildView display area.

If used in conjunction with the <TRIGGER> tag, you can change the background image depending on the text that is being displayed. See the documentation for the WVPanelImage module for additional information regarding this capability.

An example of this tag using an image panel name is:

<CLEAR grab=image1>

If the grab attribute is not specified, then the display area will just be cleared (i.e., the background will remain unchanged).
<SET>

The <SET> tag can be used to load another panel set (i.e., a layout file) to replace the panel set currently being displayed. The <SET> tag is executed immediately before the line containing the <SET> tag is displayed.

The format of the <SET> tag is:

<SET panelSet="panelSetToLoad" stop=stopDisplay loadMessage="messageText">

The <SET> tag attributes are:
  • panelSet

    This required attribute is the panel set file name or the number of the panel set that should be loaded.

    If a file name is specified, then the file name must exactly match a file name assigned to one of the panelSet parameters entered with <APPLET> tag.

    An example of a <SET> tag using a file name is:

    <SET panelSet="SecondPanelSet.TXT">

    Remember, in order to preserve upper and lower case characters, you must surround the attribute value with quotation marks.

    If a panel set number is entered, then it should correspond to one of the panelSet parameters entered with <APPLET> tag.

    An example of a <SET> tag using a number is:

    <SET panelSet=2>

    The above example would load the panel set associated with the panelSet2 applet parameter.

  • stop

    If this optional attribute is set to "true", then all WildView animation will be stopped while the new panel set is loaded.

    If the attribute value is set to "false", then animation will continue while the next panel set is loaded.

    If the stop attribute is not specified, then its value will default to "false".

  • loadMessage

    If a text string is specified for this optional attribute, then the text will be displayed on a single line in the center of the applet display area while the next panel set is loaded.
<LOAD>

The <LOAD> tag is used to load one or more URLs just before the line containing the <LOAD> tag is displayed.

The format of the <LOAD> tag is:

<LOAD url="url1 url2 url3 ..." target="target1 target 2 target3 ...">

The <LOAD> tag attributes are:
  • url

    The value of the url attribute can be any valid URL, or it can be a list of URLs separated by at least one space character. For instance,

    url=http://www.modernminds.com

    or

    url="../HTML/Home.html  http://www.microsoft.com  http://home.netscape.com"

    Note that if you specify more than one URL, then the list must be enclosed within quotation marks. Also, you should specify a target for each of the URLs. If you do not specify targets when multiple URLs are used, then the URLs will just load on top of each other, each URL replacing the URL that was previously loaded.

    If you specify a partial URL, as for example,

    url="Home.html"

    then the root of the URL will be based on the URL of the directory that contains the the Java code.

    For instance, if the WildView Java classes are in a directory called "Java", and if a HTML file called "Home.html" is in a directory called "HTML" which is in the "Java" directory (i.e., "Java/HTML/Home.html"), then the attribute would be:

    url="HTML/Home.html"

    Note that you can also use the "mailto" option to launch a user's mail client. For example:

    url=mailto:comments@modernminds.com

    Make sure that you do not use the target attribute if you are using "mailto."

    If a value for this attribute is not specified, then the tag will be ignored.

  • target

    For each URL specified in the url attribute, a target can be specified. If a target is not specified, then the URL will load over the current page and replace the applet.

    The value of the target attribute can be any valid target frame name or symbol (some browsers will open a new browser window if the target name does not exist).

    Some special symbolic values are (warning: these values might not work for every browser):

    • _blank - Always load the URL into a new, unnamed window

    • _self - Always load the URL over the current page

    • _parent - Always load this URL over the parent page (becomes self if there was no parent)

    • _top - Always load this link at the top level (becomes self if current page is at the top)

    If more than one URL is specified for the url attribute, then the corresponding targets must be listed within quotation marks in the same order as the URLs.

    For example:

    <LOAD url="http://www.modernminds.com
      http://www.microsoft.com
      http://home.netscape.com"
      target="MMFrame MSFrame NSFrame">

    This example will load http://www.modernminds.com in MMFrame,
    http://www.microsoft.com in MSFrame, and
    http://home.netscape.com in NSFrame.

    If you do not wish to specify a target for a URL in a list, then you may enter a dash (i.e., "-") for the target. For instance:

    <LOAD url="http://www.modernminds.com
      mailto:support@modernminds.com
      http://home.netscape.com"
      target="MMFrame - NSFrame">
R eceiving Triggers

At present there is only one <TRIGGER> function that is supported by a panel based on the WVPanelTypewriter module.

If the panel finds a <WAIT> tag in the text to be scrolled, then immediately before displaying the line containing the <WAIT> tag, the panel will stop the typing and scrolling animation and wait for a trigger.

If the <WAIT> tag specifies an id attribute, then the panel will wait until it receives a trigger that has a matching id.

For instance, suppose there is a panel named "typetext" and part of the panel's text looks like this:

... this is some sample text.<BR> <WAIT id=continue>And this is some additional sample text ...


Once the "typetext" panel has displayed the line of text ending with "this is some sample text.", it will then stop animating the text and will wait until another panel executes a trigger that might look something like this:

... and that's the end of this topic.<BR> <TRIGGER panel=typetext id=continue>Here is our next topic ...


Once the "typetext" panel receives this trigger, it sees that the id attribute of the <WAIT> tag matches the id attribute of the trigger received, and begins animating the text once again.

If the <WAIT> tag had omitted the id attribute, then animation would have resumed when any trigger was received, regardless of the trigger's id attribute.

Also, if the <WAIT> tag had used the timeout attribute, then the animation would have resumed even if a trigger had not been received provided that the number of seconds specified by the timeout attribute had elapsed.
Copyright © 1997 by Modern Minds, Inc.