Examples of printDialog()


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

      {
        mxGraphComponent graphComponent = (mxGraphComponent) e
            .getSource();
        PrinterJob pj = PrinterJob.getPrinterJob();

        if (pj.printDialog())
        {
          PageFormat pf = graphComponent.getPageFormat();
          Paper paper = new Paper();
          double margin = 36;
          paper.setImageableArea(margin, margin, paper.getWidth()
View Full Code Here

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

    JButton printerSetupBtn = new JButton(SettingsDialog.mLocalizer.ellipsisMsg("printer","Printer"),PrintPlugin.getInstance().createImageIcon("devices", "printer", 16));
    printerSetupBtn.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        new Thread("Printer setup") {
          public void run() {
            printerJob.printDialog();
          }
        }.start();
      }
    });
   
View Full Code Here

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

              pg.drawString(aEEG.loadKDatei(), 50, 50);
              return Printable.PAGE_EXISTS;
            }
          });

          if (pjob.printDialog() == false)
            return;
          pjob.print();
        } catch (PrinterException pe) {
          pe.printStackTrace();
        }
View Full Code Here

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

                // Create our PageableText object, and tell the PrinterJob about it
                job.setPageable(new PageableText(new File(args[0]), format));

                // Ask the user to select a printer, etc., and if not canceled, print!
                if (job.printDialog()) {
                        job.print();
                }
        }
}
View Full Code Here

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

    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

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

                // Create our PageableText object, and tell the PrinterJob about it
                job.setPageable(new PageableText(new File(args[0]), format));

                // Ask the user to select a printer, etc., and if not canceled, print!
                if (job.printDialog()) {
                        job.print();
                }
        }
}
View Full Code Here

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

        if (getAktuelleBasis() != null)
        {
            PrinterJob printJob = PrinterJob.getPrinterJob();
            printJob.setPrintable(getVMObject());
            if (printJob.printDialog())
            {
                try
                {
                    printJob.print();
                } catch (PrinterException pe)
View Full Code Here

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

        if (getAktuelleBasis() != null)
        {
            PrinterJob printJob = PrinterJob.getPrinterJob();
            printJob.setPrintable(getVMObject());
            if (printJob.printDialog())
            {
                try
                {
                    printJob.print();
                } catch (PrinterException pe)
View Full Code Here

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

        } else {
            // Can't print it.
            return;
        }

        if (job.printDialog(aset)) {
            try {
                job.print(aset);
            } catch (Exception ex) {
                MessageHandler.error("Printing Failed", ex);
            }
View Full Code Here

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

        // Build a set of attributes
        PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
        PrinterJob job = PrinterJob.getPrinterJob();
        job.setPrintable(plot);

        if (job.printDialog(aset)) {
            try {
                job.print(aset);
            } catch (Exception ex) {
                JOptionPane.showMessageDialog(this, "Printing failed:\n"
                        + ex.toString(), "Print Error",
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.