帮助主题包含在文件中,这些文件在帮助查看器中一次显示一个,从这个意义上讲,Java Help
系统是基于文件的系统。相互关联的主题应该进行分组。最好用文件夹的分级结构来组织帮助主题。从一个主题到另一个主题的链接应该在含有该链接的文件中进行指定,且不能使用绝对路径。而且,您应该使用正斜杠
"/" 作为文件分隔符。举例如下:
<a href="../subtopicC/topic.html">New
Topic</a>
1. 创建 HTML 主题
实际的帮助信息是用 HTML 创建的;
helpset 查看器能够解析并运行 HTML。您的 HTML 文件可以含有与其他文件以及图像的链接。示例代码 1 显示了 welcome.html
示例:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE>
Help Overview
</TITLE>
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>My Sample Online Help</H1>
This help system is organized into the following main
<br>
topics. You can access these topics directly from the
<br>
Help menu.
<p>
<table width=98% border=0 cellpadding=5>
<tr valign="top">
<td width=30%><A HREF="manager.html">Managing Projects</A>
</td>
<td width=70%>
How to create and use projects and
<br>portfolios
</td>
</tr>
<tr valign="top">
<td width=30%><A HREF="debug.html">Debugging Projects</A>
</td>
<td width=70%>
How to debug Java programs
</td>
</tr>
<tr valign="top">
<td width=30%><A HREF="profile.html">Profiling Projects</A>
</td>
<td width=70%>
How to analyze the performance of
<br>
Java programs
</td>
</tr>
</table>
</ul>
<hr>
<pre>
<font size="-1">
Some Copyright Information Goes Here!
</font>
</pre>
<hr>
</BODY>
</HTML>