< prev index next >

src/java.desktop/windows/classes/sun/awt/windows/WPrinterJob.java

Print this page




 574             attributes = new HashPrintRequestAttributeSet();
 575         }
 576 
 577         if (!(getPrintService() instanceof Win32PrintService)) {
 578             return super.printDialog(attributes);
 579         }
 580 
 581         if (noDefaultPrinter == true) {
 582             return false;
 583         } else {
 584             return displayNativeDialog();
 585         }
 586     }
 587 
 588      /**
 589      * Associate this PrinterJob with a new PrintService.
 590      *
 591      * Throws <code>PrinterException</code> if the specified service
 592      * cannot support the <code>Pageable</code> and
 593      * </code>Printable</code> interfaces necessary to support 2D printing.
 594      * @param a print service which supports 2D printing.
 595      *
 596      * @throws PrinterException if the specified service does not support
 597      * 2D printing.
 598      */
 599     @Override
 600     public void setPrintService(PrintService service)
 601         throws PrinterException {
 602         super.setPrintService(service);
 603         if (!(service instanceof Win32PrintService)) {
 604             return;
 605         }
 606         driverDoesMultipleCopies = false;
 607         driverDoesCollation = false;
 608         setNativePrintServiceIfNeeded(service.getName());
 609     }
 610 
 611     /* associates this job with the specified native service */
 612     private native void setNativePrintService(String name)
 613         throws PrinterException;
 614 




 574             attributes = new HashPrintRequestAttributeSet();
 575         }
 576 
 577         if (!(getPrintService() instanceof Win32PrintService)) {
 578             return super.printDialog(attributes);
 579         }
 580 
 581         if (noDefaultPrinter == true) {
 582             return false;
 583         } else {
 584             return displayNativeDialog();
 585         }
 586     }
 587 
 588      /**
 589      * Associate this PrinterJob with a new PrintService.
 590      *
 591      * Throws <code>PrinterException</code> if the specified service
 592      * cannot support the <code>Pageable</code> and
 593      * </code>Printable</code> interfaces necessary to support 2D printing.
 594      * @param service print service which supports 2D printing.
 595      *
 596      * @throws PrinterException if the specified service does not support
 597      * 2D printing.
 598      */
 599     @Override
 600     public void setPrintService(PrintService service)
 601         throws PrinterException {
 602         super.setPrintService(service);
 603         if (!(service instanceof Win32PrintService)) {
 604             return;
 605         }
 606         driverDoesMultipleCopies = false;
 607         driverDoesCollation = false;
 608         setNativePrintServiceIfNeeded(service.getName());
 609     }
 610 
 611     /* associates this job with the specified native service */
 612     private native void setNativePrintService(String name)
 613         throws PrinterException;
 614 


< prev index next >