Package javax.help

# Interface HelpModel

All Known Subinterfaces:
  `TextHelpModel`

All Known Implementing Classes:
  `DefaultHelpModel`

public interface HelpModel
The interface to the model of a JHelp that represents the HelpSet being presented to the user. Note that a HelpSet can contain nested HelpSets within it; IDs include both a String and the HelpSet to which the String applies.

## Method Summary

Modifier and Type
Method
Description
`void`
`addHelpModelListener(HelpModelListener l)`
Adds a listener for the HelpModelEvent posted after the model has changed.
`void`
`addPropertyChangeListener(PropertyChangeListener l)`
Adds a listener to monitor changes to the properties in this model
`Map.ID`
`getCurrentID()`
Gets the current ID.
`URL`
`getCurrentURL()`
Returns The current URL.
`HelpSet`
`getHelpSet()`
Gets the loaded (aka "top") HelpSet for this model.
`void`
`removeHelpModelListener(HelpModelListener l)`
Removes a listener previously added with `addHelpModelListener`
`void`
`removePropertyChangeListener(PropertyChangeListener l)`
Removes a listener monitoring changes to the properties in this model
`void`
`setCurrentID(Map.ID id)`
Sets the current ID relative to some HelpSet HelpModelListeners and HelpVisitListeners are notified
`void`
`setCurrentID(Map.ID id, String historyName, JHelpNavigator navigator)`
Sets the current ID relative to some HelpSet HelpModelListeners and HelpVisitListeners are notified
`void`
`setCurrentURL(URL url)`
Sets the current URL.
`void`
`setCurrentURL(URL url, String historyName, JHelpNavigator navigator)`
Sets the current URL and the name wich will appear in history list.
`void`
`setHelpSet(HelpSet hs)`
Sets the loaded (aka "top") HelpSet for this model.

## Method Details

### setHelpSet

void setHelpSet(HelpSet hs)
Sets the loaded (aka "top") HelpSet for this model.

### getHelpSet

HelpSet getHelpSet()
Gets the loaded (aka "top") HelpSet for this model.

### setCurrentID

void setCurrentID(Map.ID id) throws InvalidHelpSetContextException
Sets the current ID relative to some HelpSet HelpModelListeners and HelpVisitListeners are notified

Parameters:
  `id` - the ID used to set
Throws:
  `InvalidHelpSetContextException` - The HelpSet of the ID is not valid for the HelpSet currently loaded in the model

### setCurrentID

void setCurrentID(Map.ID id, String historyName, JHelpNavigator navigator) throws InvalidHelpSetContextException
Sets the current ID relative to some HelpSet HelpModelListeners and HelpVisitListeners are notified

Parameters:
  `id` - the ID used to set
  `historyName` - The name for history storage
  `navigator` - The JHelpNavigator
Throws:
  `InvalidHelpSetContextException` - The HelpSet of the ID is not valid for the HelpSet currently loaded in the model

### getCurrentID

Map.ID getCurrentID()
Gets the current ID.

Returns:
  The current ID.

### setCurrentURL

void setCurrentURL(URL url)
Sets the current URL. HelpModelListeners are notified. The current ID changes if there is a matching id for this URL

Parameters:
  `The` - URL to set.

### setCurrentURL

void setCurrentURL(URL url, String historyName, JHelpNavigator navigator)
Sets the current URL and the name wich will appear in history list. HelpModelListeners are notified. The current ID changes if there is a matching id for this URL

Parameters:
  `url` - The URL to set.
  `historyName` - The name to set for history
  `navigator` - The JHelpNavigator

### getCurrentURL

URL getCurrentURL()
Returns The current URL.

Returns:
  The current URL.

### addHelpModelListener

void addHelpModelListener(HelpModelListener l)
Adds a listener for the HelpModelEvent posted after the model has changed.

Parameters:
  `l` - The listener to add.
See Also:
  - `removeHelpModelListener(javax.help.event.HelpModelListener)`

### removeHelpModelListener

void removeHelpModelListener(HelpModelListener l)
Removes a listener previously added with `addHelpModelListener`

Parameters:
  `l` - The listener to remove.
See Also:
  - `addHelpModelListener(javax.help.event.HelpModelListener)`

### addPropertyChangeListener

void addPropertyChangeListener(PropertyChangeListener l)
Adds a listener to monitor changes to the properties in this model

Parameters:
  `l` - The listener to add.

### removePropertyChangeListener

void removePropertyChangeListener(PropertyChangeListener l)
Removes a listener monitoring changes to the properties in this model

Parameters:
  `l` - The listener to remove.