docGeneSwingHelp.jar
jar file docGeneJFXHelp.jar
jar file JavaHelpFactory factory = new JavaHelpFactory(url); factory.create();
SwingHelpContentViewer
(or JFXHelpContentViewer
for JavaFX) and install the model on this viewer. For example for Swing:
SwingHelpContentViewer viewer = new SwingHelpContentViewer(); factory.installModel(viewer);
JComponent pane = viewer.getComponent();
JDialog dialog = viewer.getHelpWindow(myParentFrame, <Help Content Title>, width, height);
JavaHelpFactory factory = new JavaHelpFactory(url); factory.create(); SwingHelpContentViewer viewer = new SwingHelpContentViewer(); factory.installModel(viewer); factory = new JavaHelpFactory(url); factory.create(); factory.installModel(viewer);Note that the viewer associated component will remain the same.
// 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>);
// get the zip file as an URL URL url = ... try { // create the Help factory JavaHelpFactory factory = new JavaHelpFactory(url); factory.create(); ArticlesModel model = factory.getModel(); // create the viewer component SwingHelpContentViewer viewer = new SwingHelpContentViewer(); viewer.installModel(model); JComponent pane = viewer.getComponent(); // do whatever you want with the component } catch (IOException | SAXException ex) { ex.printStackTrace(); }
docJGenerator Copyright (c) 2016-2023 Herve Girod. All rights reserved.