Package javax.help
Interface TextHelpModel
- All Superinterfaces:
HelpModel
- All Known Implementing Classes:
DefaultHelpModel
The interface to a HelpModel that manipulates text.
It provides additional text operations.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
This is very similar to javax.swing.text.Highlighter.Highlight except that it does not use the notion of HighlightPainter. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addHighlight
(int pos0, int pos1) Adds a highlight to a range of positions in a document.void
Adds a listener for a TextHelpModel.Gets the title of the document.Gets all highlights.void
Removes all highlights on the current document.void
Removes a listener for a TextHelpModel.void
setDocumentTitle
(String title) Sets the title of the document.void
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 Details
-
getDocumentTitle
String getDocumentTitle()Gets the title of the document.- Returns:
- The title of document visited.
-
setDocumentTitle
Sets the title of the document. A property change event is generated.- Parameters:
title
- The title currently shown.
-
removeAllHighlights
void removeAllHighlights()Removes all highlights on the current document. -
addHighlight
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
Sets the highlights to be a range of positions in a document.- Parameters:
h
- The array of highlight objects.
-
getHighlights
TextHelpModel.Highlight[] getHighlights()Gets all highlights. -
addTextHelpModelListener
Adds a listener for a TextHelpModel. -
removeTextHelpModelListener
Removes a listener for a TextHelpModel.
-