This repository was archived by the owner on Jan 30, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathhelpset.html
More file actions
469 lines (453 loc) · 20.7 KB
/
Copy pathhelpset.html
File metadata and controls
469 lines (453 loc) · 20.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!--
* Copyright © 2004 Sun Microsystems, Inc
* All rights reserved.
* Notice of copyright on this source code
* product does not indicate publication.
*
* RESTRICTED RIGHTS LEGEND: Use, duplication, or disclosure by
* the U.S. Government is subject to restrictions as set forth
* in subparagraph (c)(1)(ii) of the Rights in Technical Data
* and Computer Software Clause at DFARS 252.227-7013 (Oct. 1988)
* and FAR 52.227-19 (c) (June 1987).
* Sun Microsystems, Inc., 4150 Network Circle,
* Santa Clara, California 95054, U.S.A.
*
-->
<html>
<head>
<title>The HelpSet File</title>
<link rel="stylesheet" type="text/css" href="../jhug.css">
</head>
<body bgcolor="#ffffff">
<h2>Helpset File</h2>
<p>
When the JavaHelp system is activated by your application,
the first thing it does is read the helpset file specified
by the application. The helpset file defines the
helpset for that application. A helpset is the set
of data that comprises your help system. The helpset
file includes the following information:
<table border=0 cellpadding=5>
<tr valign="top">
<td nowrap>Map file </td>
<td> The <a href="map.html">map file</a> is used to associate topic IDs with
the URL or path name of HTML topic files. </td>
</tr>
<tr valign="top">
<td nowrap>View information </td>
<td> Information that describes the navigators being used in the helpset.
The standard navigators are: table of contents, index, and full-text search.
Additional navigators are the glossary and the favorites navigators. Information
about custom navigators is included here as well. </td>
</tr>
<tr valign="top">
<td nowrap>Helpset title </td>
<td> The <code><a href="#title"><title></a></code> defined in the helpset
(<code>.hs</code>) file. This title appears at the top of the main window
and any secondary windows defined in your helpset file.</td>
</tr>
<tr valign="top">
<td nowrap>Home ID </td>
<td> The name of the (default) ID that is displayed when the help viewer is
called without specifying an ID. </td>
</tr>
<tr valign="top">
<td nowrap>Presentation</td>
<td> The windows in which to display the help topics. This is a new feature
of the JavaHelp 2 software that is described in more detail below under
<a href="#presentationtag"><code><presentation></code></a>.</td>
</tr>
<tr valign="top">
<td nowrap>Sub-helpsets </td>
<td> This optional section statically includes other helpsets by using the
<code><subhelpset></code> tag. The helpsets indicated by this tag
are merged automatically into the helpset that contains the tag. More details
about merging can be found in <a href="merge.html">Merging Helpsets</a>.
</td>
</tr>
<tr valign="top">
<td nowrap>Implementation</td>
<td> This optional section creates a registry that provides key data mapping
to define the HelpBroker class to use in the <code>HelpSet.createHelpBroker</code>
method. The registry also determines the content viewer to user for a given
MIME type. See <code><a href="#impl"><impl></a></code> below.</td>
</tr>
</table>
<p> After your product is installed on your user's system, your Java program must
be able to find the helpset file. The application specifies the path to the
helpset file when it starts the JavaHelp system. By convention, the name of
the helpset file ends with the <code>.hs</code> extension. </p>
<h3><a name="helpsetexample">Helpset File Format</a></h3>
<p>
The format of the helpset file is based on the World Wide
Web Consortium Extended Markup Language (XML 1.0) proposed
recommendation:
<pre>http://www.w3.org/TR/PR-xml-971208</pre>
The following is an example of a helpset file (description follows):
<pre><?xml version='1.0' encoding='ISO-8859-1' ?>
<!DOCTYPE helpset
PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN"
"http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0">
<!-- title -->
<title>Java Development Environment - Help</title>
<!-- maps -->
<maps>
<homeID>top </homeID>
<mapref location="Map.jhm" />
</maps>
<!-- views -->
<view xml:lang="en" mergetype="<code>javax.help.UniteAppendMerge</code>">
<name>TOC</name>
<label>Table Of Contents</label>
<type>javax.help.TOCView</type>
<data>IdeHelpTOC.xml</data>
</view>
<view xml:lang="en" mergetype="<code>javax.help.SortMerge</code>">
<name>Index</name>
<label>Index</label>
<type>javax.help.IndexView</type>
<data>IdeHelpIndex.xml</data>
</view>
<view xml:lang="en">
<name>Search</name>
<label>Search</label>
<type>javax.help.SearchView</type>
<data engine="com.sun.java.help.search.DefaultSearchEngine">
JavaHelpSearch
</data>
</view>
<!-- A <a href="glossary.html">glossary navigator</a> -->
<view mergetype="<code>javax.help.SortMerge</code>">
<name>glossary</name>
<label>Glossary</label>
<type>javax.help.GlossaryView</type>
<data>glossary.xml</data>
</view>
<!-- A <a href="favorites.html">favorites navigator</a> -->
<view>
<name>favorites</name>
<label>Favorites</label>
<type>javax.help.FavoritesView</type>
</view>
<code> </code><!-- presentation windows -->
<!-- This window is the default one for the helpset.
* Its title bar says "Project X Help". It
* is a tri-paned window because displayviews, not
* defined, defaults to true and because a toolbar is defined.
* The toolbar has a back arrow, a forward arrow, and
* a home button that has a user-defined image.
-->
<presentation default=true>
<name>main window</name>
<size width="400" height="400" />
<location x="200" y="200" />
<title>Project X Help</title>
<toolbar>
<helpaction>javax.help.BackAction</helpaction>
<helpaction>javax.help.ForwardAction</helpaction>
<helpaction image="homeicon">javax.help.HomeAction</helpaction>
</toolbar>
</presentation>
<!-- This window is simpler than the main window.
* It's intended to be used a secondary window.
* It has no navigation pane or toolbar.
-->
<presentation displayviews=false>
<name>secondary window</name>
<size width="200" height="200" />
<location x="200" y="200" />
</presentation>
<!-- subhelpsets -->
<subhelpset location="file:/c:/Foobar/HelpSet2.hs" />
<!-- implementation section -->
<impl>
<helpsetregistry helpbrokerclass="javax.help.DefaultHelpBroker" />
<viewerregistry viewertype="text/html"
viewerclass="com.sun.java.help.impl.CustomKit />
<viewerregistry viewertype="text/xml"
viewerclass="com.sun.java.help.impl.CustomXMLKit />
</impl>
</helpset></pre>
<h4>The Helpset Tags</h4>
<p>
The following table describes the helpset tags:
<table width=90% border=1 cellpadding=5>
<tr valign="top">
<td colspan="2"><code><helpset></code> </td>
<td> Defines the helpset. It can contain all the following tags. </td>
</tr>
<tr valign="top">
<td><img src="../images/blueListBullMid.gif" alt="blue bullet"></td>
<td nowrap><code><title></code> </td>
<td> Names the helpset. This string can be accessed by the application and
used in the presentation (for example, in the viewer header stripe). </td>
</tr>
<tr valign="top">
<td><img src="../images/blueListBullMid.gif" alt="blue bullet"></td>
<td nowrap><code><maps></code> </td>
<td> Specifies the default topic and URL of the <a
href="map.html">map file</a> used in the helpset. <br>
<br>
<code><b><maps></b></code><b> Tags</b>
<ul type="circle">
<li url="../images/../images/blueListBullMid.gif"><code><homeID></code>
<p>Specifies the name of the (default) ID that is displayed when the
help viewer is called if an ID is not explicitly specified.<br>
<br>
</p>
</li>
<li><code><mapref></code>
<p>Specifies the URL of the map file relative to the helpset.</p>
</li>
</ul>
</td>
</tr>
<tr valign="top">
<td><img src="../images/blueListBullMid.gif" alt="blue bullet"></td>
<td nowrap><code><view></code> </td>
<td> Defines the navigators used in the helpset. Each navigator is defined
by its own <view>.<br>
<br>
<b><view> Attributes</b>
<ul type="circle">
<li><code>xml:lang="</code><i>lang</i><code>" </code>
<p>Language for the view. Use the standard locale-country-variant format.
Some examples:</p>
<dl>
<dt><code>xml:lang="de"</code></dt>
<dt><code>xml:lang="en"</code></dt>
<dt><code>xml:lang="en-US"<br>
<br>
</code></dt>
</dl>
</li>
<li><code>mergetype</code>="<i>class" </i>
<p>Specifies the path to the merge class. The merge classes are:</p>
<dl>
<dt><code>javax.help.UniteAppendMerge</code></dt>
<dt><code>javax.help.SortMerge</code></dt>
<dt><code>javax.help.AppendMerge</code></dt>
<dt><code>javax.help.NoMerge</code></dt>
<p>For more information, see <a href="merge.html">Merging Helpsets</a>.</p>
</dl>
</li>
</ul>
<p><a name="viewtags"><b><view> Tags</b></a></p>
<ul type="circle">
<li><code><name></code>
<p> Names the view. <br>
<br>
</p>
</li>
<li><code><label></code>
<p> Specifies a label associated with the view. This string is displayed
in the navigator's tab if the presentation's <code>displayviewimages</code>
attribute is <code>"false"</code>. <br>
<br>
</p>
</li>
<li><code><type></code>
<p> Specifies the path to the navigator class. <br>
<br>
</p>
</li>
<li><code><data></code> </li>
<p> Specifies the path to the data used by the navigator. When used with
the search navigator, this tag contains the following attribute: </p>
<blockquote> <code>engine</code> A <code>String</code>
indicating the path to the search engine class. </blockquote>
<li type="circle"><code><image></code>
<p> Specifies the image displayed for the navigator in the tab bar at
the top of the navigator pane. The argument to this attribute is an
ID defined in the <a href="map.html">map file</a>. The ID must be
associated with a GIF or JPEG file. If this attribute is not specified,
the default navigator image is displayed. </p>
</li>
</ul>
</td>
</tr>
<tr valign="top">
<td><img src="../images/blueListBullMid.gif" alt="blue bullet"></td>
<td nowrap><a name="presentationtag"><code><presentation></code></a>
</td>
<td> Defines the windows used in the helpset. Each window is defined by its
own <code><presentation></code> tag. See the <a href="#helpsetexample">helpset
example</a> above for sample code for this tag and its attributes. <br>
<br>
<b><code><presentation></code> Attributes</b><br>
<ul type="circle">
<li><code>xml:lang="</code><i>lang</i><code>" </code>
<p>Language for the view. Use the standard locale-country-variant format.
Some examples:</p>
<dl>
<dt><code>xml:lang="de"</code></dt>
<dt><code>xml:lang="en"</code></dt>
<dt><code>xml:lang="en-US"<br>
<br>
</code></dt>
</dl>
</li>
<li><code>default="true|false"</code>
<p>This presentation is the default one for this helpset. The default
value of this attribute is "<code>false</code>". (In other
words, if you do not specify this attribute, the presentation is not
the default one.) <br>
<br>
If more than one presentation is specified as <code>default</code>,
the last one specified is the default presentation.<br>
<br>
</p>
</li>
<li><code>displayviews="true|false"</code>
<p>Show the navigational views of this helpset in a pane on the left
side of the window (like the tri-paned viewer). The default value
is "<code>true</code>".<br>
<br>
</p>
</li>
<li><code>displayviewimages="true|false"</code> <br>
<p>The default value "<code>true</code>" displays the image
for each navigator in the navigator's tab. If set to "<code>false</code>",
the text defined in each view's <code><label></code> tag is
displayed instead.</p>
</li>
</ul>
<p><b><code><presentation></code> Tags</b></p>
<ul type="circle">
<li><code><name></code>
<p> Names the window, allowing it to be called by name from the Java
program or from the TOC. If you define a presentation, be sure to
tell the Java programmer its name and when you expect it to be called
from the program.<br>
<br>
</p>
</li>
<li><code><size></code>
<p> Specifies the size of the window with the following attributes:<br>
<code>width="nnn" </code>Width in pixels.<br>
<code>height="nnn" </code>Height in pixels. <br>
<br>
</p>
</li>
<li><code><location></code>
<p>Specifies the position of the window with the following attributes:<br>
<code>x="nnn" </code>Horizontal (x) coordinate.<br>
<code>y="nnn" </code>Vertical (y) coordinate.<br>
<br>
</p>
</li>
<li><code><title></code>
<p>Specifies the text that appears in the title bar at the top of the
window.</p>
</li>
<br>
<li> <code><image></code> </li>
<p> Specifies the image displayed on the left side of the help window's
title bar. The argument to this attribute is an ID defined in the <a href="map.html">map
file</a>. The ID must be associated with a GIF or JPEG file. If this
attribute is not specified, the default JavaHelp image is displayed.
<br>
</p>
<li><a name="toolbar"><code><toolbar></code></a>
<p>Indicates that the window is to have a toolbar. </p>
<p>You define buttons on the toolbar by using a <code><helpaction></code>
tag for each button and a Java class name for the action. </p>
<p><code><helpaction><br>
javax.help.</code><i>HelpAction<br>
</i><code></helpaction></code></p>
<p><i>HelpAction</i> is any of the following default class names, each
of which defines an action and a button image: </p>
<dl>
<dt><code>BackAction</code></dt>
<dd> Goes to previous topic. </dd>
<dt><code>FavoritesAction</code></dt>
<dd> Adds current map ID (currently displayed topic) to Favorites
navigator. </dd>
<dt><code>ForwardAction</code></dt>
<dd> Goes to next topic. </dd>
<dt><code>HomeAction</code></dt>
<dd> Loads the home topic in the content pane </dd>
<dt><code>PrintAction</code></dt>
<dd>Prints the topics selected in the navigator. </dd>
<dt><code>PrintSetupAction</code></dt>
<dd>Runs print setup before printing. </dd>
<dt><code>ReloadAction</code></dt>
<dd>Reloads the current topic page in the content viewer. </dd>
<dt><code>SeparatorAction</code></dt>
<dd>Creates a separator between action buttons.</dd>
</dl>
<p>Each action button has a default button image. If you want to use
a different image, you must define a map ID for the image file in
the<a href="map.html"> map file</a> and reference the map ID inside
the <code><helpaction></code> tag by using the <code>image</code>
attribute.<br>
<br>
<b><code><helpaction></code> Attribute</b><br>
<br>
<code>image="</code><i>mapID</i><code>"</code> </p>
<p>For example:</p>
<blockquote>
<p><code><helpaction image="images_backbutton"><br>
javax.help.BackAction<br>
</helpaction> </code></p>
</blockquote>
</li>
</ul>
</td>
</tr>
<tr valign="top">
<td><img src="../images/blueListBullMid.gif" alt="blue bullet"></td>
<td nowrap><code><subhelpset></code><img src="../images/tablespacer80.gif" width="80" height="10">
</td>
<td> This optional tag can be used to specify helpsets you want merged with
the helpset that contains the tag. See <a href="merge.html">Merging Helpsets</a>
for more information. Contains the following attribute: <br>
<dd>
<code>location</code> URL of the helpset file to be
merged. </td>
</tr>
<tr valign="top">
<td><img src="../images/blueListBullMid.gif" alt="blue bullet"></td>
<td nowrap><code><a name="impl"><impl></a></code> </td>
<td>
<p>The implementation section creates a registry that provides key data
mapping to define the HelpBroker class to use in the <code>HelpSet.createHelpBroker</code>
method. The registry also determines the content viewer to user for a
given MIME type. <br>
<br>
<code><b><impl></b></code><b> Tags </b></p>
<ul type="circle">
<li><code><helpsetregistry></code>
<p>Registers the default <code>HelpBroker</code> class. Uses the following
attribute: <br>
<code>helpbrokerclass="class"</code> - Required. Name of
a class that implements <code>HelpBroker</code>.</p>
</li>
<li><code><viewregistry></code>
<p>Registers a viewer class for a given MIME type. Uses the following
attributes: <br>
<code>viewertype="mine/type"</code> - Required. MIME type.<br>
<code>viewerclass="class"</code> - Required. Class name.
</p>
</li>
</ul>
</td>
</tr>
</table>
<p>
<img src="../../images/hg_see.gif" alt="see-also pointer"><b>See also:</b>
<dl>
<dd><a href="map.html">Map File</a>
<dd><a href="toc.html">Table of Contents File</a>
<dd><a href="index.html">Index File</a>
<dd><a href="glossary.html">Glossary File</a>
<dd><a href="favorites.html">Favorites File</a>
<dd><a href="search.html">Creating the Full-Text Search Database</a>
<!-- <dd><A HREF="../jhugTOC.html">Table of Contents</A> -->
</dl>
<p></p><p>
</p>
</body>
</html>