The project

The project is an association of a style sheet and a data source which supplies data. It groups the inputs for a diagram. A project is saved as an XML file with the extension .idpr (Diagrammer Project File).
Loading a project file is the recommended way to load a diagram in Java™ because it is the quickest way. The following code example shows how to load a project into a diagram component using the method setProject.
Loading a project file into a diagram component
IlvDiagrammer diagrammer = new IlvDiagrammer();
diagrammer.setProject(new IlvDiagrammerProject(
  new URL("file:myproject.idpr")), true);
//display the diagram
The project is represented by the IlvDiagrammerProject class, which is in the Rogue Wave® JViews Diagrammer package ilog.views.diagrammer.project. When a new project is created, the style sheet and data source are both null.
The following code example shows how to create a new project file, set the style sheet and data source, and save the file.
Creating a project file
IlvDiagrammerProject project = new IlvDiagrammerProject();
project.setStyleSheet(new URL("file:example.css"));
IlvXMLDataSource dataSource = new IlvXMLDataSource();
DataSource.setDataURL(new URL("file:example.xml"));
project.setDataSource(dataSource);
project.write(new URL("file:example.idpr"));