Bean Extender Guide to Features


Print Dip

The Print Dip provides basic printing functions to AWT Java beans. The Print Dip can be used in one of the following modes:
Invisible When this mode is used, there is no default user interface. An application assembler can wire an event, such as a menu item selection, to the printing code of the dip.
Visible When this mode is used, this dip provides a small, floating dialog that contains a Print button.

The dip uses the PrintingSupport utility class from the com.ibm.beans.widgets package. This class implements the Java AWT printing recipes, to perform the printing. For further information about specific implementation details, see the Bean Extender API Reference for the com.ibm.beans.samples.dips.print package. For further information on general dip-related issues, see the "The Dipping Framework".
Note:The graphics included in this section are what appears on a Microsoft Windows NT 4.0 system.

Programming with Print Dip

The Print Dip can be applied only to beans that have the java.awt.Component class as an ancestor. It rejects its application to all other beans. If it is successfully applied, it creates a DipMethodCallListener instance that allows the dip to be notified when the addNotify() and removeNotify() methods of the dippable bean are called. When the addNotify() method notification is received, the createPrintButtonFrame() method is called to display the floating dialog. When the removeNotify() method notification is received, the destroyPrintButtonFrame() method is called to remove the floating dialog.

An application assembler may be interested in wiring events to the following methods:

The following list of public properties have a corresponding get and set accessor method, unless otherwise stated.

Using the Floating Dialog

If the showPrintButtonFrame property is set to true, then the floating dialog is presented by the Print Dip when the dippable bean is deserialized. When you click on the button within the floating dialog, the printDippableBean() method of the Print Dip is invoked. The following is an example of the floating print dialog.
* Figure pntdip1 not displayed.

Using the Print Dialog

When the printDippableBean() method of the Print Dip is invoked, the standard print dialog for the given operating system is presented. You can use this dialog to specify the target print queue, number of copies, and gain access to further printer-specific settings. To access additional printer settings, select a print queue and click on the Properties button.

The print dialog contains the controls used to submit the print job or to cancel the print job. The following is an example of the print dialog:
* Figure pntdip2 not displayed.

Accessing Printer Settings

You can get to printer-specific settings by clicking on the Properties button. This displays a printer-driver dialog. Use this dialog to specify features such as:

Some platforms might not offer this capability. The following is an example of a document properties dialog from the PostScript driver:
* Figure pntdip3 not displayed.

Using the Customizer

You can view and modify the properties of the Print Dip by using its customizer. The following graphic is an example of the customizer for the Print Dip:


* Figure pntdip4 not displayed.


[ Top of Page | Previous Page | Next Page | Table of Contents | Documentation Homepage ]