Examples of defaultPage()


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

    public void actionPerformed(ActionEvent e) {
        PrinterJob pjob = PrinterJob.getPrinterJob();

        // Get and change default page format settings if necessary.
        PageFormat pf = pjob.defaultPage();
       
        // Set the default options.  CraigM: 31/03/2008.
        pf.setOrientation(PrintUtilities.getDefaultPrintOptions().getOrientation());
        pf.setPaper(PrintUtilities.getDefaultPrintOptions().getPaper());
View Full Code Here

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

            public void actionPerformed(ActionEvent e) {
                View view = app.getCurrentView();

                if ((view != null) && view instanceof Printable) {
                    PrinterJob job = PrinterJob.getPrinterJob();
                    PageFormat format = job.pageDialog(job.defaultPage());
                    job.setPrintable((Printable) view, format);

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

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

                            app.showError("PrintingFailed", ex);
                        }
                    }
                } else if ((view != null) && view instanceof Pageable) {
                    PrinterJob job = PrinterJob.getPrinterJob();
                    job.pageDialog(job.defaultPage());
                    job.setPageable((Pageable) view);

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

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

            // initialize if required           
            if( KPrintJobClass.defaultPrinterJob == null || KPrintJobClass.defaultPageFormat == null ){

                PrinterJob printerJob = PrinterJob.getPrinterJob();
                KPrintJobClass.setPrintingDefaults(
                    printerJob, printerJob.defaultPage()
                );
            };
                       
            KPrintJobClass.defaultPrinterJob.printDialog();
View Full Code Here

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

            // initialize if required
            if( KPrintJobClass.defaultPrinterJob == null || KPrintJobClass.defaultPageFormat == null ){

                PrinterJob printerJob = PrinterJob.getPrinterJob();
                KPrintJobClass.setPrintingDefaults(
                    printerJob, printerJob.defaultPage()
                );
            };
                       
            KPrintJobClass.defaultPageFormat =
                KPrintJobClass.defaultPrinterJob.pageDialog( KPrintJobClass.defaultPageFormat );
View Full Code Here

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

        //
        PrinterJob printerJob =
            PrinterJob.getPrinterJob();

        PageFormat pageFormat =
            printerJob.defaultPage();

        //
        // Set the page parameters from the hints
        //
        Paper paper = pageFormat.getPaper();
View Full Code Here

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

        //
        // Now, request the transcoder to actually perform the
        // printing job.
        //
        PrinterJob printerJob = PrinterJob.getPrinterJob();
        PageFormat pageFormat = printerJob.defaultPage();

        //
        // Set the page parameters from the hints
        //
        Paper paper = pageFormat.getPaper();
View Full Code Here

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

        //
        PrinterJob printerJob =
            PrinterJob.getPrinterJob();

        PageFormat pageFormat =
            printerJob.defaultPage();

        //
        // Set the page parameters from the hints
        //
        Paper paper = pageFormat.getPaper();
View Full Code Here

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

                              String jobTitle) {

        PrinterJob job = PrinterJob.getPrinterJob();
        job.setJobName(jobTitle);
        if (job.printDialog()) {
            job.setPrintable(new PrintContext(text, defaultStyles, job.defaultPage()));
            try {
                job.print();
            }
            catch(PrinterException e) {
                System.out.println("Printer exception: " + e);
View Full Code Here

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

     * Creates a print job for the chart.
     */
    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()) {
                try {
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.