Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

javax.print
Class ServiceUI  view ServiceUI download ServiceUI.java

java.lang.Object
  extended byjavax.print.ServiceUI

public class ServiceUI
extends java.lang.Object

ServiceUI provides a method to create a graphical print dialog.

The graphical print dialog enables the user to browse the available print services on the system. It provides user interfaces to interact with the most common printing attributes likes specifying the number of copies to print or the page ranges.

The initial appearance of the print dialog as shown to the user may be specified by providing the default selected print service as well as initial values for the printing attributes in the user interface.


Constructor Summary
ServiceUI()
          Default constructor.
 
Method Summary
static PrintService printDialog(java.awt.GraphicsConfiguration gc, int x, int y, PrintService[] services, PrintService defaultService, DocFlavor flavor, javax.print.attribute.PrintRequestAttributeSet attributes)
          Creates a modal graphical printing dialog at the specified location on the screen.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceUI

public ServiceUI()
Default constructor.

Method Detail

printDialog

public static PrintService printDialog(java.awt.GraphicsConfiguration gc,
                                       int x,
                                       int y,
                                       PrintService[] services,
                                       PrintService defaultService,
                                       DocFlavor flavor,
                                       javax.print.attribute.PrintRequestAttributeSet attributes)
                                throws java.awt.HeadlessException
Creates a modal graphical printing dialog at the specified location on the screen.

The dialog will return the user selected print service and the given attributes set will contain the modified printing attributes. If the user cancels the printing dialog null will be returned and the printing attributes set will be unmodified.

The values of the given attributes set (if not empty) will be displayed initially unless the are unsupported by the print service. If a print service does not support a particular value it is substituted with the default value of the print service.