src/share/classes/sun/print/RasterPrinterJob.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 179,202 **** /* The system property FORCE_PIPE_PROP * can be used to force the printing code to * use a particular pipeline. Either the raster * pipeline or the pdl pipeline can be forced. */ ! String forceStr = ! (String)java.security.AccessController.doPrivileged( new sun.security.action.GetPropertyAction(FORCE_PIPE_PROP)); if (forceStr != null) { if (forceStr.equalsIgnoreCase(FORCE_PDL)) { forcePDL = true; } else if (forceStr.equalsIgnoreCase(FORCE_RASTER)) { forceRaster = true; } } ! String shapeTextStr = ! (String)java.security.AccessController.doPrivileged( new sun.security.action.GetPropertyAction(SHAPE_TEXT_PROP)); if (shapeTextStr != null) { shapeTextProp = true; } --- 179,200 ---- /* The system property FORCE_PIPE_PROP * can be used to force the printing code to * use a particular pipeline. Either the raster * pipeline or the pdl pipeline can be forced. */ ! String forceStr = java.security.AccessController.doPrivileged( new sun.security.action.GetPropertyAction(FORCE_PIPE_PROP)); if (forceStr != null) { if (forceStr.equalsIgnoreCase(FORCE_PDL)) { forcePDL = true; } else if (forceStr.equalsIgnoreCase(FORCE_RASTER)) { forceRaster = true; } } ! String shapeTextStr =java.security.AccessController.doPrivileged( new sun.security.action.GetPropertyAction(SHAPE_TEXT_PROP)); if (shapeTextStr != null) { shapeTextProp = true; }
*** 510,525 **** service.getName() == null) { throw new PrinterException("Null PrintService name."); } else { // Check the list of services. This service may have been // deleted already ! PrinterState prnState = (PrinterState)service.getAttribute( ! PrinterState.class); if (prnState == PrinterState.STOPPED) { PrinterStateReasons prnStateReasons = ! (PrinterStateReasons)service.getAttribute( ! PrinterStateReasons.class); if ((prnStateReasons != null) && (prnStateReasons.containsKey(PrinterStateReason.SHUTDOWN))) { throw new PrinterException("PrintService is no longer available."); } --- 508,521 ---- service.getName() == null) { throw new PrinterException("Null PrintService name."); } else { // Check the list of services. This service may have been // deleted already ! PrinterState prnState = service.getAttribute(PrinterState.class); if (prnState == PrinterState.STOPPED) { PrinterStateReasons prnStateReasons = ! service.getAttribute(PrinterStateReasons.class); if ((prnStateReasons != null) && (prnStateReasons.containsKey(PrinterStateReason.SHUTDOWN))) { throw new PrinterException("PrintService is no longer available."); }
*** 1351,1375 **** throw new PrinterException("No print service found."); } // Check the list of services. This service may have been // deleted already ! PrinterState prnState = (PrinterState)psvc.getAttribute( ! PrinterState.class); if (prnState == PrinterState.STOPPED) { PrinterStateReasons prnStateReasons = ! (PrinterStateReasons)psvc.getAttribute( ! PrinterStateReasons.class); if ((prnStateReasons != null) && (prnStateReasons.containsKey(PrinterStateReason.SHUTDOWN))) { throw new PrinterException("PrintService is no longer available."); } } ! if ((PrinterIsAcceptingJobs)(psvc.getAttribute( ! PrinterIsAcceptingJobs.class)) == PrinterIsAcceptingJobs.NOT_ACCEPTING_JOBS) { throw new PrinterException("Printer is not accepting job."); } if ((psvc instanceof SunPrinterJobService) && --- 1347,1368 ---- throw new PrinterException("No print service found."); } // Check the list of services. This service may have been // deleted already ! PrinterState prnState = psvc.getAttribute(PrinterState.class); if (prnState == PrinterState.STOPPED) { PrinterStateReasons prnStateReasons = ! psvc.getAttribute(PrinterStateReasons.class); if ((prnStateReasons != null) && (prnStateReasons.containsKey(PrinterStateReason.SHUTDOWN))) { throw new PrinterException("PrintService is no longer available."); } } ! if ((psvc.getAttribute(PrinterIsAcceptingJobs.class)) == PrinterIsAcceptingJobs.NOT_ACCEPTING_JOBS) { throw new PrinterException("Printer is not accepting job."); } if ((psvc instanceof SunPrinterJobService) &&
*** 2033,2043 **** /* Figure out the number of lines that will fit into * our maximum band size. The hard coded 3 reflects the * fact that we can only create 24 bit per pixel 3 byte BGR * BufferedImages. FIX. */ ! int bandHeight = (int)(MAX_BAND_SIZE / bandWidth / 3); int deviceLeft = (int)Math.rint(paper.getImageableX() * xScale); int deviceTop = (int)Math.rint(paper.getImageableY() * yScale); /* The device transform is used to move the band down --- 2026,2036 ---- /* Figure out the number of lines that will fit into * our maximum band size. The hard coded 3 reflects the * fact that we can only create 24 bit per pixel 3 byte BGR * BufferedImages. FIX. */ ! int bandHeight = (MAX_BAND_SIZE / bandWidth / 3); int deviceLeft = (int)Math.rint(paper.getImageableX() * xScale); int deviceTop = (int)Math.rint(paper.getImageableY() * yScale); /* The device transform is used to move the band down