CONTENTS | PREV | NEXT Java 2D API



CHAPTER 7

Printing

The Java 2D printing API enables applications to print all Java 2D Graphics, including composited graphics, and supports:

The Java 2D printing API introduces a new printing model that differs from the earlier printing model in that the printing system drives the printing process, not the application. This new, passive printing model is similar to the component painting APIs.

Because the printing system drives the printing process, pages can be printed in any order. This printing model also works well with little or no disk space. Instead of spooling the entire document to the printer, the application maintains a model of the document in memory and is asked to print pages as needed.

The Java 2D printing API also provides hooks that enable the future addition of powerful printing features.




Banded Raster Printing

To support the printing of composited graphics, the printing system rasterizes the portion of the document to be printed and then sends the resulting composited bitmap image to the printer. To minimize the amount of memory needed for this operation, the printing system supports banded raster printing.


7.0.1 Interfaces


Interface

Description

Printable

Defines one method, print, that an application implements to enable printing. This method is called by a Book to request that a page be printed.


7.0.2 Classes


Class

Description

Book

Maintains a list of pages to be printed.

PageFormat

Describes the size and orientation of a page to be printed.

Paper

Describes the physical characteristics of a piece of paper.

PrintJob

Manages the printing of a Book.



CONTENTS | PREV | NEXT
Copyright © 1997-1998 Sun Microsystems, Inc. All Rights Reserved.