Package javax.print.attribute.standard

Examples of javax.print.attribute.standard.PrinterResolution


                        } else {
                            mAttChromaticity = 1; // DMCOLOR_MONOCHROME
                        }
                    }
                    else if (attr.getCategory()==PrinterResolution.class) {
                        PrinterResolution pr = (PrinterResolution)attr;
                        mAttXRes = pr.getCrossFeedResolution(PrinterResolution.DPI);
                        mAttYRes = pr.getFeedResolution(PrinterResolution.DPI);
                    }
                    else if (attr.getCategory()==PrintQuality.class) {
                        if (attr.equals(PrintQuality.HIGH)) {
                            mAttQuality = -4; // DMRES_HIGH
                        } else if (attr.equals(PrintQuality.NORMAL)) {
View Full Code Here


            return null;
        }
        int nRes = prnRes.length/2;

        ArrayList arrList = new ArrayList();
        PrinterResolution pr;

        for (int i=0; i<nRes; i++) {
            try {
                pr = new PrinterResolution(prnRes[i*2],
                                        prnRes[i*2+1], PrinterResolution.DPI);
                arrList.add(pr);
            } catch (IllegalArgumentException e) {
            }
        }
View Full Code Here

            int yRes = defYRes;
            int xRes = defQuality;
            if ((xRes < 0) || (yRes < 0)) {
                int res = (yRes > xRes) ? yRes : xRes;
                if (res > 0) {
                 return new PrinterResolution(res, res, PrinterResolution.DPI);
                }
            }
            else {
               return new PrinterResolution(xRes, yRes, PrinterResolution.DPI);
            }
        } else if (category == ColorSupported.class) {
            if (isColorSup) {
                return ColorSupported.SUPPORTED;
            } else {
View Full Code Here

            return Sides.TWO_SIDED_SHORT_EDGE;
        }
      }
      if (category == PrinterResolution.class) {
        cli.System.Drawing.Printing.PrinterResolution res = settings.get_DefaultPageSettings().get_PrinterResolution();
        return new PrinterResolution( res.get_X(), res.get_Y(), PrinterResolution.DPI);
      }
      if (category == ColorSupported.class) {
        if ( settings.get_SupportsColor() ) {
          return ColorSupported.SUPPORTED;
        } else {
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.