## javax.help
Interface TextHelpModel

All Superinterfaces:
  HelpModel

All Known Implementing Classes:
  DefaultHelpModel

public interface TextHelpModel
extends HelpModel

The interface to a HelpModel that manipulates text. It provides additional text operations.

Nested Class Summary
`static interface` `TextHelpModel.Highlight` This is very similar to javax.swing.text.Highlighter.Highlight except that it does not use the notion of HighlightPainter.

Method Summary
`void` `addHighlight(int pos0, int pos1)` Adds a highlight to a range of positions in a document.
`void` `addTextHelpModelListener(TextHelpModelListener l)` Adds a listener for a TextHelpModel.
`java.lang.String` `getDocumentTitle()` Gets the title of the document.
`TextHelpModel.Highlight[]` `getHighlights()` Gets all highlights.
`void` `removeAllHighlights()` Removes all highlights on the current document.
`void` `removeTextHelpModelListener(TextHelpModelListener l)` Removes a listener for a TextHelpModel.
`void` `setDocumentTitle(java.lang.String title)` Sets the title of the document.
`void` `setHighlights(TextHelpModel.Highlight[] h)` Sets the highlights to be a range of positions in a document.

Methods inherited from interface javax.help.HelpModel
`addHelpModelListener, addPropertyChangeListener, getCurrentID, getCurrentURL, getHelpSet, removeHelpModelListener, removePropertyChangeListener, setCurrentID, setCurrentID, setCurrentURL, setCurrentURL, setHelpSet`

Method Detail

### getDocumentTitle

    public java.lang.String getDocumentTitle()

  Gets the title of the document.

  Returns:
    The title of document visited.

### setDocumentTitle

    public void setDocumentTitle(java.lang.String title)

  Sets the title of the document. A property change event is generated.

  Parameters:
    `title` - The title currently shown.

### removeAllHighlights

    public void removeAllHighlights()

  Removes all highlights on the current document.

### addHighlight

    public void addHighlight(int pos0,
                             int pos1)

  Adds a highlight to a range of positions in a document.

  Parameters:
    `pos0` - Start position.
    `pos1` - End position.

### setHighlights

    public void setHighlights(TextHelpModel.Highlight[] h)

  Sets the highlights to be a range of positions in a document.

  Parameters:
    `h` - The array of highlight objects.

### getHighlights

    public TextHelpModel.Highlight[] getHighlights()

  Gets all highlights.

### addTextHelpModelListener

    public void addTextHelpModelListener(TextHelpModelListener l)

  Adds a listener for a TextHelpModel.

### removeTextHelpModelListener

    public void removeTextHelpModelListener(TextHelpModelListener l)

  Removes a listener for a TextHelpModel.