Supports presentation of online documentation with both content and contextual views of this information. This is the main package for the JavaHelp standard extension. The main focus of JavaHelp is online help, but it can be used for any online content.

JavaHelp supports the notion of a HelpSet that encompases all documentation information. There is a simple way to read a HelpSet, create a presentation for it, and interact with it and there is also a collection of Swing components that can be used directly for additional control. JavaHelp presents content using Swing's EditorKits, which provide for extensibility of content. JavaHelp also provides for extensibility of context via the notion of a NavigatorView; several views are standard. One of the standard views provides full-text search, which relies on a simple search package to communicate with search engines.

Basic Classes

HelpSet is the main class, providing access to a HelpSet file. A visual presentation of a HelpSet can be obtained through a HelpBroker which is an abstraction that permits interaction regardless of the presentation details; the default presentation is DefaultHelpBroker. An application can provide online help using only these two classes.

Helpsets can be merged dynamically or statically, and can be associated with Beans.

Swing components

JavaHelp provides a collection of Swing components that are used to implement the DefaultHelpBroker and can also be used directly. The components follow the standard MVC from Swing. HelpModel models changes to the location within a HelpSet--components that want to respond to these changes should listen to events originating within the model (this is how synchronized views work). TextHelpModel provides additional information when the content is textual. DefaultHelpModel is the default model that implements both models.

JHelpContentViewer is the Swing component for HTML content, while context corresponds to several subclasses of JHelpNavigator. JHelp is a common grouping of these classes into synchronized views of content.


Context extensibility is described through a NavigatorView which provides access to context information, plus a way of presenting this information. TOCView, IndexView, and SearchView are standard views for table of contents, index, and full-text search.

The standard views yield standard JHelpTOCNavigator, JHelpIndexNavigator, and JHelpSearchNavigator Swing components. The standard views also provide access to the content--this access is provides through subclasses of TreeItem.

New views can be added, for instance a new TOC presentation can be obtained by subclassing TOCView and changing the JHelpNavigator returned by it.

Context Sensitive Help

JavaHelp supports a Map between identifiers and URLs. FlatMap and TryMap are two implementations. The main class used to associate specific content with graphic objects is CSH, while DialogSupport provides support in Dialogs (this may migrate to Swing at some point).


JavaHelp supports a standard full-text search view and navigator. The view interacts with a search engine through the types in the package. The reference implementation provides a search engine that implements these interfaces, but others can also be used. The specific search engine is part of the information given to the search view. This separation provides the full-text search functionality but does not imposing specific formats.

Related Documentation

For overviews, tutorials, examples, guides, tool support, and other documentation, please see the JavaHelp System User's Guide.