1 /*
2 * Copyright (c) 2000, 2004, 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
27 import javax.print.attribute.Attribute;
28 import javax.print.attribute.ResolutionSyntax;
29 import javax.print.attribute.DocAttribute;
30 import javax.print.attribute.PrintRequestAttribute;
31 import javax.print.attribute.PrintJobAttribute;
32
33 /**
34 * Class PrinterResolution is a printing attribute class that specifies an
35 * exact resolution supported by a printer or to be used for a print job.
36 * This attribute assumes that printers have a small set of device resolutions
37 * at which they can operate rather than a continuum.
38 * <p>
39 * PrinterResolution is used in multiple ways:
40 * <OL TYPE=1>
41 * <LI>
42 * When a client searches looking for a printer that supports the client's
43 * desired resolution exactly (no more, no less), the client specifies
44 * an instance of class PrinterResolution indicating the exact resolution the
45 * client wants. Only printers supporting that exact resolution will match the
46 * search.
47 * <P>
48 * <LI>
49 * When a client needs to print a job using the client's desired resolution
50 * exactly (no more, no less), the client specifies an instance of class
51 * PrinterResolution as an attribute of the Print Job. This will fail if the
52 * Print Job doesn't support that exact resolution, and Fidelity is set to
53 * true.
54 * </OL>
55 * If a client wants to locate a printer supporting a resolution
56 * greater than some required minimum, then it may be necessary to exclude
57 * this attribute from a lookup request and to directly query the set of
58 * supported resolutions, and specify the one that most closely meets
59 * the client's requirements.
60 * In some cases this may be more simply achieved by specifying a
61 * PrintQuality attribute which often controls resolution.
62 * <P>
63 * <P>
64 * <B>IPP Compatibility:</B> The information needed to construct an IPP
65 * <CODE>"printer-resolution"</CODE> attribute can be obtained by calling
66 * methods on the PrinterResolution object. The category name returned by
67 * <CODE>getName()</CODE> gives the IPP attribute name.
68 * <P>
69 *
70 * @author David Mendenhall
71 * @author Alan Kaminsky
72 */
73 public final class PrinterResolution extends ResolutionSyntax
74 implements DocAttribute, PrintRequestAttribute, PrintJobAttribute {
75
76 private static final long serialVersionUID = 13090306561090558L;
77
78 /**
79 * Construct a new printer resolution attribute from the given items.
80 *
81 * @param crossFeedResolution
82 * Cross feed direction resolution.
|
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
27 import javax.print.attribute.Attribute;
28 import javax.print.attribute.ResolutionSyntax;
29 import javax.print.attribute.DocAttribute;
30 import javax.print.attribute.PrintRequestAttribute;
31 import javax.print.attribute.PrintJobAttribute;
32
33 /**
34 * Class PrinterResolution is a printing attribute class that specifies an
35 * exact resolution supported by a printer or to be used for a print job.
36 * This attribute assumes that printers have a small set of device resolutions
37 * at which they can operate rather than a continuum.
38 * <p>
39 * PrinterResolution is used in multiple ways:
40 * <OL TYPE=1>
41 * <LI>
42 * When a client searches looking for a printer that supports the client's
43 * desired resolution exactly (no more, no less), the client specifies
44 * an instance of class PrinterResolution indicating the exact resolution the
45 * client wants. Only printers supporting that exact resolution will match the
46 * search.
47 *
48 * <LI>
49 * When a client needs to print a job using the client's desired resolution
50 * exactly (no more, no less), the client specifies an instance of class
51 * PrinterResolution as an attribute of the Print Job. This will fail if the
52 * Print Job doesn't support that exact resolution, and Fidelity is set to
53 * true.
54 * </OL>
55 * If a client wants to locate a printer supporting a resolution
56 * greater than some required minimum, then it may be necessary to exclude
57 * this attribute from a lookup request and to directly query the set of
58 * supported resolutions, and specify the one that most closely meets
59 * the client's requirements.
60 * In some cases this may be more simply achieved by specifying a
61 * PrintQuality attribute which often controls resolution.
62 * <P>
63 * <B>IPP Compatibility:</B> The information needed to construct an IPP
64 * <CODE>"printer-resolution"</CODE> attribute can be obtained by calling
65 * methods on the PrinterResolution object. The category name returned by
66 * <CODE>getName()</CODE> gives the IPP attribute name.
67 * <P>
68 *
69 * @author David Mendenhall
70 * @author Alan Kaminsky
71 */
72 public final class PrinterResolution extends ResolutionSyntax
73 implements DocAttribute, PrintRequestAttribute, PrintJobAttribute {
74
75 private static final long serialVersionUID = 13090306561090558L;
76
77 /**
78 * Construct a new printer resolution attribute from the given items.
79 *
80 * @param crossFeedResolution
81 * Cross feed direction resolution.
|