|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.help.DefaultHelpModel
This class implements the javax.help.HelpModel API and notifies the JHelpModel listeners when changes occur.
Nested Class Summary | |
static class |
DefaultHelpModel.DefaultHighlight
A default implementation of TextHelpModel.Highlight |
Nested classes inherited from class javax.help.TextHelpModel |
|
Constructor Summary | |
DefaultHelpModel(HelpSet hs)
Constructs a HelpModel from a HelpSet |
Method Summary | |
void |
addHelpModelListener(HelpModelListener l)
Adds a listener for the HelpModelEvent posted after the model has changed. |
void |
addHighlight(int pos0,
int pos1)
Highlights a range of positions in a document. |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l)
Adds a listener to changes to the properties in this model. |
void |
addTextHelpModelListener(TextHelpModelListener l)
Adds a listener for the TextHelpModelEvent posted after the model has changed. |
Map.ID |
getCurrentID()
Gets the current ID. |
java.net.URL |
getCurrentURL()
Returns the current URL |
java.lang.String |
getDocumentTitle()
Gets the document title. |
HelpSet |
getHelpSet()
Gets the backing HelpSet. |
TextHelpModel.Highlight[] |
getHighlights()
Geta all the highlights currently active. |
void |
removeAllHighlights()
Removes highlights. |
void |
removeHelpModelListener(HelpModelListener l)
Removes a listener previously added with addHelpListener |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l)
Removes a listener to changes to the properties in this model. |
void |
removeTextHelpModelListener(TextHelpModelListener l)
Removes a listener previously added with addHelpListener |
void |
setCurrentID(Map.ID ident)
Sets the current ID. |
void |
setCurrentID(Map.ID ident,
java.lang.String historyName,
JHelpNavigator navigator)
Sets the current ID relative to some HelpSet HelpModelListeners and HelpVisitListeners are notified |
void |
setCurrentURL(java.net.URL url)
Sets the current URL. |
void |
setCurrentURL(java.net.URL url,
java.lang.String historyName,
JHelpNavigator navigator)
Sets the current URL and the name wich will appear in history list. |
void |
setDocumentTitle(java.lang.String title)
Assigns the document title. |
void |
setHelpSet(HelpSet hs)
Sets the HelpSet for this HelpModel. |
void |
setHighlights(TextHelpModel.Highlight[] h)
Set highlights. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DefaultHelpModel(HelpSet hs)
hs
- The HelpSet from which to build this model. A null hs is valid
creating a DefaultHelpModel without a HelpSet.HelpSet
Method Detail |
public void setHelpSet(HelpSet hs)
setHelpSet
in interface HelpModel
public HelpSet getHelpSet()
getHelpSet
in interface HelpModel
public void setCurrentID(Map.ID ident) throws InvalidHelpSetContextException
setCurrentID
in interface HelpModel
ident
- The ID to set.
If ident is null set the currentID to the HelpSet's HomeID.
If the HomeID doesn't exist the currentID is set to null.
InvalidHelpSetContextException
- The ID is not valid for the HelpSetpublic void setCurrentID(Map.ID ident, java.lang.String historyName, JHelpNavigator navigator) throws InvalidHelpSetContextException
setCurrentID
in interface HelpModel
historyName
- the name for history storagenavigator
- the name of the navigator for historyident
- the ID used to set
InvalidHelpSetContextException
- The HelpSet of the ID is not
valid for the HelpSet currently loaded in the modelpublic Map.ID getCurrentID()
getCurrentID
in interface HelpModel
public void setCurrentURL(java.net.URL url)
setCurrentURL
in interface HelpModel
url
- The url to set the model to. A null URL is a valid url.public void setCurrentURL(java.net.URL url, java.lang.String historyName, JHelpNavigator navigator)
setCurrentURL
in interface HelpModel
url
- The URL to set.historyName
- The name to set for historynavigator
- The name of the navigator for historypublic java.net.URL getCurrentURL()
getCurrentURL
in interface HelpModel
public void addHighlight(int pos0, int pos1)
addHighlight
in interface TextHelpModel
pos0
- start positionpos1
- end positionpublic void removeAllHighlights()
removeAllHighlights
in interface TextHelpModel
public void setHighlights(TextHelpModel.Highlight[] h)
setHighlights
in interface TextHelpModel
h
- An array of Hightlights. If h is null it is the same as setting
no highlightspublic TextHelpModel.Highlight[] getHighlights()
getHighlights
in interface TextHelpModel
public void addHelpModelListener(HelpModelListener l)
addHelpModelListener
in interface HelpModel
l
- - The listener to add.
java.lang.IllegalArgumentException
- if l is null.HelpModel.removeHelpModelListener(javax.help.event.HelpModelListener)
public void removeHelpModelListener(HelpModelListener l)
removeHelpModelListener
in interface HelpModel
l
- - The listener to remove. If l is not in the list of listeners
it is ignored.
java.lang.IllegalArgumentException
- if l is null.HelpModel.addHelpModelListener(javax.help.event.HelpModelListener)
public void addTextHelpModelListener(TextHelpModelListener l)
addTextHelpModelListener
in interface TextHelpModel
l
- - The listener to add.
java.lang.IllegalArgumentException
- if l is null.HelpModel.removeHelpModelListener(javax.help.event.HelpModelListener)
public void removeTextHelpModelListener(TextHelpModelListener l)
removeTextHelpModelListener
in interface TextHelpModel
l
- - The listener to remove. If l is not on the list of listeners
it is ignored.
java.lang.IllegalArgumentException
- if l is null.HelpModel.addHelpModelListener(javax.help.event.HelpModelListener)
public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
addPropertyChangeListener
in interface HelpModel
l
- the listener to addpublic void removePropertyChangeListener(java.beans.PropertyChangeListener l)
removePropertyChangeListener
in interface HelpModel
l
- the listener to remove. If l is not on the list of listeners
it is ignored.public void setDocumentTitle(java.lang.String title)
setDocumentTitle
in interface TextHelpModel
title
- the Title for the document currently being shown. A null
title is valid.public java.lang.String getDocumentTitle()
getDocumentTitle
in interface TextHelpModel
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |