Examples of pageDialog()


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

        //
        // If required, pop up a dialog to adjust the page format
        //
        Boolean showPageFormat = (Boolean)hints.get(KEY_SHOW_PAGE_DIALOG);
        if(showPageFormat != null && showPageFormat.booleanValue()){
            PageFormat tmpPageFormat = printerJob.pageDialog(pageFormat);
            if(tmpPageFormat == pageFormat){
                // Dialog was cancelled, meaning that the print process should
                // be stopped.
                return;
            }
View Full Code Here

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

    else
    {

      final PrinterJob pj = PrinterJob.getPrinterJob();
      final PageFormat original = report.getPageDefinition().getPageFormat(0);
      final PageFormat pf = pj.validatePage(pj.pageDialog(original));
      if (PageFormatFactory.isEqual(pf, original))
      {
        return false;
      }
View Full Code Here

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

   public void createChartPrintJob()
   {

      PrinterJob job = PrinterJob.getPrinterJob();
      PageFormat pf = job.defaultPage();
      PageFormat pf2 = job.pageDialog(pf);
      if (pf2 != pf)
      {
         job.setPrintable(this, pf2);
         if (job.printDialog())
         {
View Full Code Here

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

        //
        // If required, pop up a dialog to adjust the page format
        //
        Boolean showPageFormat = (Boolean)hints.get(KEY_SHOW_PAGE_DIALOG);
        if(showPageFormat != null && showPageFormat.booleanValue()){
            PageFormat tmpPageFormat = printerJob.pageDialog(pageFormat);
            if(tmpPageFormat == pageFormat){
                // Dialog was cancelled, meaning that the print process should
                // be stopped.
                return;
            }
View Full Code Here

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

      if (e.getSource() instanceof mxGraphComponent)
      {
        mxGraphComponent graphComponent = (mxGraphComponent) e
            .getSource();
        PrinterJob pj = PrinterJob.getPrinterJob();
        PageFormat format = pj.pageDialog(graphComponent
            .getPageFormat());

        if (format != null)
        {
          graphComponent.setPageFormat(format);
View Full Code Here

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

        new Thread("Document setup (printing)"){
          public void run(){
            if (mPageFormat == null) {
              mPageFormat = printerJob.defaultPage();
            }
            mPageFormat = printerJob.pageDialog(mPageFormat);
          }
        }.start();
      }
    });
   
View Full Code Here

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

        // Set the default options.  CraigM: 31/03/2008.
        pf.setOrientation(PrintUtilities.getDefaultPrintOptions().getOrientation());
        pf.setPaper(PrintUtilities.getDefaultPrintOptions().getPaper());

        // Show page format dialog with page format settings.
        pf = pjob.pageDialog(pf);
       
        // Update the default options.  CraigM: 31/03/2008.
        PrintUtilities.getDefaultPrintOptions().setOrientation(pf.getOrientation());
        PrintUtilities.getDefaultPrintOptions().setPaper(pf.getPaper());
    }
View Full Code Here

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

        public static void main(String[] args) throws IOException, PrinterException {
                // Get the PrinterJob object that coordinates everything
                PrinterJob job = PrinterJob.getPrinterJob();

                // Get the default page format, then ask the user to customize it
                PageFormat format = job.pageDialog(job.defaultPage());

                // 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!
View Full Code Here

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

        // Set the default options.  CraigM: 31/03/2008.
        pf.setOrientation(PrintUtilities.getDefaultPrintOptions().getOrientation());
        pf.setPaper(PrintUtilities.getDefaultPrintOptions().getPaper());

        // Show page format dialog with page format settings.
        pf = pjob.pageDialog(pf);
       
        // Update the default options.  CraigM: 31/03/2008.
        PrintUtilities.getDefaultPrintOptions().setOrientation(pf.getOrientation());
        PrintUtilities.getDefaultPrintOptions().setPaper(pf.getPaper());
    }
View Full Code Here

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

                                String  message = "";

                                try {
                                        PrinterJob printer = PrinterJob.getPrinterJob();
                                        PageFormat pageFormat = new PageFormat();
                                        printer.pageDialog(pageFormat);
                                        PageableText pageableText;
                                        try {
                                                pageableText = new PageableText(new File(reportFilename), pageFormat);
                                                printer.setPageable(pageableText);
                                                printer.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.