|
Oracle Fusion Middleware Java API Reference for Oracle Help 12c (12.1.2) E48720-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.help.Help
public class Help
The Help class provides a default implementation of a help system using the Oracle Help for Java components. This class provides APIs for programmatically controlling the help system. The APIs supported by this class can be divided into following categories :
Applications populate the Help object with help content via Book objects. Book objects contain the information that the help system needs to display the application's documentation. Book objects can be added or removed from the Help System anytime after their creation using the addBook()
and removeBook()
methods respectively. See the OHJ File Formats document for more information on the supported file formats for Books.
Applications can show particular topics using the showTopic()
methods. The application programmer specifies the topicID of the help content page to show. This topicID is resolved to an HTML page through the merged map file created from the Books added to the help system.
In addition, to the showTopic() methods the help system supports Oracle EWT's HelpProvider interface. See the showHelp() methods.
The default help system implementation consists of the following user-interface elements:
This class provides APIs to manipulate the visible state of each of these elements. In addition, you can optionally pass a Navigator argument to the showNavigatorWindow method to select which Navigator is initially displayed in the NavigatorWindow.
Oracle Help for Java supports a pluggable HTML browser interface. Applications can specify their own HTMLBrowser subclass for displaying help topics. Refer to oracle.help.htmlBrowser package for more information on this interface. The default HTMLBrowser component used for topic display is Oracle's modified version of ICESoft's ICE Browser.
Book
, HTMLBrowser
Constructor Summary | |
---|---|
Help() Creates an instance of the Help object with ICEBrowser as the HTMLBrowser component used for topic display. |
|
Help(java.applet.AppletContext appletContext, java.lang.String targetFrame) Creates an instance of the Help object using the native browser as the topic display through the given applet context. |
|
Help(java.applet.AppletContext appletContext, java.lang.String targetFrame, boolean combineBooks, boolean useLabelInfo) Creates an instance of the Help object using the native browser as the topic display through the given applet context. |
|
Help(boolean combineBooks, boolean useLabelInfo) Creates an instance of the Help object with ICEBrowser as the HTMLBrowser component used for topic display. |
|
Help(boolean combineBooks, boolean useLabelInfo, boolean dockedByDefault) Creates an instance of the Help object with ICEBrowser as the HTMLBrowser component used for topic display. |
|
Help(java.lang.Class htmlBrowserClass) Creates an instance of the Help object with specified browser as the HTMLBrowser component used for topic display. |
|
Help(java.lang.Class htmlBrowserClass, boolean combineBooks, boolean useLabelInfo) Creates an instance of the Help object with specified HTMLBrowser as the HTMLBrowser component used for topic display. |
|
Help(java.lang.Class htmlBrowserClass, boolean combineBooks, boolean useLabelInfo, boolean standAloneMode) Creates an instance of the Help object with specified HTMLBrowser as the HTMLBrowser component used for topic display. |
|
Help(java.lang.Class htmlBrowserClass, boolean combineBooks, boolean useLabelInfo, boolean standAloneMode, boolean dockedByDefault) Creates an instance of the Help object with specified HTMLBrowser as the HTMLBrowser component used for topic display. |
Method Summary | |
---|---|
void |
addBook(Book book) Add a book to the help system's library. |
void |
dispose() Dispose the help system. |
void |
enableFavoritesNavigator(java.net.URL location) Creates a Favorites Navigator using the file at location as the information to construct the navigator This method should be invoked after the construction of the Help object and before the help system is displayed |
Navigator[] |
getAllNavigators() Get the Navigator objects displayed in the Navigator Window. |
int |
getBookCount() Returns the number of Book objects currently in the help system's library. |
Book[] |
getBooks() Get all of the Book objects currently in the help system's library. |
static java.lang.String |
getHelpEncoding() Get the Character Set Encoding used by the Oracle Help for Java classes for reading in client help files. |
static java.util.Locale |
getHelpLocale() Get the Locale currently being used by the Oracle Help for Java classes for Locale sensitive operations and resource loading. |
static void |
registerClientWindow(java.awt.Window aWindow) Clients should register Window instances with the Help object. |
void |
registerCustomProtocolHandler(java.lang.String customProtocol, CustomProtocolHandler handler) Registers a CustomProtocolHandler for a custom protocol Consider the following HTML: <a href="custom:protocolName:protocolValue"/> When OHJ follows links that link, it will check for any CustomProtocolHandlers registered by the identifier "protocolName." If it finds a CustomProtocolHandler, its handleValue method will be invoked, passing protocolValue as the value |
void |
removeAllBooks() Removes all books from the help system's library. |
void |
removeBook(Book book) Remove a book from the help system. |
void |
setDefaultBook(Book book) Sets the default book for use with the showHelp methods. |
void |
setDefaultTopicID(java.lang.String topicID) Sets the default topicID for use with the showHelp methods. |
static void |
setHelpEncoding(java.lang.String helpEncoding) Set the Character Set Encoding used by the Oracle Help for Java classes for reading in client help files. |
static void |
setHelpLocale(java.util.Locale helpLocale) Set the Locale used by the Oracle Help for Java classes for Locale sensitive operations and resource loading. |
void |
setHelpOnHelp(Book book, java.lang.String topicID) Calling this method with valid book and topicID parameters will enable the "Help on Help" menu option in the Help Navigator. |
void |
setHelpOnHelp(java.net.URL helpOnHelpURL) Calling this method with a valid URL parameter will enable the "Help on Help" menu option in the Help Navigator. |
void |
setIconImage(java.awt.Image iconImage) Call this method to set a custom image for the window icons in the Oracle Help for Java windows. |
void |
setVisible(boolean visible) Sets the visibility of the help system. |
void |
showHelp(java.awt.Component component) Implements the HelpProvider interface from Oracle's JEWT toolkit. |
void |
showHelp(java.lang.Object book, java.lang.String topicID, java.awt.Component object) Implements the HelpProvider interface from Oracle's EWT toolkit. |
void |
showNavigatorWindow() Show the Navigator Window |
void |
showNavigatorWindow(Book activeBook) Show the Navigator Window with the NavigatorTabPanel for the given Book initially displayed. |
void |
showNavigatorWindow(Navigator activeNavigator) Show the Navigator Window with a specific Navigator displayed initially. |
void |
showTopic(Book book, java.lang.String topicID) Shows the given topic from the given book in a currently existing topic window. |
void |
showTopic(Book book, java.lang.String topicID, boolean alwaysCreate) Shows the given topic from the given book. |
void |
showTopic(Book book, java.lang.String topicID, boolean alwaysCreate, java.awt.Point location, java.awt.Dimension size) Shows the given topic from the given book. |
void |
topicActivated(oracle.help.navigator.NavigatorEvent e) Public method as a result of the NavigatorListener interface. |
void |
topicSelected(oracle.help.navigator.NavigatorEvent e) Public method as a result of the NavigatorListener interface. |
static void |
unregisterClientWindow(java.awt.Window aWindow) Clients should unregister each Window instance that they registered with the registerClientWindow() method once the window will no longer be active. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Help()
ICEBrowser
public Help(java.lang.Class htmlBrowserClass)
htmlBrowserClass
- the HTMLBrowser subclass to use as the topic display componentHTMLBrowser
public Help(java.applet.AppletContext appletContext, java.lang.String targetFrame)
This constructor will instruct the help system to show all of the views from the added books in one tab panel, and to ignore author defined labels for views in favor of standard tab labels.
Note that using the native browser for topic display through an applet context results in the loss of many of OHJ's ICE Browser specific topic display features (toc syncing, popups, window-types, a-links, etc).
appletContext
- the AppletContext to use to show topics in the native browsertargetFrame
- the name of the target frame in the native browser to use when showing topicsAppletContext
public Help(boolean combineBooks, boolean useLabelInfo)
combineBooks
- if true the help system will show all of the views from the Books added to the help system in one tab panel, if false the help sytem will create a different tab panel for each bookuseLabelInfo
- if true the help system uses the author defined label information for display and view merging, if false the help system uses standard Navigator labelsHTMLBrowser
public Help(boolean combineBooks, boolean useLabelInfo, boolean dockedByDefault)
combineBooks
- if true the help system will show all of the views from the Books added to the help system in one tab panel, if false the help sytem will create a different tab panel for each bookuseLabelInfo
- if true the help system uses the author defined label information for display and view merging, if false the help system uses standard Navigator labelsdockedByDefault
- if true the help system displays with the Help Navigator and Topic Window initially dockedHTMLBrowser
public Help(java.lang.Class htmlBrowserClass, boolean combineBooks, boolean useLabelInfo)
htmlBrowserClass
- the HTMLBrowser subclass to use as the topic display componentcombineBooks
- if true the help system will show all of the views from the Books added to the help system in one tab panel, if false the help sytem will create a different tab panel for each bookuseLabelInfo
- if true the help system uses the author defined label information for display and view merging, if false the help system uses standard Navigator labelsHTMLBrowser
public Help(java.lang.Class htmlBrowserClass, boolean combineBooks, boolean useLabelInfo, boolean standAloneMode)
htmlBrowserClass
- the HTMLBrowser subclass to use as the topic display componentcombineBooks
- if true the help system will show all of the views from the Books added to the help system in one tab panel, if false the help sytem will create a different tab panel for each bookuseLabelInfo
- if true the help system uses the author defined label information for display and view merging, if false the help system uses standard Navigator labelsstandAloneMode
- if true the help system will exit the JVM when all help windows have been closed. This should be set to false if you are launching OHJ from your java application.HTMLBrowser
public Help(java.lang.Class htmlBrowserClass, boolean combineBooks, boolean useLabelInfo, boolean standAloneMode, boolean dockedByDefault)
htmlBrowserClass
- the HTMLBrowser subclass to use as the topic display componentcombineBooks
- if true the help system will show all of the views from the Books added to the help system in one tab panel, if false the help sytem will create a different tab panel for each bookuseLabelInfo
- if true the help system uses the author defined label information for display and view merging, if false the help system uses standard Navigator labelsstandAloneMode
- if true the help system will exit the JVM when all help windows have been closed. This should be set to false if you are launching OHJ from your java application.dockedByDefault
- if true the help system displays with the Help Navigator and Topic Window initially dockedHTMLBrowser
public Help(java.applet.AppletContext appletContext, java.lang.String targetFrame, boolean combineBooks, boolean useLabelInfo)
Note that using the native browser for topic display through an applet context results in the loss of many of OHJ's ICE Browser specific topic display features (toc syncing, popups, window-types, a-links, etc).
appletContext
- the AppletContext to use to show topics in the native browsertargetFrame
- the name of the target frame in the native browser to use when showing topicscombineBooks
- if true the help system will show all of the views from the Books added to the help system in one tab panel, if false the help sytem will create a different tab panel for each bookuseLabelInfo
- if true the help system uses the author defined label information for display and view merging, if false the help system uses standard Navigator labelsAppletContext
Method Detail |
---|
public static void setHelpLocale(java.util.Locale helpLocale)
Most clients will want to use the system default Locale (the Locale that has been chosen by the end user on their operating system), in which case you will not need to call this method.
helpLocale
- -- The Locale, if null, the system default Locale will be used.public static java.util.Locale getHelpLocale()
Convenience wrapper for oracle.help.common.util.StaticLocaleContext.getLocale()
public static void setHelpEncoding(java.lang.String helpEncoding)
Most clients will want to use the default encoding of the default Locale (the Locale that has been chosen by the end user on their operating system), in which case you will not need to call this method.
helpEncoding
- -- The name of a Java supported Character Set Encoding.public static java.lang.String getHelpEncoding()
public void setIconImage(java.awt.Image iconImage)
iconImage
- -- The Image to use as the icon for the Oracle Help for Java windows.public void setVisible(boolean visible)
visible
- if true the help system will show the Navigator Window, if false the help system will hide the navigator window and all topic windowspublic void addBook(Book book)
book
- the book to add to the help system's librarypublic void removeBook(Book book)
book
- the book to remove from the help system's librarypublic void removeAllBooks()
public Book[] getBooks()
public int getBookCount()
public static void registerClientWindow(java.awt.Window aWindow)
aWindow
- the Window instance to registerpublic static void unregisterClientWindow(java.awt.Window aWindow)
registerClientWindow()
method once the window will no longer be active. Failure to unregister windows may result in the window not being garbage collected.aWindow
- the Window to unregisterpublic void registerCustomProtocolHandler(java.lang.String customProtocol, CustomProtocolHandler handler)
<a href="custom:protocolName:protocolValue"/>
When OHJ follows links that link, it will check for any CustomProtocolHandlers registered by the identifier "protocolName." If it finds a CustomProtocolHandler, its handleValue method will be invoked, passing protocolValue as the valuepublic void showNavigatorWindow()
public void showNavigatorWindow(Navigator activeNavigator)
activeNavigator
- -- the Navigator to show initially, if parameter is null, the Navigator Window will be shown with the previously selected Navigator displayedpublic void showNavigatorWindow(Book activeBook)
If the Help object was created with combineBooks set to true, then the one and only tab panel will be displayed regardless of the book passed as a parameter.
activeBook
- -- the Book object whose associated NavigatorTabPanel should be initially displayed when the Navigator Window is shown. The Book should have already been added to the Help system, if it has not been or if the parameter is null the previously selected NavigatorTabPanel will be initially displayed.public Navigator[] getAllNavigators()
public void showTopic(Book book, java.lang.String topicID) throws oracle.help.topicDisplay.TopicDisplayException
book
- The book to show the topic from.topicID
- The topicID for the topic to show.oracle.help.topicDisplay.TopicDisplayException
- if the specified topic cannot be displayedpublic void showTopic(Book book, java.lang.String topicID, boolean alwaysCreate) throws oracle.help.topicDisplay.TopicDisplayException
book
- The book to show the topic from.topicID
- The topicID for the topic to show.alwaysCreate
- If true, always create a new window; if false, reuse a window if possible.oracle.help.topicDisplay.TopicDisplayException
- if the specified topic cannot be displayedpublic void showTopic(Book book, java.lang.String topicID, boolean alwaysCreate, java.awt.Point location, java.awt.Dimension size) throws oracle.help.topicDisplay.TopicDisplayException
book
- The book to show the topic from.topicID
- The topicID for the topic to showalwaysCreate
- If true, always create a new window; if false, reuse a window if possible.location
- Location of the topic window.size
- Size of the topic window.oracle.help.topicDisplay.TopicDisplayException
- if the specified topic cannot be displayedpublic void showHelp(java.lang.Object book, java.lang.String topicID, java.awt.Component object)
showHelp
in interface oracle.ewt.help.HelpProvider
book
- The book to show the topic from.topic
- The topicID for the topic to showobject
- the Component for which help is being displayed. Pass null if no Component is involved.public void showHelp(java.awt.Component component)
component
- the Component for which help is being displayed.public void setHelpOnHelp(java.net.URL helpOnHelpURL)
helpOnHelpURL
- The url of an html page to display for Help on Help.public void setHelpOnHelp(Book book, java.lang.String topicID)
book
- the Book that contains the help on help topics (this book must have been added to the help system)topicID
- the topic id of the help topic to display for Help on Helppublic void setDefaultBook(Book book)
book
- The book to use as default.public void setDefaultTopicID(java.lang.String topicID)
topicID
- The topicID to use as default.public void dispose()
public void topicSelected(oracle.help.navigator.NavigatorEvent e)
topicSelected
in interface oracle.help.navigator.NavigatorListener
public void topicActivated(oracle.help.navigator.NavigatorEvent e)
topicActivated
in interface oracle.help.navigator.NavigatorListener
public void enableFavoritesNavigator(java.net.URL location)
location
-
|
Oracle Fusion Middleware Java API Reference for Oracle Help 12c (12.1.2) E48720-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |