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
34 * Class Sides is a printing attribute class, an enumeration, that specifies
35 * how print-stream pages are to be imposed upon the sides of an instance of a
36 * selected medium, i.e., an impression.
37 * <P>
38 * The effect of a Sides attribute on a multidoc print job (a job with multiple
39 * documents) depends on whether all the docs have the same sides values
40 * specified or whether different docs have different sides values specified,
41 * and on the (perhaps defaulted) value of the {@link MultipleDocumentHandling
42 * MultipleDocumentHandling} attribute.
43 * <UL>
44 * <LI>
45 * If all the docs have the same sides value <I>n</I> specified, then any value
46 * of {@link MultipleDocumentHandling MultipleDocumentHandling} makes sense,
47 * and the printer's processing depends on the {@link MultipleDocumentHandling
48 * MultipleDocumentHandling} value:
49 * <UL>
50 * <LI>
51 * SINGLE_DOCUMENT -- All the input docs will be combined together into one
52 * output document. Each media sheet will consist of <I>n</I> impressions from
53 * the output document.
54 * <P>
55 * <LI>
56 * SINGLE_DOCUMENT_NEW_SHEET -- All the input docs will be combined together
57 * into one output document. Each media sheet will consist of <I>n</I>
58 * impressions from the output document. However, the first impression of each
59 * input doc will always start on a new media sheet; this means the last media
60 * sheet of an input doc may have only one impression on it.
61 * <P>
62 * <LI>
63 * SEPARATE_DOCUMENTS_UNCOLLATED_COPIES -- The input docs will remain separate.
64 * Each media sheet will consist of <I>n</I> impressions from the input doc.
65 * Since the input docs are separate, the first impression of each input doc
66 * will always start on a new media sheet; this means the last media sheet of
67 * an input doc may have only one impression on it.
68 * <P>
69 * <LI>
70 * SEPARATE_DOCUMENTS_COLLATED_COPIES -- The input docs will remain separate.
71 * Each media sheet will consist of <I>n</I> impressions from the input doc.
72 * Since the input docs are separate, the first impression of each input doc
73 * will always start on a new media sheet; this means the last media sheet of
74 * an input doc may have only one impression on it.
75 * </UL>
76 * <P>
77 * <UL>
78 * <LI>
79 * SINGLE_DOCUMENT -- All the input docs will be combined together into one
80 * output document. Each media sheet will consist of <I>n<SUB>i</SUB></I>
81 * impressions from the output document, where <I>i</I> is the number of the
82 * input doc corresponding to that point in the output document. When the next
83 * input doc has a different sides value from the previous input doc, the first
84 * print-stream page of the next input doc goes at the start of the next media
85 * sheet, possibly leaving only one impression on the previous media sheet.
86 * <P>
87 * <LI>
88 * SINGLE_DOCUMENT_NEW_SHEET -- All the input docs will be combined together
89 * into one output document. Each media sheet will consist of <I>n</I>
90 * impressions from the output document. However, the first impression of each
91 * input doc will always start on a new media sheet; this means the last
92 * impression of an input doc may have only one impression on it.
93 * <P>
94 * <LI>
95 * SEPARATE_DOCUMENTS_UNCOLLATED_COPIES -- The input docs will remain separate.
96 * For input doc <I>i,</I> each media sheet will consist of <I>n<SUB>i</SUB></I>
97 * impressions from the input doc. Since the input docs are separate, the first
98 * impression of each input doc will always start on a new media sheet; this
99 * means the last media sheet of an input doc may have only one impression on
100 * it.
101 * <P>
102 * <LI>
103 * SEPARATE_DOCUMENTS_COLLATED_COPIES -- The input docs will remain separate.
104 * For input doc <I>i,</I> each media sheet will consist of <I>n<SUB>i</SUB></I>
105 * impressions from the input doc. Since the input docs are separate, the first
106 * impression of each input doc will always start on a new media sheet; this
107 * means the last media sheet of an input doc may have only one impression on
108 * it.
109 * </UL>
110 * </UL>
111 * <P>
112 * <B>IPP Compatibility:</B> The category name returned by
113 * <CODE>getName()</CODE> is the IPP attribute name. The enumeration's
114 * integer value is the IPP enum value. The <code>toString()</code> method
115 * returns the IPP string representation of the attribute value.
116 * <P>
117 *
118 * @author Alan Kaminsky
119 */
120
121 public final class Sides extends EnumSyntax
122 implements DocAttribute, PrintRequestAttribute, PrintJobAttribute {
123
124 private static final long serialVersionUID = -6890309414893262822L;
125
126 /**
127 * Imposes each consecutive print-stream page upon the same side of
128 * consecutive media sheets.
129 */
130 public static final Sides ONE_SIDED = new Sides(0);
131
132 /**
133 * Imposes each consecutive pair of print-stream pages upon front and back
134 * sides of consecutive media sheets, such that the orientation of each
135 * pair of print-stream pages on the medium would be correct for the
136 * reader as if for binding on the long edge. This imposition is also
|
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
34 * Class Sides is a printing attribute class, an enumeration, that specifies
35 * how print-stream pages are to be imposed upon the sides of an instance of a
36 * selected medium, i.e., an impression.
37 * <P>
38 * The effect of a Sides attribute on a multidoc print job (a job with multiple
39 * documents) depends on whether all the docs have the same sides values
40 * specified or whether different docs have different sides values specified,
41 * and on the (perhaps defaulted) value of the {@link MultipleDocumentHandling
42 * MultipleDocumentHandling} attribute.
43 * <UL>
44 * <LI>
45 * If all the docs have the same sides value <I>n</I> specified, then any value
46 * of {@link MultipleDocumentHandling MultipleDocumentHandling} makes sense,
47 * and the printer's processing depends on the {@link MultipleDocumentHandling
48 * MultipleDocumentHandling} value:
49 * <UL>
50 * <LI>
51 * SINGLE_DOCUMENT -- All the input docs will be combined together into one
52 * output document. Each media sheet will consist of <I>n</I> impressions from
53 * the output document.
54 *
55 * <LI>
56 * SINGLE_DOCUMENT_NEW_SHEET -- All the input docs will be combined together
57 * into one output document. Each media sheet will consist of <I>n</I>
58 * impressions from the output document. However, the first impression of each
59 * input doc will always start on a new media sheet; this means the last media
60 * sheet of an input doc may have only one impression on it.
61 *
62 * <LI>
63 * SEPARATE_DOCUMENTS_UNCOLLATED_COPIES -- The input docs will remain separate.
64 * Each media sheet will consist of <I>n</I> impressions from the input doc.
65 * Since the input docs are separate, the first impression of each input doc
66 * will always start on a new media sheet; this means the last media sheet of
67 * an input doc may have only one impression on it.
68 *
69 * <LI>
70 * SEPARATE_DOCUMENTS_COLLATED_COPIES -- The input docs will remain separate.
71 * Each media sheet will consist of <I>n</I> impressions from the input doc.
72 * Since the input docs are separate, the first impression of each input doc
73 * will always start on a new media sheet; this means the last media sheet of
74 * an input doc may have only one impression on it.
75 * </UL>
76 *
77 * <UL>
78 * <LI>
79 * SINGLE_DOCUMENT -- All the input docs will be combined together into one
80 * output document. Each media sheet will consist of <I>n<SUB>i</SUB></I>
81 * impressions from the output document, where <I>i</I> is the number of the
82 * input doc corresponding to that point in the output document. When the next
83 * input doc has a different sides value from the previous input doc, the first
84 * print-stream page of the next input doc goes at the start of the next media
85 * sheet, possibly leaving only one impression on the previous media sheet.
86 *
87 * <LI>
88 * SINGLE_DOCUMENT_NEW_SHEET -- All the input docs will be combined together
89 * into one output document. Each media sheet will consist of <I>n</I>
90 * impressions from the output document. However, the first impression of each
91 * input doc will always start on a new media sheet; this means the last
92 * impression of an input doc may have only one impression on it.
93 *
94 * <LI>
95 * SEPARATE_DOCUMENTS_UNCOLLATED_COPIES -- The input docs will remain separate.
96 * For input doc <I>i,</I> each media sheet will consist of <I>n<SUB>i</SUB></I>
97 * impressions from the input doc. Since the input docs are separate, the first
98 * impression of each input doc will always start on a new media sheet; this
99 * means the last media sheet of an input doc may have only one impression on
100 * it.
101 *
102 * <LI>
103 * SEPARATE_DOCUMENTS_COLLATED_COPIES -- The input docs will remain separate.
104 * For input doc <I>i,</I> each media sheet will consist of <I>n<SUB>i</SUB></I>
105 * impressions from the input doc. Since the input docs are separate, the first
106 * impression of each input doc will always start on a new media sheet; this
107 * means the last media sheet of an input doc may have only one impression on
108 * it.
109 * </UL>
110 * </UL>
111 * <P>
112 * <B>IPP Compatibility:</B> The category name returned by
113 * <CODE>getName()</CODE> is the IPP attribute name. The enumeration's
114 * integer value is the IPP enum value. The <code>toString()</code> method
115 * returns the IPP string representation of the attribute value.
116 *
117 * @author Alan Kaminsky
118 */
119
120 public final class Sides extends EnumSyntax
121 implements DocAttribute, PrintRequestAttribute, PrintJobAttribute {
122
123 private static final long serialVersionUID = -6890309414893262822L;
124
125 /**
126 * Imposes each consecutive print-stream page upon the same side of
127 * consecutive media sheets.
128 */
129 public static final Sides ONE_SIDED = new Sides(0);
130
131 /**
132 * Imposes each consecutive pair of print-stream pages upon front and back
133 * sides of consecutive media sheets, such that the orientation of each
134 * pair of print-stream pages on the medium would be correct for the
135 * reader as if for binding on the long edge. This imposition is also
|