Using a custom data model in the Designer
You can make use of a custom data model in the Designer but certain limitations apply.
The way to prepare a custom data model for use in the Designer is to export it to XML
Exporting your data model
The data model needs to be available in XML format, preferably diagram format, for the Designer to load it. You can either write the XML file manually or generate it from the Java™ classes in Java code.
If you have XML data that is not in diagram format, see
Handling XML data files in Java.
Loading the XML file
You can create a project file for an exported XML file and its associated style sheet in Java code (see
The Phenol Molecule data source). You can load the project file in Java code as well, see
Loading the Molecule into the diagram component. Once you have a project file, you can also open it in the Designer to style the nodes and links interactively in Style Editing Mode. If the custom data model is read-only, you will not be able to edit the model in Diagram Editing Mode.
Writing your application
Your application will be based on the style sheet and on your Java classes. If you saved the style sheet in the Designer, then it applies styles to the node and link classes used for graphic representation by the Designer instead of to your Java classes. Therefore, your application will need to adapt the style sheet to your Java classes.
Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.