skip to main content
Defense > Developing with design tools > Using the Designer > Next steps after the Designer > Specifying a different data source
 
Specifying a different data source
Once the project is loaded into the application, you can specify a data source other than the one contained by default in the project. This is an important feature, since the Designer is used with sample data that contains only enough information to specify the drawing style.
The following code example shows how to include a different data source.
Specifying a different data source
//Retrieve the project
IlvDiagrammer project = diagrammer.getProject();
 
//Create a new data source based on XML format
IlvXMLDataSource dataSource = new IlvXMLDataSource();
dataSource.setDataURL(new URL("file:example.xml"));
 
//Associate new data source with current project
project.setDataSource(datasource);
 
//Update the diagrammer object with the newly created
//project
diagrammer.setProject(project);

Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.