docGeneJFXHelp.jar
jar file (distributed in the help directory in the binary release). Note that this library is under the BSD license and don't have any dependencies.
JavaHelpFactory
. For example:
JavaHelpFactory factory = new JavaHelpFactory(url); factory.create();
JFXHelpContentViewer viewer = new JFXHelpContentViewer(); factory.installModel(viewer);
Node pane = viewer.getComponent();
Stage helpStage = viewer.getHelpWindow(myParentStage, <Help Content Title>, width, height);
// get the first zip file as an URL URL url = ... // create the JavaHelpFactory with the first zip file JavaHelpFactory factory = new JavaHelpFactory(url); factory.create(); // get the second zip file as an URL URL url2 = ... // cmerge the content of this zip file with the first one factory.merge(url2);
<helpContent> <styleSheets defaultStyleSheet="myStyleSheet.css" /> </helpContent>
// get the zip file as an URL URL url = ... // create the JavaHelpFactory with the first zip file JavaHelpFactory factory = new JavaHelpFactory(url); // set the index path factory.setIndexPath("myHomePage.html"); // create the factory factory.create();
HelpContentViewer.setIcon(HelpContentViewer.ICON_HOME, URL)
for the home buttonHelpContentViewer.setIcon(HelpContentViewer.ICON_FORWARD, URL)
for the forward buttonHelpContentViewer.setIcon(HelpContentViewer.ICON_BACKWARD, URL)
for the backward buttonHelpContentViewer.setIcon(HelpContentViewer.ICON_GLOSSARY, URL)
for the glossary buttonSwingHelpContentViewer viewer = new SwingHelpContentViewer(); viewer.installModel(model); viewer.setArticleIcon(<icon URL>);
ArticlesModel model = factory.getModel(); viewer.installModel(model);However getting the underlying articles model is not necessary.
org.docgene.help.jfx
. See ModuleFinder.of(Path...) for more information.
--add-opens
options to make the help search in page function available.
// get the zip file as an URL URL url = ... try { // create the Help factory JavaHelpFactory factory = new JavaHelpFactory(url); factory.create(); // create the viewer component JFXHelpContentViewer viewer = new JFXHelpContentViewer(); factory.install(viewer); Node pane = viewer.getComponent(); // do whatever you want with the Node } catch (IOException | SAXException ex) { ex.printStackTrace(); }
docJGenerator Copyright (c) 2016-2023 Herve Girod. All rights reserved.