css
propertystyleSheetTheme
property<helpContent> <styleSheets> <styleSheetTheme id="black" url="themeBlack.css"/> </styleSheets> </helpContent>
<helpContent> <styleSheets defaultStyleSheetTheme="myDefaultTheme.css"> <styleSheetTheme id="black" url="themeBlack.css"/> </styleSheets> </helpContent>In this example:
myDefaultTheme.css
is the default theme which replaces the default theme provided by the toolthemeBlack.css
is a theme associated with the black
idblack
id at runtime.// 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 SwingHelpContentViewer viewer = new SwingHelpContentViewer(); factory.install(viewer); JComponent pane = viewer.getHelpComponent(); viewer.setStyleSheetTheme("black"); } catch (IOException | SAXException ex) { ex.printStackTrace(); }
docJGenerator Copyright (c) 2016-2023 Herve Girod. All rights reserved.