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

Print this page

        

*** 60,70 **** import javax.print.attribute.standard.Sides; public class PSStreamPrintService extends StreamPrintService implements SunPrinterJobService { ! private static final Class[] suppAttrCats = { Chromaticity.class, Copies.class, Fidelity.class, JobName.class, Media.class, --- 60,70 ---- import javax.print.attribute.standard.Sides; public class PSStreamPrintService extends StreamPrintService implements SunPrinterJobService { ! private static final Class<?>[] suppAttrCats = { Chromaticity.class, Copies.class, Fidelity.class, JobName.class, Media.class,
*** 106,116 **** public DocPrintJob createPrintJob() { return new PSStreamPrintJob(this); } ! public boolean usesClass(Class c) { return (c == sun.print.PSPrinterJob.class); } public String getName() { return "Postscript output"; --- 106,116 ---- public DocPrintJob createPrintJob() { return new PSStreamPrintJob(this); } ! public boolean usesClass(Class<?> c) { return (c == sun.print.PSPrinterJob.class); } public String getName() { return "Postscript output";
*** 135,145 **** } if (!(PrintServiceAttribute.class.isAssignableFrom(category))) { throw new IllegalArgumentException("Not a PrintServiceAttribute"); } if (category == ColorSupported.class) { ! return (T)ColorSupported.SUPPORTED; } else { return null; } } public PrintServiceAttributeSet getAttributes() { --- 135,147 ---- } if (!(PrintServiceAttribute.class.isAssignableFrom(category))) { throw new IllegalArgumentException("Not a PrintServiceAttribute"); } if (category == ColorSupported.class) { ! @SuppressWarnings("unchecked") ! T tmp = (T)ColorSupported.SUPPORTED; ! return tmp; } else { return null; } } public PrintServiceAttributeSet getAttributes() {
*** 159,169 **** return false; } public Class<?>[] getSupportedAttributeCategories() { ! Class []cats = new Class[suppAttrCats.length]; System.arraycopy(suppAttrCats, 0, cats, 0, cats.length); return cats; } public boolean --- 161,171 ---- return false; } public Class<?>[] getSupportedAttributeCategories() { ! Class<?>[] cats = new Class<?>[suppAttrCats.length]; System.arraycopy(suppAttrCats, 0, cats, 0, cats.length); return cats; } public boolean
*** 399,409 **** } if (flavor != null && !isDocFlavorSupported(flavor)) { throw new IllegalArgumentException(flavor + " is an unsupported flavor"); } ! Class category = attr.getCategory(); if (!isAttributeCategorySupported(category)) { return false; } else if (attr.getCategory() == Chromaticity.class) { return attr == Chromaticity.COLOR; --- 401,411 ---- } if (flavor != null && !isDocFlavorSupported(flavor)) { throw new IllegalArgumentException(flavor + " is an unsupported flavor"); } ! Class<? extends Attribute> category = attr.getCategory(); if (!isAttributeCategorySupported(category)) { return false; } else if (attr.getCategory() == Chromaticity.class) { return attr == Chromaticity.COLOR;