com.partnersoft.printing
Class PrintLib

java.lang.Object
  extended by com.partnersoft.printing.PrintLib

public class PrintLib
extends java.lang.Object

Printing convenience routine library.

Author:
Paul Reavis Copyright 2005 Partner Software, Inc.

Constructor Summary
PrintLib()
           
 
Method Summary
static java.awt.print.PageFormat getPageFormat(java.awt.print.PrinterJob printerJob, javax.print.attribute.PrintRequestAttributeSet attributeSet)
          This will be replaced in Java 6 by a similar routine in PrinterJob.
static javax.print.attribute.PrintRequestAttributeSet getPrintRequestAttributeSet(java.lang.String name)
          Returns the named page attributes as defined in preferences.
static javax.print.PrintService getPrintService(java.lang.String name)
          Returns the named print service as defined in preferences, or the default one if there is none defined.
static javax.print.PrintService printServiceNamed(java.lang.String name)
          Returns the named print service, or null if there is none by that name.
static void setPrintRequestAttributeSet(java.lang.String name, javax.print.attribute.PrintRequestAttributeSet newDefault)
          Saves the given named print attributes as the default in preferences.
static void setPrintService(java.lang.String name, javax.print.PrintService service)
          Sets the given print service as the default in preferences.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrintLib

public PrintLib()
Method Detail

setPrintRequestAttributeSet

public static void setPrintRequestAttributeSet(java.lang.String name,
                                               javax.print.attribute.PrintRequestAttributeSet newDefault)
Saves the given named print attributes as the default in preferences.


getPrintRequestAttributeSet

public static javax.print.attribute.PrintRequestAttributeSet getPrintRequestAttributeSet(java.lang.String name)
Returns the named page attributes as defined in preferences.


setPrintService

public static void setPrintService(java.lang.String name,
                                   javax.print.PrintService service)
Sets the given print service as the default in preferences.


getPrintService

public static javax.print.PrintService getPrintService(java.lang.String name)
Returns the named print service as defined in preferences, or the default one if there is none defined.


printServiceNamed

public static javax.print.PrintService printServiceNamed(java.lang.String name)
Returns the named print service, or null if there is none by that name.


getPageFormat

public static java.awt.print.PageFormat getPageFormat(java.awt.print.PrinterJob printerJob,
                                                      javax.print.attribute.PrintRequestAttributeSet attributeSet)
This will be replaced in Java 6 by a similar routine in PrinterJob.