| Developing with the SDK > Introducing the SDK > The Diagram Component > The Project |
The Project |
INDEX
PREVIOUS
NEXT
|
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. Code Sample 1.5 shows how to load a project into a diagram component using the method setProject.
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 ILOG JViews Diagrammer package ilog.views.diagrammer.project. When a new project is created, the style sheet and data source are both null.
Code Sample 1.6 shows how to create a new project file, set the style sheet and data source, and save the file.
| Copyright © 1987-2007 ILOG S.A. All rights reserved. Documentation homepage. Legal terms. | PREVIOUS NEXT |