Examples of printDialog()


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

        PrinterJob pjob = PrinterJob.getPrinterJob();
        PageFormat pf = pjob.defaultPage();
        pjob.setPrintable(this, pf);

        try {
            if (pjob.printDialog()) {
                pjob.print();
            }
        } catch (PrinterException e) {
            e.printStackTrace();
        }
View Full Code Here

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

                                if (pf != m_pageFormat)
                                {
                                    m_pageFormat = pf;
                                    printerJob.setPrintable(m_imgView, m_pageFormat);
                                    printerJob.setJobName(Main.getString("caption"));
                                    if (printerJob.printDialog())
                                    {
                                        Thread thread = new Thread ()
                                        {
                                            @Override
                                            public void run()
View Full Code Here

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

        {
            throw new PrinterException( "You do not have permission to print this document." );   
        }
        PrinterJob printJob = PrinterJob.getPrinterJob();
        printJob.setPageable(this);
        if( printJob.printDialog() )
        {
            printJob.print();
        }
    }
   
View Full Code Here

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

        printButton.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                PrinterJob job = PrinterJob.getPrinterJob();
                job.setPrintable(ResultPanel.this);
                if (job.printDialog()) {
                    try {
                        job.print();
                    } catch (PrinterException pe) {
                        Debug.error(pe);
                    }
View Full Code Here

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

        }

        public void print() throws PrinterException {
            PrinterJob printJob = PrinterJob.getPrinterJob();
            printJob.setPrintable(this);
            if (printJob.printDialog()) {
                printJob.print();
            }
        }

        public int print(Graphics g, PageFormat pf, int pageIndex) {
View Full Code Here

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

        //
        // If required, pop up a dialog to select the printer
        //
        Boolean 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

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

        //
        // If required, pop up a dialog to select the printer
        //
        Boolean 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

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

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

        //
        // If required, pop up a dialog to select the printer
        //
        Boolean 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

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

        //
        // If required, pop up a dialog to select the printer
        //
        Boolean 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
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.