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-online.gif](../../JViews_Framework/usradvfwork/_media/print-preview-online_default.gif)
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
:
![preview1.gif](../../JViews_Framework/usradvfwork/_media/preview1_default.gif)
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.
![preview2.gif](../../JViews_Framework/usradvfwork/_media/preview2_default.gif)
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.
![setup1.gif](../../JViews_Framework/usradvfwork/_media/setup1_default.gif)
![setup2.gif](../../JViews_Framework/usradvfwork/_media/setup2_default.gif)
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.