public class SwingHelpContentViewer extends AbstractHelpContentViewer<javax.swing.JComponent,java.awt.Window> implements ContentViewer
ArticlesModel by calling the installModel(org.docgene.help.model.ArticlesModel)
method. Note that this can also be performed directly through the JavaHelpFactory by the
JavaHelpFactory.install(org.docgene.help.HelpContentViewer) methodgetHelpComponent() and add it in your GUIgetHelpWindow(java.awt.Window, java.lang.String, int, int) and add
it in your GUIregisterContextHelp(java.lang.String, javax.swing.JComponent) method.articleIcon, backwardIcon, closedChapterIcon, currentArticle, currentTitle, forwardIcon, fullTextSearchText, glossaryIcon, hintText, history, homeIcon, localization, location, model, openChapterIcon, previousPage, searchIconHELP_CLIENT_PROPERTY, ICON_BACKWARD, ICON_FORWARD, ICON_GLOSSARY, ICON_HOME| Constructor and Description |
|---|
SwingHelpContentViewer() |
| Modifier and Type | Method and Description |
|---|---|
void |
applyLink(Article article,
java.net.URL url,
java.lang.String anchor)
Apply a link.
|
HistoryElement |
back()
Perform a back action in the history.
|
javax.swing.JButton |
createContextHelpButton()
Create a button to start a context sensitive help.
|
HistoryElement |
forward()
Perform a forward action in the history.
|
ArticlesModel |
getArticlesModel()
Return the articles model.
|
AutoComplete |
getAutoComplete()
Return the AutoComplete element.
|
EngineManager |
getEngineManager()
Return the engine manager.
|
javax.swing.JComponent |
getHelpComponent()
Return the component which shows the help GUI.
|
javax.swing.JDialog |
getHelpWindow(java.awt.Window owner,
java.lang.String title,
int width,
int height)
Return the dialog window which shows the help GUI.
|
NavigationHistory |
getHistory()
Return the navigation history.
|
javax.swing.JPanel |
getRootPane()
Return the root pane.
|
javax.swing.JComponent |
getScrollPane()
Return the scroll pane.
|
void |
goTo(HistoryElement element)
Go to an element.
|
void |
installModel(ArticlesModel model)
Install the Help content in the HelpContentViewer.
|
void |
pageLoaded(java.net.URL url)
Fired when a page is loaded.
|
boolean |
registerContextHelp(java.lang.String helpID,
javax.swing.JComponent component)
Add a context sensitive help to a component.
|
void |
registerContextHelpWindow(java.awt.Window window)
Add a Window managed by the context help.
|
void |
reloadPage()
Reload the current page.
|
void |
selectInTree(Article article)
Select an article in the tree.
|
void |
setArticlesTreeCellRenderer(ArticlesTreeCellRenderer treeRenderer)
Set the TreeCellRenderer for the articles.
|
void |
setContextHelpIcon(java.net.URL url)
Set the URL for the icon specifying the image for the context sensitive help.
|
void |
setContextHelpPointerImage(java.net.URL url)
Set the URL for the image for the context sensitive pointer shape.
|
void |
setCurrentArticle(Article article)
Set the current article.
|
void |
setCurrentTitle(java.lang.String title)
Set the current title.
|
void |
setLoadHTMLInSwing(boolean htmlInSwing)
Set if html pages in help content (not articles) will be shown in Swing.
|
void |
setPreviousPage(java.net.URL url,
java.lang.String anchor)
Set the previous page.
|
void |
showHelpDialog(int x,
int y)
Show the help dialog.
|
void |
showHelpDialog(javax.swing.JComponent relativeTo)
Show the help dialog relative to a component.
|
void |
showHelpTopic(java.lang.String helpID,
javax.swing.JComponent relativeTo)
Show the help topic for a specified id.
|
void |
updateUI()
Update the UI of the viewer.
|
getCurrentArticle, getCurrentTitle, getElementName, getLocale, getLocalization, getNavigationHistory, getPreviousPage, isShowingSearchExceptions, setArticleIcon, setClosedChapterIcon, setDividerLocation, setExpandedChapterIcon, setFullSearchText, setIcon, setLocale, setSearchTextHint, setSearchTextIcon, showSearchExceptionsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCurrentArticle, getCurrentTitle, getLocale, getLocalization, getStyleSheetThemes, hasStyleSheetTheme, isShowingSearchExceptions, resetStyleSheetTheme, setArticleIcon, setClosedChapterIcon, setDividerLocation, setExpandedChapterIcon, setFullSearchText, setIcon, setLocale, setLocale, setSearchTextHint, setSearchTextIcon, setStyleSheetTheme, showSearchExceptionspublic javax.swing.JPanel getRootPane()
getRootPane in interface ContentViewerpublic javax.swing.JComponent getScrollPane()
getScrollPane in interface ContentViewerpublic ArticlesModel getArticlesModel()
getArticlesModel in interface HelpContentViewer<javax.swing.JComponent,java.awt.Window>public void installModel(ArticlesModel model) throws java.io.IOException
installModel in interface HelpContentViewer<javax.swing.JComponent,java.awt.Window>model - the ArticlesModeljava.io.IOExceptionpublic void updateUI()
updateUI in interface ContentViewerpublic void setLoadHTMLInSwing(boolean htmlInSwing)
htmlInSwing - true if html pages in help content (not articles) will be shown in Swing.public EngineManager getEngineManager()
public void setContextHelpIcon(java.net.URL url)
setContextHelpIcon in interface HelpContentViewer<javax.swing.JComponent,java.awt.Window>url - the URLpublic void setContextHelpPointerImage(java.net.URL url)
setContextHelpPointerImage in interface HelpContentViewer<javax.swing.JComponent,java.awt.Window>url - the URLpublic void setArticlesTreeCellRenderer(ArticlesTreeCellRenderer treeRenderer)
treeRenderer - public HistoryElement back()
AbstractHelpContentViewerback in class AbstractHelpContentViewer<javax.swing.JComponent,java.awt.Window>public HistoryElement forward()
AbstractHelpContentViewerforward in class AbstractHelpContentViewer<javax.swing.JComponent,java.awt.Window>public void selectInTree(Article article)
ContentViewerselectInTree in interface ContentViewerarticle - the articlepublic void showHelpTopic(java.lang.String helpID,
javax.swing.JComponent relativeTo)
showHelpTopic in interface HelpContentViewer<javax.swing.JComponent,java.awt.Window>helpID - the help idrelativeTo - the component from which the help Window must be relative to (can be null)public void applyLink(Article article, java.net.URL url, java.lang.String anchor)
applyLink in interface ContentViewerarticle - the article (may be null)url - the URLanchor - the anchoe (may be null)public void goTo(HistoryElement element)
AbstractHelpContentViewergoTo in class AbstractHelpContentViewer<javax.swing.JComponent,java.awt.Window>element - the elementpublic void setCurrentArticle(Article article)
ContentViewersetCurrentArticle in interface ContentViewerarticle - the current articlepublic void setCurrentTitle(java.lang.String title)
ContentViewersetCurrentTitle in interface ContentViewertitle - the titlepublic void setPreviousPage(java.net.URL url,
java.lang.String anchor)
ContentViewersetPreviousPage in interface ContentViewerurl - the previous page URLanchor - the previous page anchoe( may be null)public void reloadPage()
reloadPage in interface HelpContentViewer<javax.swing.JComponent,java.awt.Window>public void pageLoaded(java.net.URL url)
pageLoaded in interface ContentViewerurl - the page URLpublic NavigationHistory getHistory()
getHistory in interface HelpContentViewer<javax.swing.JComponent,java.awt.Window>public AutoComplete getAutoComplete()
getAutoComplete in interface HelpContentViewer<javax.swing.JComponent,java.awt.Window>public javax.swing.JComponent getHelpComponent()
getHelpComponent in interface HelpContentViewer<javax.swing.JComponent,java.awt.Window>public javax.swing.JDialog getHelpWindow(java.awt.Window owner,
java.lang.String title,
int width,
int height)
getHelpWindow in interface HelpContentViewer<javax.swing.JComponent,java.awt.Window>owner - the owner windowtitle - the dialog window titlewidth - the dialog widthheight - the dialog heightpublic boolean registerContextHelp(java.lang.String helpID,
javax.swing.JComponent component)
registerContextHelp in interface HelpContentViewer<javax.swing.JComponent,java.awt.Window>helpID - the helpRef idcomponent - the componentpublic void registerContextHelpWindow(java.awt.Window window)
registerContextHelpWindow in interface HelpContentViewer<javax.swing.JComponent,java.awt.Window>window - the Windowpublic javax.swing.JButton createContextHelpButton()
createContextHelpButton in interface HelpContentViewer<javax.swing.JComponent,java.awt.Window>public void showHelpDialog(javax.swing.JComponent relativeTo)
showHelpDialog in interface HelpContentViewer<javax.swing.JComponent,java.awt.Window>relativeTo - the component from which the help Window must be relative to (can be null)public void showHelpDialog(int x,
int y)
showHelpDialog in interface HelpContentViewer<javax.swing.JComponent,java.awt.Window>x - the x position on screeny - the y position on screenCopyright © 2016-2024 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence