skip to main content
Charts > Programmer's documentation > The generic printing framework > The printing framework > Printing user interface components
 
Printing user interface components
The print package provides user interface components for previewing a document and for setting document properties such as the page format, the headers, or the footers.
Print Preview components
When you want to preview a document to print, the following classes are involved.
*IlvPrintPreviewPanel - A Swing panel that displays the document to preview.
*IlvPrintPreviewDialog - A Swing dialog that contains an IlvPrintPreviewPanel.
Here is an image showing an IlvPrintPreviewDialog containing an IlvPrintPreviewPanel:
Print Preview in Continuous Mode
The Print Preview user interface components can work in two main modes. Print Preview in Continuous Mode shows a Print Preview panel in continuous mode.
In this mode, the preview component displays several pages at once, and you can scroll the pages using the scroll bar. In this mode, you can also change the zoom level using the zoom level combination box.
The second mode is the single page mode. In this mode, you can see only one page at a time, but you can still use the scroll bar to move from page to page.
Print Preview in Single Page Mode
The single page mode also allows you to zoom the page. Using the zoom button (or clicking the view), you can switch from a zoom mode where the page fits the component to the mode where the page is at real size.
In most cases, you do not need to create instances and manage these components by yourself. The high-level class IlvPrintingController allows you to perform most of the printing actions and settings.
Page Setup component
The class IlvDocumentSetupDialog is a dialog box that allows you to edit various parameters of your document such as the page format, the header and the footer.
This dialog box is composed of a JTabbedPane with two tabs: one to edit the page format, and one to edit the header and footer.
Page Setup
This component can be customized for your particular needs. You may add a new tab by using the addTab(java.lang.String, java.awt.Component) method, if you need to edit additional parameters for a specialized class of document.
In most cases, you do not need to create instances and manage the IlvDocumentSetupDialog by yourself. The high-level class IlvPrintingController allows you to perform most of the printing actions and settings.

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