|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The HelpBroker is the default presentation of a HelpSet. A HelpBroker is an abstraction of the presentation for a HelpSet; a straight-forward implementation is a JHelp() on the HelpSet. A HelpBroker can be asked to show a given Navigational View, and can display a given ID (help topic).
HelpSet
,
JHelpNavigator
,
javax.help.HelpVisitListener
Method Summary | |
void |
enableHelp(java.awt.Component comp,
java.lang.String id,
HelpSet hs)
Enables help for a component. |
void |
enableHelp(java.awt.MenuItem comp,
java.lang.String id,
HelpSet hs)
Enables help for a MenuItem. |
void |
enableHelpKey(java.awt.Component comp,
java.lang.String id,
HelpSet hs)
Enables the Help key on a component. |
void |
enableHelpKey(java.awt.Component comp,
java.lang.String id,
HelpSet hs,
java.lang.String presentation,
java.lang.String presentationName)
Enables the Help key on a component. |
void |
enableHelpOnButton(java.awt.Component comp,
java.lang.String id,
HelpSet hs)
Enables help for a component. |
void |
enableHelpOnButton(java.awt.MenuItem comp,
java.lang.String id,
HelpSet hs)
Enables help for a MenuItem. |
void |
enableHelpOnButton(java.lang.Object obj,
java.lang.String id,
HelpSet hs,
java.lang.String presentation,
java.lang.String presentationName)
Enables help for an object. |
Map.ID |
getCurrentID()
Determines The currently displayed ID (if any). |
java.net.URL |
getCurrentURL()
Determines the currently displayed ID. |
java.lang.String |
getCurrentView()
Gets name of the current navigational view. |
java.awt.Font |
getFont()
Gets the font for this HelpBroker. |
HelpSet |
getHelpSet()
Gets the current HelpSet for this JavaHelp object. |
java.util.Locale |
getLocale()
Returns the locale of this object. |
java.awt.Point |
getLocation()
Gets the location of the presentation. |
int |
getScreen()
Get ths the screen the presentation is displayed on This operation may throw an UnsupportedOperationException if the underlying implementation does not allow this. |
java.awt.Dimension |
getSize()
Gets the size of the presentation. |
void |
initPresentation()
Initializes the presentation. |
boolean |
isDisplayed()
Determines if the presentation is visible. |
boolean |
isViewDisplayed()
Determines if the Navigational View is visible. |
void |
setCurrentID(Map.ID id)
Displays this ID. |
void |
setCurrentID(java.lang.String id)
Displays this ID. |
void |
setCurrentURL(java.net.URL url)
Displays this ID. |
void |
setCurrentView(java.lang.String name)
Activates the Navigator view with a given name. |
void |
setDisplayed(boolean displayed)
Displays the presentation to the user. |
void |
setFont(java.awt.Font f)
Sets the font for this HelpBroker. |
void |
setHelpSet(HelpSet hs)
Sets the current HelpSet for this HelpBroker. |
void |
setHelpSetPresentation(HelpSet.Presentation hsPres)
Sets the presentation attributes from a HelpSet.Presentation. |
void |
setLocale(java.util.Locale l)
Sets the locale of this HelpBroker. |
void |
setLocation(java.awt.Point p)
Sets the position of the presentation. |
void |
setScreen(int screen)
Set the screen the presentation is to be displayed on This operation may throw an UnsupportedOperationException if the underlying implementation does not allow this. |
void |
setSize(java.awt.Dimension d)
Sets the size of the presentation. |
void |
setViewDisplayed(boolean displayed)
Hides/Shows Navigational Views. |
void |
showID(Map.ID id,
java.lang.String presentation,
java.lang.String presentationName)
Displays this ID in a given presentation |
void |
showID(java.lang.String id,
java.lang.String presentation,
java.lang.String presentationName)
Displays this ID in a particular presentation |
Method Detail |
public void setHelpSet(HelpSet hs)
hs
- The HelpSet this JavaHelp is presenting.public HelpSet getHelpSet()
public void setHelpSetPresentation(HelpSet.Presentation hsPres)
hsPres
- The HelpSet.Presentationpublic java.util.Locale getLocale()
public void setLocale(java.util.Locale l)
l
- The locale to become this component's locale.getLocale()
public java.awt.Font getFont()
public void setFont(java.awt.Font f)
public void setCurrentView(java.lang.String name)
java.lang.IllegalArgumentException
- if the name is not valid.public java.lang.String getCurrentView()
public void initPresentation()
public void setDisplayed(boolean displayed) throws UnsupportedOperationException
displayed
- Makes the presentation visible or not.
HelpBroker.UnsupportedOperationException
- If the operation is not supported.
UnsupportedOperationException
public boolean isDisplayed()
public void setLocation(java.awt.Point p) throws UnsupportedOperationException
UnsupportedOperationException
public java.awt.Point getLocation() throws UnsupportedOperationException
UnsupportedOperationException
public void setSize(java.awt.Dimension d) throws UnsupportedOperationException
UnsupportedOperationException
public java.awt.Dimension getSize() throws UnsupportedOperationException
UnsupportedOperationException
public void setScreen(int screen) throws UnsupportedOperationException
UnsupportedOperationException
public int getScreen() throws UnsupportedOperationException
UnsupportedOperationException
public void setViewDisplayed(boolean displayed)
displayed
- Make the navigational views visible or not.public boolean isViewDisplayed()
public void showID(Map.ID id, java.lang.String presentation, java.lang.String presentationName) throws InvalidHelpSetContextException
id
- An ID that identifies the topic to display.presentation
- The Presentation class to display the Help in.presentationName
- The name of a Presentation section from a
HelpSet to use. For some Presentations this will also be
the name to apply to the Presentation.
InvalidHelpSetContextException
- If id.hs is not contanied in the current
HelpSet of this broker.Presentation
public void showID(java.lang.String id, java.lang.String presentation, java.lang.String presentationName) throws BadIDException
id
- A String identifying the topic to show relative to getHelpSet()presentation
- The Presentation class to display the Help in.presentationName
- The name of a Presentation section from a
HelpSet to use. For some Presentations this will also be
the name to apply to the Presentation.
BadIDException
- if the ID is not valid in the map.Presentation
public void setCurrentID(Map.ID id) throws InvalidHelpSetContextException
id
- An ID that identifies the topic to display.
InvalidHelpSetContextException
- If id.hs is not contanied in the current
HelpSet of this broker.HelpModel.setCurrentID(javax.help.Map.ID)
public void setCurrentID(java.lang.String id) throws BadIDException
id
- A String identifying the topic to show relative to getHelpSet()
BadIDException
- if the ID is not valid in the map.public Map.ID getCurrentID()
public void setCurrentURL(java.net.URL url)
url
- The URL to showpublic java.net.URL getCurrentURL()
public void enableHelpKey(java.awt.Component comp, java.lang.String id, HelpSet hs)
comp
- The component to enable the keyboard actions on.id
- The default HelpID to be displayed.hs
- The default HelpSet to be displayed.public void enableHelpKey(java.awt.Component comp, java.lang.String id, HelpSet hs, java.lang.String presentation, java.lang.String presentationName)
comp
- The component to enable the keyboard actions on.id
- The default HelpID to be displayed.hs
- The default HelpSet to be displayed.presentation
- The Presentation class to display the Help in.presentationName
- The name of a Presentation section from a
HelpSet to use. For some Presentations this will also be
the name to apply to the Presentation.Presentation
public void enableHelp(java.awt.Component comp, java.lang.String id, HelpSet hs)
CSH.setHelpID
,
CSH.setHelpSet
public void enableHelp(java.awt.MenuItem comp, java.lang.String id, HelpSet hs)
CSH.setHelpID
,
CSH.setHelpSet
public void enableHelpOnButton(java.awt.Component comp, java.lang.String id, HelpSet hs) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
CSH.setHelpID
,
CSH.setHelpSet
,
AbstractButton
,
Button
public void enableHelpOnButton(java.awt.MenuItem comp, java.lang.String id, HelpSet hs)
CSH.setHelpID
,
CSH.setHelpSet
,
MenuItem
public void enableHelpOnButton(java.lang.Object obj, java.lang.String id, HelpSet hs, java.lang.String presentation, java.lang.String presentationName) throws java.lang.IllegalArgumentException
id
- The default HelpID to be displayed.hs
- The default HelpSet to be displayed.presentation
- The Presentation class to display the Help in.presentationName
- The name of a Presentation section from a
HelpSet to use. For some Presentations this will also be
the name to apply to the Presentation.
java.lang.IllegalArgumentException
Presentation
,
CSH.setHelpID
,
CSH.setHelpSet
,
AbstractButton
,
Button
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |