Package javax.print.attribute.standard

Examples of javax.print.attribute.standard.PrinterResolution


                    final long handle) throws PrintException {
        final int[] res = getSupportedResolutions(handle);
        final PrinterResolution[] resolutions = new PrinterResolution[res.length / 2];

        for (int i = 0; i < res.length; i += 2) {
            resolutions[i / 2] = new PrinterResolution(res[i], res[i + 1],
                            ResolutionSyntax.DPI);
        }
        return resolutions;
    }
View Full Code Here


                return true;
            }
        } else if (category.equals(PrinterResolution.class)) {
            int[] resolutions = getResolutionsSupported(serviceName);
            if (resolutions != null && resolutions.length > 1) {
                PrinterResolution resolution = (PrinterResolution)attribute;
                int xres = resolution.getCrossFeedResolution(
                        PrinterResolution.DPI);
                int yres = resolution.getFeedResolution(PrinterResolution.DPI);
                for (int i = 0; i < resolutions.length / 2; i++) {
                    if (xres == resolutions[i * 2] &&
                        yres == resolutions[i * 2 + 1]) {
                        return true;
                    }
View Full Code Here

            int[] resolutions = getResolutionsSupported(serviceName);
            if (resolutions != null && resolutions.length > 1) {
                PrinterResolution[] res =
                    new PrinterResolution[resolutions.length / 2];
                for (int i = 0; i < resolutions.length / 2; i++) {
                    res[i] = new PrinterResolution(resolutions[i * 2],
                            resolutions[i * 2 + 1], PrinterResolution.DPI);
                }
                return res;
            }
        } else if (category.equals(SheetCollate.class)) {
View Full Code Here

                } else
                  if (requestAttrs[i].equals(OrientationRequested.LANDSCAPE)) {
                    printAttributes[ORIENTATION_INDEX] = 2;
                }
            } else if (category.equals(PrinterResolution.class)) {
                PrinterResolution res = (PrinterResolution)requestAttrs[i];
                int xres = res.getCrossFeedResolution(PrinterResolution.DPI);
                int yres = res.getFeedResolution(PrinterResolution.DPI);
                printAttributes[XRESOLUTION_INDEX] = xres;
                printAttributes[YRESOLUTION_INDEX] = yres;
            } else if (category.equals(SheetCollate.class)) {
                SheetCollate collate = (SheetCollate)requestAttrs[i];
                if (collate == SheetCollate.COLLATED) {
View Full Code Here

                return true;
            }
        } else if (category.equals(PrinterResolution.class)) {
            int[] resolutions = getResolutionsSupported(serviceName);
            if (resolutions != null && resolutions.length > 1) {
                PrinterResolution resolution = (PrinterResolution)attribute;
                int xres = resolution.getCrossFeedResolution(
                        PrinterResolution.DPI);
                int yres = resolution.getFeedResolution(PrinterResolution.DPI);
                for (int i = 0; i < resolutions.length / 2; i++) {
                    if (xres == resolutions[i * 2] &&
                        yres == resolutions[i * 2 + 1]) {
                        return true;
                    }
View Full Code Here

            int[] resolutions = getResolutionsSupported(serviceName);
            if (resolutions != null && resolutions.length > 1) {
                PrinterResolution[] res =
                    new PrinterResolution[resolutions.length / 2];
                for (int i = 0; i < resolutions.length / 2; i++) {
                    res[i] = new PrinterResolution(resolutions[i * 2],
                            resolutions[i * 2 + 1], PrinterResolution.DPI);
                }
                return res;
            }
        } else if (category.equals(SheetCollate.class)) {
View Full Code Here

                } else
                  if (requestAttrs[i].equals(OrientationRequested.LANDSCAPE)) {
                    printAttributes[ORIENTATION_INDEX] = 2;
                }
            } else if (category.equals(PrinterResolution.class)) {
                PrinterResolution res = (PrinterResolution)requestAttrs[i];
                int xres = res.getCrossFeedResolution(PrinterResolution.DPI);
                int yres = res.getFeedResolution(PrinterResolution.DPI);
                printAttributes[XRESOLUTION_INDEX] = xres;
                printAttributes[YRESOLUTION_INDEX] = yres;
            } else if (category.equals(SheetCollate.class)) {
                SheetCollate collate = (SheetCollate)requestAttrs[i];
                if (collate == SheetCollate.COLLATED) {
View Full Code Here

                return true;
            }
        } else if (category.equals(PrinterResolution.class)) {
            int[] resolutions = getResolutionsSupported(serviceName);
            if (resolutions != null && resolutions.length > 1) {
                PrinterResolution resolution = (PrinterResolution)attribute;
                int xres = resolution.getCrossFeedResolution(
                        PrinterResolution.DPI);
                int yres = resolution.getFeedResolution(PrinterResolution.DPI);
                for (int i = 0; i < resolutions.length / 2; i++) {
                    if (xres == resolutions[i * 2] &&
                        yres == resolutions[i * 2 + 1]) {
                        return true;
                    }
View Full Code Here

            int[] resolutions = getResolutionsSupported(serviceName);
            if (resolutions != null && resolutions.length > 1) {
                PrinterResolution[] res =
                    new PrinterResolution[resolutions.length / 2];
                for (int i = 0; i < resolutions.length / 2; i++) {
                    res[i] = new PrinterResolution(resolutions[i * 2],
                            resolutions[i * 2 + 1], PrinterResolution.DPI);
                }
                return res;
            }
        } else if (category.equals(SheetCollate.class)) {
View Full Code Here

                } else
                  if (requestAttrs[i].equals(OrientationRequested.LANDSCAPE)) {
                    printAttributes[ORIENTATION_INDEX] = 2;
                }
            } else if (category.equals(PrinterResolution.class)) {
                PrinterResolution res = (PrinterResolution)requestAttrs[i];
                int xres = res.getCrossFeedResolution(PrinterResolution.DPI);
                int yres = res.getFeedResolution(PrinterResolution.DPI);
                printAttributes[XRESOLUTION_INDEX] = xres;
                printAttributes[YRESOLUTION_INDEX] = yres;
            } else if (category.equals(SheetCollate.class)) {
                SheetCollate collate = (SheetCollate)requestAttrs[i];
                if (collate == SheetCollate.COLLATED) {
View Full Code Here

TOP

Related Classes of javax.print.attribute.standard.PrinterResolution

Copyright © 2018 www.massapicom. 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.