Class javax.help.ServletHelpBroker

java.lang.Object
    |
    +----javax.help.ServletHelpBroker

public class ServletHelpBroker
extends java.lang.Object
implements HelpBroker
An implmentation of the HelpBroker interface for Servlets


helpset

protected HelpSet helpset

model

protected DefaultHelpModel model

curNav

protected NavigatorView curNav

viewDisplayed

protected boolean viewDisplayed

locale

protected java.util.Locale locale

font

protected java.awt.Font font

ServletHelpBroker

public ServletHelpBroker()
Zero-argument constructor. It should be followed by a setHelpSet() invocation.

getHelpSet

public HelpSet getHelpSet()
Returns the default HelpSet
Implements:
getHelpSet in interface HelpBroker

setHelpSet

public void setHelpSet(HelpSet hs)
Changes the HelpSet for this broker.
Implements:
setHelpSet in interface HelpBroker
Parameters:
hs - The HelpSet to set for this broker. A null hs is valid parameter.

getLocale

public java.util.Locale getLocale()
Gets the locale of this component.
Implements:
getLocale in interface HelpBroker
Returns:
This component's locale. If this component does not have a locale, the defaultLocale is returned.
See Also:
setLocale

setLocale

public void setLocale(java.util.Locale l)
Sets the locale of this HelpBroker. The locale is propagated to the presentation.
Implements:
setLocale in interface HelpBroker
Parameters:
l - The locale to become this component's locale. A null locale is the same as the defaultLocale.
See Also:
getLocale

getFont

public java.awt.Font getFont()
Gets the font for this HelpBroker.
Implements:
getFont in interface HelpBroker

setFont

public void setFont(java.awt.Font f)
Sets the font for this this HelpBroker.
Implements:
setFont in interface HelpBroker
Parameters:
f - The font.

setCurrentView

public void setCurrentView(java.lang.String name)
Set the currentView to the navigator with the same name as the name parameter.
Implements:
setCurrentView in interface HelpBroker
Parameters:
name - The name of the navigator to set as the current view. If nav is null or not a valid Navigator in this HelpBroker then an IllegalArgumentException is thrown.
Throws:
java.lang.IllegalArgumentException - if nav is null or not a valid Navigator.

getCurrentView

public java.lang.String getCurrentView()
Determines the current navigator.
Implements:
getCurrentView in interface HelpBroker

getCurrentNavigatorView

public NavigatorView getCurrentNavigatorView()
Returns the current navigator as a NavigatorView.

initPresentation

public void initPresentation()
Initializes the presentation. Not implemented in ServletHelpBroker.
Implements:
initPresentation in interface HelpBroker

setDisplayed

public void setDisplayed(boolean b)
Displays the presentation to the user.
Implements:
setDisplayed in interface HelpBroker

isDisplayed

public boolean isDisplayed()
Determines if the presentation is displayed.
Implements:
isDisplayed in interface HelpBroker

setLocation

public void setLocation(java.awt.Point p) throws UnsupportedOperationException
Requests the presentation be located at a given position. This operation throws an UnsupportedOperationException in ServletHelpBroker
Implements:
setLocation in interface HelpBroker

getLocation

public java.awt.Point getLocation() throws UnsupportedOperationException
Requests the location of the presentation. This operation throws an UnsupportedOperationException in ServletHelpBroker
Implements:
getLocation in interface HelpBroker

setSize

public void setSize(java.awt.Dimension d) throws UnsupportedOperationException
Requests the presentation be set to a given size. This operation throws an UnsupportedOperationException in ServletHelpBroker
Implements:
setSize in interface HelpBroker

getSize

public java.awt.Dimension getSize() throws UnsupportedOperationException
Requests the size of the presentation. throws UnsupportedOperationException in ServletHelpBroker.
Implements:
getSize in interface HelpBroker

setScreen

public void setScreen(int screen) throws UnsupportedOperationException
Requests the presentation be set to a given screen. This operation throws an UnsupportedOperationException in ServletHelpBroker
Implements:
setScreen in interface HelpBroker

getScreen

public int getScreen() throws UnsupportedOperationException
Requests the screen of the presentation. throws UnsupportedOperationException in ServletHelpBroker.
Implements:
getScreen in interface HelpBroker

setViewDisplayed

public void setViewDisplayed(boolean displayed)
Hides/Shows view.
Implements:
setViewDisplayed in interface HelpBroker

isViewDisplayed

public boolean isViewDisplayed()
Determines if the current view is visible.
Implements:
isViewDisplayed in interface HelpBroker

setCurrentID

public void setCurrentID(java.lang.String id) throws BadIDException
Shows this ID as content relative to the (top) HelpSet for the HelpBroker instance--HelpVisitListeners are notified.
Implements:
setCurrentID in interface HelpBroker
Parameters:
id - A string that identifies the topic to show for the loaded (top) HelpSet
Throws:
BadIDException - The ID is not valid for the HelpSet

setCurrentID

public void setCurrentID(Map.ID id) throws InvalidHelpSetContextException
Displays this ID--HelpVisitListeners are notified.
Implements:
setCurrentID in interface HelpBroker
Parameters:
id - a Map.ID indicating the URL to display
Throws:
InvalidHelpSetContextException - if the current helpset does not contain id.helpset

getCurrentID

public Map.ID getCurrentID()
Determines which ID is displayed (if any).
Implements:
getCurrentID in interface HelpBroker

setCurrentURL

public void setCurrentURL(java.net.URL url)
Displays this URL. HelpVisitListeners are notified. The currentID changes if there is a mathing ID for this URL
Implements:
setCurrentURL in interface HelpBroker
Parameters:
url - The url to display. A null URL is a valid url.

getCurrentURL

public java.net.URL getCurrentURL()
Determines which URL is displayed.
Implements:
getCurrentURL in interface HelpBroker

enableHelpKey

public void enableHelpKey(java.awt.Component comp,
                          java.lang.String id,
                          HelpSet hs)
Enables the Help key on a Component. Not implemented in ServletHelpBroker
Implements:
enableHelpKey in interface HelpBroker

enableHelp

public void enableHelp(java.awt.Component comp,
                       java.lang.String id,
                       HelpSet hs)
Enables help for a Component. Not implemented in ServletHelpBroker
Implements:
enableHelp in interface HelpBroker

enableHelp

public void enableHelp(java.awt.MenuItem comp,
                       java.lang.String id,
                       HelpSet hs)
Enables help for a MenuItem. Not implemented in ServletHelpBroker
Implements:
enableHelp in interface HelpBroker

enableHelpOnButton

public void enableHelpOnButton(java.awt.Component comp,
                               java.lang.String id,
                               HelpSet hs)
Enables help for a Component. Not implemented in ServletHelpBroker
Implements:
enableHelpOnButton in interface HelpBroker

enableHelpOnButton

public void enableHelpOnButton(java.awt.MenuItem comp,
                               java.lang.String id,
                               HelpSet hs)
Enables help for a MenuItem. Not implemented in ServletHelpBroker.
Implements:
enableHelpOnButton in interface HelpBroker

setHelpSetPresentation

public void setHelpSetPresentation(HelpSet.Presentation pres)
Implements:
setHelpSetPresentation in interface HelpBroker

showID

public void showID(java.lang.String id,
                   java.lang.String presentation,
                   java.lang.String presentationName) throws BadIDException
Implements:
showID in interface HelpBroker

showID

public void showID(Map.ID id,
                   java.lang.String presentation,
                   java.lang.String presentationName) throws InvalidHelpSetContextException
Implements:
showID in interface HelpBroker

enableHelpKey

public void enableHelpKey(java.awt.Component comp,
                          java.lang.String id,
                          HelpSet hs,
                          java.lang.String presentation,
                          java.lang.String presentationName)
Implements:
enableHelpKey in interface HelpBroker

enableHelpOnButton

public void enableHelpOnButton(java.lang.Object obj,
                               java.lang.String id,
                               HelpSet hs,
                               java.lang.String presentation,
                               java.lang.String presentationName)
Implements:
enableHelpOnButton in interface HelpBroker