Integrating the style sheets into an application
The Designer makes it much easier to write the style sheet. You can use the Designer for styling a sample of dummy data or an XML dump of your data. Then you can integrate the style sheet from the Designer into your application. You apply the styling defined in the style sheet to the real data used in the application.
To integrate an existing style sheet into an application:
1. Make sure that the project style sheet is accessible from the application.
The .css file must be accessible from the application.
2. In the application, after creating the diagram and loading the data model, use the following code:
try {
diagram.setStyleSheets(new String[]{"..."});
} catch (IlvStylingException x) {
System.err.println("Cannot load style sheets: " + x.getMessage());
}
See
The style sheets in
Developing with the JViews Diagrammer SDK for more information on how to load style sheets.
Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.