All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.beans.widgets.PrintingSupport

java.lang.Object
   |
   +----com.ibm.beans.widgets.PrintingSupport

public class PrintingSupport
extends Object

This utility class provides an abstraction for supporting printing. It keeps all of the printing code in one place and makes code maintenance easier. For additional information regarding printing in Java, see the "AWT Printing" document in the JDK 1.1.x documentation (docs/guide/awt/designspec/printing.html).


Constructor Index

 o PrintingSupport()

Method Index

 o printComponent(Component, Frame, String, Properties)
Invokes the AWT Printing support on the specified AWT Component.

Constructors

 o PrintingSupport
 public PrintingSupport()

Methods

 o printComponent
 public static void printComponent(Component componentToBePrinted,
                                   Frame parentFrame,
                                   String jobTitle,
                                   Properties jobProperties)
Invokes the AWT Printing support on the specified AWT Component. This printing support causes the platform standard Print dialog to be displayed. It uses the choices made in that dialog, such as the target print queue, number of copies, and so forth, to create an appropriate PrintJob and causes the AWT Component and all of its contained Components to be rendered onto the PrintGraphics associated with that PrintJob.

Parameters:
componentToBePrinted - The AWT component to be printed. This is the root of the tree of components being printed.

parentFrame - The parent of the Print Dialog frame. If null is passed, then a temporary, invisible frame is created and used.

jobTitle - The title of the print job to be created. If null is passed, then the title text of the frame specified in the parentFrame parameter is used. Note that on the WIN32 implementation of JDK 1.1.x, the jobTitle parameter of the Toolkit.getPrintJob method is ignored. The print job is always titled "AWT Print".

jobProperties - The properties to use when creating the print job. Whatever choices the user makes from the dialog(s) presented are stored in this parameter and the caller of this API can optionally choose to save this for later invocations of this API. If null is passed, then system defaults are used in intializing the print dialog.

All Packages  Class Hierarchy  This Package  Previous  Next  Index