Side of Software
Print Preview Library 1.8.1

Package sos.preview

Provides classes and interfaces for previewing pages before they are printed.

See:
          Description

Interface Summary
PageNumberRenderer An interface that returns a component that can render the page numbers within a JPrintPreviewPane.
PrintPreviewSupport.PageableFactory A factory that can produce a Pageable object given a page format.
Scaleable An object that has preferences as to how it should be scaled.
ScalingLayoutManager A layout manager that scales a container's components equally.
ScrollableLayoutManager A layout manager that also dictates how the container should scroll.
ZoomFunction An interface that determines the amount to zoom.
 

Class Summary
AccessiblePrintPreviewRole An extension of javax.accessibility.AccessibleRole that defines roles for print preview panes and pages.
BasicPrintPreviewPageUI A basic implementation of the print preview page look and feel.
BasicPrintPreviewPaneUI A basic implementation of the print preview pane look and feel.
CachingPageable A java.awt.print.Pageable wrapper that caches page images rendered at 100%.
ComponentPageable A Pageable object that breaks an arbitrary Swing component into pages for previewing and printing.
DefaultPageNumberRenderer A page number renderer that centers page numbers with a JLabel initialized with the font and colors of the JPrintPreviewPane.
DefaultZoomFunction A default implementation of ZoomFunction that has a constant zoom "jump," a minimum zoom, and a maximum zoom.
FitAllLayout A layout scheme that scales all components such that they fit in the bounds of their container's parent.
FitAllLayoutFormat A class that formats and parses instances of FitAllLayout.
FitLayout A layout scheme that scales all components such that one dimension of the largest component fits in container's parent.
FitLayoutFormat A class that formats and parses instances of FitLayout.
JPrintPreviewPage A component that represents a page in a print preview pane.
JPrintPreviewPane A component that displays printable pages.
MatrixLayout A layout scheme that arranges components into rows and columns that fit the bounds of the container's parent.
MatrixLayoutFormat A class that formats and parses instances of MatrixLayout.
PageableAdapter A class that converts a java.awt.print.Printable object into a java.awt.print.Pageable object.
PrintPreviewPageUI The JPrintPreviewPage pluggable look and feel delegate.
PrintPreviewPaneUI The JPrintPreviewPane pluggable look and feel delegate.
PrintPreviewSupport Support for a print preview pane in an application.
ZoomLayout A layout scheme that scales components a fixed amount.
ZoomLayoutFormat A class that formats and parses instances of ZoomLayout.
 

Package sos.preview Description

Provides classes and interfaces for previewing pages before they are printed. This package primarily includes two Swing components (JPrintPreviewPane and JPrintPreviewPage), four layout managers (FitAllLayout, FitLayout, MatrixLayout, and ZoomLayout), and a helper class (PrintPreviewSupport).

Developers wishing to add print preview to their applications need to do three things:

  1. Provide an implementation of java.awt.print.Pageable that can divide the application-specific document into pages and can render the contents of each page

  2. Create the Swing component by using, for example, one of the following factory methods in PrintPreviewSupport:

    JPanel createNavigationPanel( ... )
    JPanel createZoomPanel( ... )

  3. Add the new component to the application’s window.

The library allows extensive customization of the print preview component and helper class. For more information, see the Print Preview Tutorial.


Side of Software
Print Preview Library 1.8.1

Copyright 2003-07 Side of Software (SOS). All rights reserved.