Package java.awt.print

Examples of java.awt.print.PrinterJob.printDialog()


    /** Prints the document */
    public void startPrinterJob(boolean showDialog) {
        PrinterJob pj = PrinterJob.getPrinterJob();
        pj.setPageable(renderer);
        if (!showDialog || pj.printDialog()) {
            try {
                pj.print();
            } catch (PrinterException e) {
                e.printStackTrace();
            }
View Full Code Here


    book.append(this, pageFormat, lastPageIndex - firstPageIndex + 1);
    printJob.setPageable(book);
    try
    {
                    if (service == null) {
                        if (printJob.printDialog()) {
                            printJob.print();
                        }
                    } else {
                        printJob.setPrintService(service);
                        printJob.print();
View Full Code Here

        // If required, pop up a dialog to select the printer
        //
        Boolean showPrinterDialog;
        showPrinterDialog = (Boolean)hints.get(KEY_SHOW_PRINTER_DIALOG);
        if(showPrinterDialog != null && showPrinterDialog.booleanValue()){
            if(!printerJob.printDialog()){
                // Dialog was cancelled, meaning that the print process
                // should be stopped.
                return;
            }
        }
View Full Code Here

    } // c'tor

    public void actionPerformed(ActionEvent ae) {
        PrinterJob printJob = PrinterJob.getPrinterJob();
        printJob.setPrintable(m_GraphPanel);
        if (printJob.printDialog())
          try {
          m_bIsPrinting = true;
            printJob.print();
        m_bIsPrinting = false;
          } catch(PrinterException pe) {
View Full Code Here

        PrinterJob job = PrinterJob.getPrinterJob();
        job.setPrintable(this);

        boolean blnOk = true;

        if (job.printDialog())
        {
           try
           {
               job.print();
               setCursor(Cursor.getDefaultCursor());
View Full Code Here

      setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
      PrinterJob job = PrinterJob.getPrinterJob();
      job.setPrintable(this);
      boolean blnOk = true;

      if (job.printDialog())
      {
         try
         {
            job.print();
            setCursor(Cursor.getDefaultCursor());
View Full Code Here

        PrinterJob job = PrinterJob.getPrinterJob();
        job.setPrintable(this);

        boolean blnOk = true;

        if (job.printDialog())
        {
           try
           {
               job.print();
               setCursor(Cursor.getDefaultCursor());
View Full Code Here

                    if (document != null)
                    {
                        PDPageable pageable = new PDPageable(document);
                        PrinterJob job = pageable.getPrinterJob();
                        job.setPageable(pageable);
                        if (job.printDialog())
                        {
                            job.print();
                        }
                    }
                }
View Full Code Here

 
    //** Inicializa la impresi�n
    public void printThis() {
        PrinterJob printJob = PrinterJob.getPrinterJob();
        printJob.setPrintable(this,printerPageFormat);
        if (printJob.printDialog()) {
            try {
                printJob.print();
            } catch (Exception ex) {
                throw new MaudeWorkstationException("Error: "+ex.getMessage()); //$NON-NLS-1$
            }
View Full Code Here

                parmsPanel.getRotateToFit(),
                parmsPanel.getPrinterView());

        PrinterJob job = PrinterJob.getPrinterJob();
        job.setPrintable(print, format);
        if (job.printDialog() == false) {
            return;
        }

        try {
            job.print();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.