skip to main content
Defense > Programmer's documentation > Programming with JViews Maps > Creating a map application using the API > Printing
 
Printing
Rogue Wave® JViews Maps provides specialized printing classes derived from the JViews Framework printing classes. These classes are use to print a map with or without a legend. The printing of the legend can be configured in the map configuration tab of the setup dialog.
To print a map:
 
// construct a new IlvMapPrintingController for the given view.
IlvMapPrintingController controller = new IlvMapPrintingController(view);
// configure the document
IlvPrintableDocument document = controller.getDocument();
document.setName(<Name of the Document>);
document.setAuthor(controller.getPrinterJob().getUserName());
document.setPageFormat(controller.getPrinterJob().defaultPage());
At this point, you can choose one of the following options:
*Access the print preview screen
 
// print preview
controller.printPreview(frame);
*Access the setup dialog
 
// print setup
controller.setupDialog(frame, true, true);
*Access the printing window
 
// print
controller.print(true);
For more information, see the section on The Generic Printing Framework in The Advanced JViews Framework.

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