src/share/classes/javax/print/attribute/standard/Chromaticity.java

Print this page


   1 
   2 /*
   3  * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
   4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   5  *
   6  * This code is free software; you can redistribute it and/or modify it
   7  * under the terms of the GNU General Public License version 2 only, as
   8  * published by the Free Software Foundation.  Oracle designates this
   9  * particular file as subject to the "Classpath" exception as provided
  10  * by Oracle in the LICENSE file that accompanied this code.
  11  *
  12  * This code is distributed in the hope that it will be useful, but WITHOUT
  13  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  14  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  15  * version 2 for more details (a copy is included in the LICENSE file that
  16  * accompanied this code).
  17  *
  18  * You should have received a copy of the GNU General Public License version
  19  * 2 along with this work; if not, write to the Free Software Foundation,
  20  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  21  *
  22  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  23  * or visit www.oracle.com if you need additional information or have any


  25  */
  26 package javax.print.attribute.standard;
  27 
  28 import javax.print.attribute.Attribute;
  29 import javax.print.attribute.EnumSyntax;
  30 import javax.print.attribute.DocAttribute;
  31 import javax.print.attribute.PrintRequestAttribute;
  32 import javax.print.attribute.PrintJobAttribute;
  33 
  34 /**
  35  * Class Chromaticity is a printing attribute class, an enumeration, that
  36  * specifies monochrome or color printing. This is used by a print client
  37  * to specify how the print data should be generated or processed. It is not
  38  * descriptive of the color capabilities of the device. Query the service's
  39  * {@link ColorSupported ColorSupported} attribute to determine if the device
  40  * can be verified to support color printing.
  41  * <P>
  42  * The table below shows the effects of specifying a Chromaticity attribute of
  43  * {@link #MONOCHROME MONOCHROME} or {@link #COLOR COLOR}
  44  * for a monochrome or color document.
  45  * <P>
  46  * <TABLE BORDER=1 CELLPADDING=2 CELLSPACING=1 SUMMARY="Shows effects of specifying MONOCHROME or COLOR Chromaticity attributes">
  47  * <TR>
  48  * <TH>
  49  * Chromaticity<BR>Attribute
  50  * </TH>
  51  * <TH>
  52  * Effect on<BR>Monochrome Document
  53  * </TH>
  54  * <TH>
  55  * Effect on<BR>Color Document
  56  * </TH>
  57  * </TR>
  58  * <TR>
  59  * <TD>
  60  * {@link #MONOCHROME MONOCHROME}
  61  * </TD>
  62  * <TD>
  63  * Printed as is, in monochrome
  64  * </TD>
  65  * <TD>
  66  * Printed in monochrome, with colors converted to shades of gray
  67  * </TD>
  68  * </TR>
  69  * <TR>
  70  * <TD>
  71  * {@link #COLOR COLOR}
  72  * </TD>
  73  * <TD>
  74  * Printed as is, in monochrome
  75  * </TD>
  76  * <TD>
  77  * Printed as is, in color
  78  * </TD>
  79  * </TR>
  80  * </TABLE>
  81  * <P>
  82  * <P>
  83  * <B>IPP Compatibility:</B> Chromaticity is not an IPP attribute at present.
  84  * <P>
  85  *
  86  * @author  Alan Kaminsky
  87  */
  88 public final class Chromaticity extends EnumSyntax
  89     implements DocAttribute, PrintRequestAttribute, PrintJobAttribute {
  90 
  91     private static final long serialVersionUID = 4660543931355214012L;
  92 
  93     /**
  94      * Monochrome printing.
  95      */
  96     public static final Chromaticity MONOCHROME = new Chromaticity(0);
  97 
  98     /**
  99      * Color printing.
 100      */
 101     public static final Chromaticity COLOR = new Chromaticity(1);
 102 
 103 
 104     /**



   1 /*
   2  * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  24  */
  25 package javax.print.attribute.standard;
  26 
  27 import javax.print.attribute.Attribute;
  28 import javax.print.attribute.EnumSyntax;
  29 import javax.print.attribute.DocAttribute;
  30 import javax.print.attribute.PrintRequestAttribute;
  31 import javax.print.attribute.PrintJobAttribute;
  32 
  33 /**
  34  * Class Chromaticity is a printing attribute class, an enumeration, that
  35  * specifies monochrome or color printing. This is used by a print client
  36  * to specify how the print data should be generated or processed. It is not
  37  * descriptive of the color capabilities of the device. Query the service's
  38  * {@link ColorSupported ColorSupported} attribute to determine if the device
  39  * can be verified to support color printing.
  40  * <P>
  41  * The table below shows the effects of specifying a Chromaticity attribute of
  42  * {@link #MONOCHROME MONOCHROME} or {@link #COLOR COLOR}
  43  * for a monochrome or color document.
  44  *
  45  * <TABLE BORDER=1 CELLPADDING=2 CELLSPACING=1 SUMMARY="Shows effects of specifying MONOCHROME or COLOR Chromaticity attributes">
  46  * <TR>
  47  * <TH>
  48  * Chromaticity<BR>Attribute
  49  * </TH>
  50  * <TH>
  51  * Effect on<BR>Monochrome Document
  52  * </TH>
  53  * <TH>
  54  * Effect on<BR>Color Document
  55  * </TH>
  56  * </TR>
  57  * <TR>
  58  * <TD>
  59  * {@link #MONOCHROME MONOCHROME}
  60  * </TD>
  61  * <TD>
  62  * Printed as is, in monochrome
  63  * </TD>
  64  * <TD>
  65  * Printed in monochrome, with colors converted to shades of gray
  66  * </TD>
  67  * </TR>
  68  * <TR>
  69  * <TD>
  70  * {@link #COLOR COLOR}
  71  * </TD>
  72  * <TD>
  73  * Printed as is, in monochrome
  74  * </TD>
  75  * <TD>
  76  * Printed as is, in color
  77  * </TD>
  78  * </TR>
  79  * </TABLE>
  80  * <P>

  81  * <B>IPP Compatibility:</B> Chromaticity is not an IPP attribute at present.

  82  *
  83  * @author  Alan Kaminsky
  84  */
  85 public final class Chromaticity extends EnumSyntax
  86     implements DocAttribute, PrintRequestAttribute, PrintJobAttribute {
  87 
  88     private static final long serialVersionUID = 4660543931355214012L;
  89 
  90     /**
  91      * Monochrome printing.
  92      */
  93     public static final Chromaticity MONOCHROME = new Chromaticity(0);
  94 
  95     /**
  96      * Color printing.
  97      */
  98     public static final Chromaticity COLOR = new Chromaticity(1);
  99 
 100 
 101     /**