Showing an SDM diagram using an XML file and a style sheet
This sample is a small application that starts an IlvSDMEngine shown on a frame, rendering the contents of an .xml file with the style stated in a .css file. The details of the data used by the application are as follows:
The diagram consists of two nodes with a link between them, defined in the file simple.xml
The style adds a link layout and color and is defined in the file simple.css
A select interactor is active, enabling nodes to be dragged.
To run the sample, put the files Main.java, simple.xml, and simple.css in the same folder. Then, compile and run the Main class with java Main.
public class Main
public static void main(String args) throws IOException, IlvSDMException
Note: In order to run this sample with JViews 8.7 and later, you must call the ilog.views.util.IlvProductUtil.DeploymentLicenseRequired method with the appropriate argument. See the General information > Deployment licenses > Declaring the use of IBM ILOG JViews services section in the documentation for more information.