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 static Font getExtendedFont(int pointSize, int typeFace, boolean isBold, boolean isItalic){
        return getPortableFont(pointSize, typeFace, isBold, isItalic);
    }
    public static PageFormat getDefaultPrintOptions(){
        PrinterJob pjob = PrinterJob.getPrinterJob();
        PageFormat pf = pjob.defaultPage();
        return pf;
    }
    /**
     * registers a new color and provides an index to it.
     * @param red
View Full Code Here

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

    public static PrintOptionsDesc getDefaultPrintOptions() {
        if (defaultPrintOptions == null) {
          defaultPrintOptions = new PrintOptionsDesc();
        }
        PrinterJob pjob = PrinterJob.getPrinterJob();
        PageFormat defaultPage = pjob.defaultPage();
        Paper paper = new Paper();
        double imagableWidth = defaultPage.getPaper().getWidth() - (defaultPrintMargin * 2);
        double imagableHeight = defaultPage.getPaper().getHeight() - (defaultPrintMargin * 2);
       
        // Swap the width and height if in landscape mode
View Full Code Here

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

        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.defaultPage()

    PrinterJob printJob = PrinterJob.getPrinterJob();

    // fix for bug ID 6255588 from Sun bug database
    initPrinterJobFields(printJob);
   
    PageFormat pageFormat = printJob.defaultPage();
    Paper paper = pageFormat.getPaper();

    printJob.setJobName("JasperReports - " + jasperPrint.getName());
   
    switch (jasperPrint.getOrientation())
View Full Code Here

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

    public static PrintOptionsDesc getDefaultPrintOptions() {
        if (defaultPrintOptions == null) {
          defaultPrintOptions = new PrintOptionsDesc();
        }
        PrinterJob pjob = PrinterJob.getPrinterJob();
        PageFormat defaultPage = pjob.defaultPage();
        Paper paper = new Paper();
        double imagableWidth = defaultPage.getPaper().getWidth() - (defaultPrintMargin * 2);
        double imagableHeight = defaultPage.getPaper().getHeight() - (defaultPrintMargin * 2);
       
        // Swap the width and height if in landscape mode
View Full Code Here

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 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.defaultPage()

    public static PrintOptionsDesc getDefaultPrintOptions() {
        if (defaultPrintOptions == null) {
          defaultPrintOptions = new PrintOptionsDesc();
        }
        PrinterJob pjob = PrinterJob.getPrinterJob();
        PageFormat defaultPage = pjob.defaultPage();
        Paper paper = new Paper();
        double imagableWidth = defaultPage.getPaper().getWidth() - (defaultPrintMargin * 2);
        double imagableHeight = defaultPage.getPaper().getHeight() - (defaultPrintMargin * 2);
       
        // Swap the width and height if in landscape mode
View Full Code Here

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

    public static Font getExtendedFont(int pointSize, int typeFace, boolean isBold, boolean isItalic){
        return getPortableFont(pointSize, typeFace, isBold, isItalic);
    }
    public static PageFormat getDefaultPrintOptions(){
        PrinterJob pjob = PrinterJob.getPrinterJob();
        PageFormat pf = pjob.defaultPage();
        return pf;
    }
    /**
     * registers a new color and provides an index to it.
     * @param red
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.