Using Popup and Secondary Windows

The JavaHelp system supports two types of HTML-based secondary windows:

Both types of secondary windows are implemented as a lightweight component class that can be added to HTML topics by means of the <OBJECT> tag. This topic describes the functionality and characteristics of these windows. For information about how to use the <OBJECT> tag to add popups/secondary windows to your topics, see The JHSecondaryViewer Component. If you are using an authoring tool, the tool will handle these details for you.


Popups and secondary windows are not used in the JavaHelp System User's Guide because they cannot be included in the PDF version. To see actual examples of how these windows can be used, experiment with the object demo located in:

   demos\bin
You can also launch the object demo program using shortcuts (program groups, desktop icons, links) that you may have created during the installation of the JavaHelp system.

Differences Between Popups and Secondary Windows

Popups and secondary windows are functionally very similar. They are both fully capable HTML windows that can include graphics, links, and lightweight components. Most of the features described in this topic apply to both types of windows. The following lists describe their differences:

Popups:

Secondary windows:

Working with Popups and Secondary Windows

This section describes the different aspects of popups/secondary windows that you (the help author) can control.

To see examples of popups and secondary windows, try the object demo located in:

   demos\bin
The <OBJECT> tag used to add these windows to your help topics is described in Using the <OBJECT> Tag.

Content

The content of popup/secondary windows is rendered by the same HTML engine used in the main help viewer. Anything that is rendered in the main help viewer can be used in popup/secondary windows--including links, graphics, and lightweight components (for example, popup/secondary windows). Topics displayed in the windows can be specified using URLs or JavaHelp system IDs.

Activation

Users activate popup/secondary windows by clicking on one of the following:
Button () A standard button provided as part of the popup/secondary window component. You can use the button as pictured to the left or you can specify a string of text or an image to replace the ">" character on the button.
Text object A specified string of text inserted inline with the text of the topic. The author can control font characteristics of the text to make it stand out.
Graphic object A GIF or JPG image.

Window Size

You can specify the height and width of the popup/secondary window. When content exceeds the size of the window, scroll bars are automatically added to the window.

Window Location (secondary windows only)

You can specify the position of secondary windows on the screen.

Named Windows (secondary windows only)

You can name secondary windows. This enables you to reuse an already active window.

Text

When you add text to a button, or use a text object as an activator, you can control the following font characteristics:
Font family You can set the font family to:
  • Serif
  • SansSerif
  • Monospaced
  • Dialog
  • DialogInput
  • Symbol
Additional fonts will be supported in future versions of the JavaTM 2 Platform.
Font size You can set the size of the font to:
  • xx-small
  • x-small
  • small
  • medium
  • large
  • x-large
  • xx-large
  • bigger (Increases the current base font size by 1)
  • smaller (Decreases the current base font size by 1)
  • nnpt (Sets the font size to a specific point value of nn)
  • +n (Increases the current base font size by a value of n)
  • -n (Decreases the current base font size by a value of n)
  • n (Sets the font size to the point size associated with the index n)
Font weight You can set the weight of the font to:
  • plain
  • bold
Font style You can set the style of the font to:
  • plain
  • italic
Font color You can set the color of the font to:
  • black
  • blue
  • cyan
  • darkGray
  • gray
  • green
  • lightGray
  • magenta
  • orange
  • pink
  • red
  • white
  • yellow

See also:

The JHSecondaryViewer Component