A HelpSet is a collection of help information consisting of a HelpSet
file, table of contents (TOC), index, topic files, and Map file.
The HelpSet file is the portal to the HelpSet.
helpBrokerClass
public static final String helpBrokerClass
helpBrokerLoader
public static final String helpBrokerLoader
implRegistry
public static final Object implRegistry
Information for implementation customization.
helpBroker/class is used to locate the class for a HelpBroker.
helpBroker/loader is used to determine the ClassLoader to use.
kitLoaderRegistry
public static final Object kitLoaderRegistry
kitTypeRegistry
public static final Object kitTypeRegistry
HelpSet context information.
A HelpSet can map between keys (String) and values (Strings).
There is a per-HelpSet value and a default value.
The per-HelpSet value is specified in the appropriate section of the
HelpSet file.
The default value is global and only specified at class initialization time.
publicIDString
public static final String publicIDString
PublicID (known to this XML processor) to the DTD for version 1.0 of the HelpSet
publicIDString_V2
public static final String publicIDString_V2
PublicID (known to this XML processor) to the DTD for version 2.0 of the HelpSet
add
public void add(HelpSet hs)
Adds a HelpSet, HelpSetEvents are generated.
Adding a composed HelpSet to another is equivalent to
adding all the HelpSets individually.
addHelpSetListener
public void addHelpSetListener(HelpSetListener l)
Adds a listener for the HelpSetEvent posted after the model has
changed.
l
- - The listener to add.
addPresentation
protected void addPresentation(HelpSet.Presentation presentation,
boolean defaultPres)
Adds a HelpSet.Presentation to the current list.
addSubHelpSet
protected void addSubHelpSet(HelpSet hs)
Adds a SubHelpSet to the current list.
addView
protected void addView(NavigatorView view)
Adds a NavigatorView to the current list.
contains
public boolean contains(HelpSet hs)
Determines if a HelpSet is a sub-HelpSet of this object.
hs
- The HelpSet to check
- true If hs is contained in this HelpSet or in one of its children.
createHelpBroker
public HelpBroker createHelpBroker()
Creates a presentation object for this HelpSet.
Consults the implRegistry of KeyData for
the class name (as helpBrokerClass) and for the ClassLoader
instance (as helpBrokerLoader) and then tries to instantiate
that class. It then invokes setHelpSet() with
this instance of HelpSet as the argument. The resulting object is
returned.
createHelpBroker
public HelpBroker createHelpBroker(String presentationName)
Creates a presentation object for this HelpSet.
Consults the implRegistry of KeyData for
the class name (as helpBrokerClass) and for the ClassLoader
instance (as helpBrokerLoader) and then tries to instantiate
that class. It then invokes setHelpSet() with
this instance of HelpSet as the argument. The resulting object is
returned.
- HelpBroker The created HelpBroker
findHelpSet
public static URL findHelpSet(ClassLoader cl,
String name)
As above but default on locale to Locale.getDefault()
cl
- The ClassLoader to use. If cl is null the default
ClassLoader is used.name
- The name of the resource.
findHelpSet
public static URL findHelpSet(ClassLoader cl,
String name,
Locale locale)
Locates a HelpSet file and return its URL.
If the name does not end with the ".hs" extension, the
".hs" extension is appended and localization rules
are applied to it.
cl
- The classloader to use. If cl is null the default
ClassLoader is used.name
- The name of the resource.locale
- The desired locale.
findHelpSet
public static URL findHelpSet(ClassLoader cl,
String shortName,
String extension,
Locale locale)
Locates a HelpSet file and return its URL.
Applies localization conventions.
cl
- The classloader to use when searching for the resource
with the appropriate name. If cl is null the default
ClassLoader is used.shortName
- The shortname of the resource.extension
- The extension of the resource.locale
- The desired Locale
fireHelpSetAdded
protected void fireHelpSetAdded(Object source,
HelpSet helpset)
Fires a helpSetAdded event.
fireHelpSetRemoved
protected void fireHelpSetRemoved(Object source,
HelpSet helpset)
Fires a helpSetRemoved event.
getCombinedMap
public Map getCombinedMap()
The map for this HelpSet. This map involves the closure of
this HelpSet's children HelpSets.
getHelpSetURL
public URL getHelpSetURL()
The URL that is the base for this HelpSet.
- The URL that is base to this HelpSet.
getHelpSets
public Enumeration getHelpSets()
Enumerates all the HelpSets that have been added to this one.
- An enumeration of the HelpSets that have been added to
this HelpSet.
getHomeID
public Map.ID getHomeID()
Returns
the ID to visit when the user makes a "go home" gesture.
This can be identified in the project file, but may also be changed
programmatically or (possibly) via the UI.
- The ID of home. A null is returned if homeID is null
or if an ID cannot be created for the homeID.
getKeyData
public Object getKeyData(Object context,
String key)
Gets some Data for a Key in a given context.
Local (per HelpSet instance) data is searched first, then defaults.
getLoader
public ClassLoader getLoader()
A classloader to use when locating classes.
- The ClassLoader to use when locating classes mentioned
in this HelpSet.
getLocalMap
public Map getLocalMap()
Get the local (i.e.<!-- --> non-recursive) Map for this HelpSet.
This Map does not include the Maps for its children.
- The Map object that associates ID->URL. A null map is valid.
getLocale
public Locale getLocale()
Gets the locale for this HelpSet.
getNavigatorView
public NavigatorView getNavigatorView(String name)
Gets the NavigatorView with a specific name.
getNavigatorViews
public NavigatorView[] getNavigatorViews()
NavigatorView describes the navigator views that are requested
by this HelpSet.
- The array of NavigatorView.
getPresentation
public HelpSet.Presentation getPresentation(String name)
Gets the HelpSet.Presentation with a specific name.
getPresentations
public HelpSet.Presentation[] getPresentations()
HelpSet.Presentation describes the presentations that are defined
by this HelpSet.
- The array of HelpSet.Presentations.
getTitle
public String getTitle()
Gets the title of this HelpSet.
parse
public static HelpSet parse(URL url,
ClassLoader loader,
javax.help.HelpSetFactory factory)
Parsed a HelpSet file.
parseInto
public void parseInto(URL url,
javax.help.HelpSetFactory factory)
Parses into this HelpSet.
remove
public boolean remove(HelpSet hs)
Removes a HelpSet from this HelpSet; HelpSetEvents are generated
Return True if it is found, otherwise false.
hs
- The HelpSet to remove.
- False if the hs is null or was not in this HelpSet
removeHelpSetListener
public void removeHelpSetListener(HelpSetListener l)
Removes a listener previously added with addHelpSetListener
l
- - The listener to remove.
setHomeID
public void setHomeID(String homeID)
Sets the Home ID for a HelpSet. This is a bound property.
setKeyData
public void setKeyData(Object context,
String key,
Object data)
Sets some local KeyData on a given context. The information is set on
a per-HelpSet basis.
setLocalMap
public void setLocalMap(Map map)
Set the Map for this HelpSet. This Map object is not recursive; for example,
it does not include the Maps for its children.
setTitle
public void setTitle(String title)
Sest the title for this HelpSet. This is a bound property.
title
- The title to set.
toString
public String toString()
Prints Name for this HelpSet.