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, searchIcon
HELP_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, setArticleIcon, setClosedChapterIcon, setDividerLocation, setExpandedChapterIcon, setFullSearchText, setIcon, setLocale, setSearchTextHint, setSearchTextIcon
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCurrentArticle, getCurrentTitle, getLocale, getLocalization, getStyleSheetThemes, hasStyleSheetTheme, resetStyleSheetTheme, setArticleIcon, setClosedChapterIcon, setDividerLocation, setExpandedChapterIcon, setFullSearchText, setIcon, setLocale, setLocale, setSearchTextHint, setSearchTextIcon, setStyleSheetTheme
public javax.swing.JPanel getRootPane()
getRootPane
in interface ContentViewer
public javax.swing.JComponent getScrollPane()
getScrollPane
in interface ContentViewer
public 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.IOException
public void updateUI()
updateUI
in interface ContentViewer
public 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()
AbstractHelpContentViewer
back
in class AbstractHelpContentViewer<javax.swing.JComponent,java.awt.Window>
public HistoryElement forward()
AbstractHelpContentViewer
forward
in class AbstractHelpContentViewer<javax.swing.JComponent,java.awt.Window>
public void selectInTree(Article article)
ContentViewer
selectInTree
in interface ContentViewer
article
- 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 ContentViewer
article
- the article (may be null)url
- the URLanchor
- the anchoe (may be null)public void goTo(HistoryElement element)
AbstractHelpContentViewer
goTo
in class AbstractHelpContentViewer<javax.swing.JComponent,java.awt.Window>
element
- the elementpublic void setCurrentArticle(Article article)
ContentViewer
setCurrentArticle
in interface ContentViewer
article
- the current articlepublic void setCurrentTitle(java.lang.String title)
ContentViewer
setCurrentTitle
in interface ContentViewer
title
- the titlepublic void setPreviousPage(java.net.URL url, java.lang.String anchor)
ContentViewer
setPreviousPage
in interface ContentViewer
url
- 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 ContentViewer
url
- 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