|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.help.DefaultHelpBroker
An implmentation of the HelpBroker interface
Constructor Summary | |
DefaultHelpBroker()
Zero-argument constructor. |
|
DefaultHelpBroker(HelpSet hs)
Constructor |
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 a Component. |
Map.ID |
getCurrentID()
Determines which ID is displayed (if any). |
java.net.URL |
getCurrentURL()
Determines which URL is displayed. |
java.lang.String |
getCurrentView()
Determines the current navigator. |
java.awt.Font |
getFont()
Gets the font for this HelpBroker. |
HelpSet |
getHelpSet()
Returns the default HelpSet |
java.util.Locale |
getLocale()
Gets the locale of this component. |
java.awt.Point |
getLocation()
Requests the location of the presentation. |
int |
getScreen()
Requests the screen of the presentation. |
java.awt.Dimension |
getSize()
Requests the size of the presentation. |
WindowPresentation |
getWindowPresentation()
Get the WindowPresentation for this HelpBroker |
void |
initPresentation()
Initializes the presentation. |
boolean |
isDisplayed()
Determines if the presentation is displayed. |
boolean |
isViewDisplayed()
Determines if the current view is visible. |
void |
keyPressed(java.awt.event.KeyEvent e)
Invoked when a key is pressed. |
void |
keyReleased(java.awt.event.KeyEvent e)
Invoked when a key is released. |
void |
keyTyped(java.awt.event.KeyEvent e)
Invoked when a key is typed. |
void |
setActivationObject(java.lang.Object comp)
Set the activation window from given Component or MenuItem. |
void |
setActivationWindow(java.awt.Window window)
Set the activation window. |
void |
setCurrentID(Map.ID id)
Displays this ID--HelpVisitListeners are notified. |
void |
setCurrentID(java.lang.String id)
Shows this ID as content relative to the (top) HelpSet for the HelpBroker instance--HelpVisitListeners are notified. |
void |
setCurrentURL(java.net.URL url)
Displays this URL. |
void |
setCurrentView(java.lang.String name)
Set the currentView to the navigator with the same name as the name parameter. |
void |
setDisplayed(boolean b)
Displays the presentation to the user. |
void |
setFont(java.awt.Font f)
Sets the font for this this HelpBroker. |
void |
setHelpSet(HelpSet hs)
Changes the HelpSet for this broker. |
void |
setHelpSetPresentation(HelpSet.Presentation hsPres)
Set 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)
Requests the presentation be located at a given position. |
void |
setScreen(int screen)
Requests the presentation be set to a given screen. |
void |
setSize(java.awt.Dimension d)
Requests the presentation be set to a given size. |
void |
setViewDisplayed(boolean displayed)
Hides/Shows view. |
void |
showID(Map.ID id,
java.lang.String presentation,
java.lang.String presentationName)
Show this ID. |
void |
showID(java.lang.String id,
java.lang.String presentation,
java.lang.String presentationName)
Shows this ID. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DefaultHelpBroker(HelpSet hs)
public DefaultHelpBroker()
Method Detail |
public WindowPresentation getWindowPresentation()
public HelpSet getHelpSet()
getHelpSet
in interface HelpBroker
public void setHelpSet(HelpSet hs)
setHelpSet
in interface HelpBroker
hs
- The HelpSet to set for this broker.
A null hs is valid parameter.public void setHelpSetPresentation(HelpSet.Presentation hsPres)
setHelpSetPresentation
in interface HelpBroker
hsPres
- The HelpSet.Presentationpublic java.util.Locale getLocale()
getLocale
in interface HelpBroker
setLocale(java.util.Locale)
public void setLocale(java.util.Locale l)
setLocale
in interface HelpBroker
l
- The locale to become this component's locale. A null locale
is the same as the defaultLocale.getLocale()
public java.awt.Font getFont()
getFont
in interface HelpBroker
public void setFont(java.awt.Font f)
setFont
in interface HelpBroker
f
- The font.public void setCurrentView(java.lang.String name)
setCurrentView
in interface HelpBroker
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.
java.lang.IllegalArgumentException
- if nav is null or not a valid Navigator.public java.lang.String getCurrentView()
getCurrentView
in interface HelpBroker
public void initPresentation()
initPresentation
in interface HelpBroker
public void setDisplayed(boolean b)
setDisplayed
in interface HelpBroker
b
- Makes the presentation visible or not.public boolean isDisplayed()
isDisplayed
in interface HelpBroker
public void setLocation(java.awt.Point p)
setLocation
in interface HelpBroker
public java.awt.Point getLocation()
getLocation
in interface HelpBroker
public void setSize(java.awt.Dimension d)
setSize
in interface HelpBroker
public java.awt.Dimension getSize() throws UnsupportedOperationException
getSize
in interface HelpBroker
UnsupportedOperationException
public void setScreen(int screen)
setScreen
in interface HelpBroker
public int getScreen() throws UnsupportedOperationException
getScreen
in interface HelpBroker
UnsupportedOperationException
public void setViewDisplayed(boolean displayed)
setViewDisplayed
in interface HelpBroker
displayed
- Make the navigational views visible or not.public boolean isViewDisplayed()
isViewDisplayed
in interface HelpBroker
public void showID(java.lang.String id, java.lang.String presentation, java.lang.String presentationName) throws BadIDException
showID
in interface HelpBroker
id
- A string that identifies the topic to show for the loaded (top) HelpSetpresentation
- 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
- The ID is not valid for the HelpSet
java.lang.IllegalArgumentException
- if presentation is not validPresentation
public void showID(Map.ID id, java.lang.String presentation, java.lang.String presentationName) throws InvalidHelpSetContextException
showID
in interface HelpBroker
id
- a Map.ID indicating the URL to displaypresentation
- 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 the current helpset does not contain
id.helpsetPresentation
public void setCurrentID(java.lang.String id) throws BadIDException
setCurrentID
in interface HelpBroker
id
- A string that identifies the topic to show for the loaded (top) HelpSet
BadIDException
- The ID is not valid for the HelpSetpublic void setCurrentID(Map.ID id) throws InvalidHelpSetContextException
setCurrentID
in interface HelpBroker
id
- a Map.ID indicating the URL to display
InvalidHelpSetContextException
- if the current helpset does not contain
id.helpsetHelpModel.setCurrentID(javax.help.Map.ID)
public Map.ID getCurrentID()
getCurrentID
in interface HelpBroker
public void setCurrentURL(java.net.URL url)
setCurrentURL
in interface HelpBroker
url
- The url to display. A null URL is a valid url.public java.net.URL getCurrentURL()
getCurrentURL
in interface HelpBroker
public void enableHelpKey(java.awt.Component comp, java.lang.String id, HelpSet hs)
enableHelpKey
in interface HelpBroker
comp
- the Component to enable the keyboard actions on.id
- the default HelpID to be displayedhs
- the default HelpSet to be displayed. If hs is null the default HelpSet
will be assumed.getHelpKeyActionListener
,
public void enableHelpKey(java.awt.Component comp, java.lang.String id, HelpSet hs, java.lang.String presentation, java.lang.String presentationName)
enableHelpKey
in interface HelpBroker
comp
- the Component to enable the keyboard actions on.id
- the default HelpID to be displayedhs
- the default HelpSet to be displayed. If hs is null the
default HelpSet from the HelpBroker is assummed. null is not
valid if presenation is not null.presentation
- The Presentation class to display the content in.
If presentation is null the HelpBroker is used to display the
content.presentationName
- The name of a Presentation section to control
the display of the content. Also for some Presenations this
will be used to "name" the Presentation.
java.lang.IllegalArgumentException
- if presentation != null and hs == nullgetHelpKeyActionListener
,
public void keyTyped(java.awt.event.KeyEvent e)
keyTyped
in interface java.awt.event.KeyListener
public void keyPressed(java.awt.event.KeyEvent e)
keyPressed
in interface java.awt.event.KeyListener
public void keyReleased(java.awt.event.KeyEvent e)
keyReleased
in interface java.awt.event.KeyListener
public void enableHelp(java.awt.Component comp, java.lang.String id, HelpSet hs)
enableHelp
in interface HelpBroker
comp
- the Component to set the id and hs on.id
- the String value of an Map.ID.hs
- the HelpSet the id is in. If hs is null the default HelpSet
will be assumed.CSH.setHelpID
,
CSH.setHelpSet
public void enableHelp(java.awt.MenuItem comp, java.lang.String id, HelpSet hs)
enableHelp
in interface HelpBroker
comp
- the MenuItem to set the id and hs on.id
- the String value of an Map.ID.hs
- the HelpSet the id is in. If hs is null the default HelpSet
will be assumed.CSH.setHelpID
,
CSH.setHelpSet
public void enableHelpOnButton(java.awt.Component comp, java.lang.String id, HelpSet hs)
enableHelpOnButton
in interface HelpBroker
comp
- the Component to set the id and hs on. If the Component is not
a javax.swing.AbstractButton or a
java.awt.Button an IllegalArgumentException is thrown.id
- the String value of an Map.ID.hs
- the HelpSet the id is in. If hs is null the default HelpSet
will be assumed.
java.lang.IllegalArgumentException
- if comp is null.CSH.setHelpID
,
CSH.setHelpSet
,
AbstractButton
,
Button
public void enableHelpOnButton(java.awt.MenuItem comp, java.lang.String id, HelpSet hs)
enableHelpOnButton
in interface HelpBroker
comp
- the MenuItem to set the id and hs on. If comp is null
an IllegalAgrumentException is thrown.id
- the String value of an Map.ID.hs
- the HelpSet the id is in. If hs is null the default HelpSet
will be assumed.
java.lang.IllegalArgumentException
- if comp is null.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)
enableHelpOnButton
in interface HelpBroker
id
- the String value of an Map.ID.hs
- the HelpSet the id is in. If hs is null the default HelpSet
will be assumed.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
- if comp is null.CSH.setHelpID
,
CSH.setHelpSet
,
AbstractButton
,
Button
public void setActivationObject(java.lang.Object comp)
setActivationWindow.
setActivationWindow
public void setActivationWindow(java.awt.Window window)
window
- the activating window
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |