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
51 * If a PageRanges attribute is not specified for a print job, all pages of
52 * the document will be printed. In other words, the default value for the
53 * PageRanges attribute is always <CODE>{{1, Integer.MAX_VALUE}}</CODE>.
54 * <P>
55 * The effect of a PageRanges attribute on a multidoc print job (a job with
56 * multiple documents) depends on whether all the docs have the same page ranges
57 * specified or whether different docs have different page ranges specified, and
58 * on the (perhaps defaulted) value of the {@link MultipleDocumentHandling
59 * MultipleDocumentHandling} attribute.
60 * <UL>
61 * <LI>
62 * If all the docs have the same page ranges specified, then any value of {@link
63 * MultipleDocumentHandling MultipleDocumentHandling} makes sense, and the
64 * printer's processing depends on the {@link MultipleDocumentHandling
65 * MultipleDocumentHandling} value:
66 * <UL>
67 * <LI>
68 * SINGLE_DOCUMENT -- All the input docs will be combined together into one
69 * output document. The specified page ranges of that output document will be
70 * printed.
71 * <P>
72 * <LI>
73 * SINGLE_DOCUMENT_NEW_SHEET -- All the input docs will be combined together
74 * into one output document, and the first impression of each input doc will
75 * always start on a new media sheet. The specified page ranges of that output
76 * document will be printed.
77 * <P>
78 * <LI>
79 * SEPARATE_DOCUMENTS_UNCOLLATED_COPIES -- For each separate input doc, the
80 * specified page ranges will be printed.
81 * <P>
82 * <LI>
83 * SEPARATE_DOCUMENTS_COLLATED_COPIES -- For each separate input doc, the
84 * specified page ranges will be printed.
85 * </UL>
86 * <UL>
87 * <LI>
88 * SEPARATE_DOCUMENTS_UNCOLLATED_COPIES -- For each separate input doc, its own
89 * specified page ranges will be printed..
90 * <P>
91 * <LI>
92 * SEPARATE_DOCUMENTS_COLLATED_COPIES -- For each separate input doc, its own
93 * specified page ranges will be printed..
94 * </UL>
95 * </UL>
96 * <P>
97 * <B>IPP Compatibility:</B> The PageRanges attribute's canonical array form
98 * gives the lower and upper bound for each range of pages to be included in
99 * and IPP "page-ranges" attribute. See class {@link
100 * javax.print.attribute.SetOfIntegerSyntax SetOfIntegerSyntax} for an
101 * explanation of canonical array form. The category name returned by
102 * <CODE>getName()</CODE> gives the IPP attribute name.
103 * <P>
104 *
105 * @author David Mendenhall
106 * @author Alan Kaminsky
107 */
108 public final class PageRanges extends SetOfIntegerSyntax
109 implements DocAttribute, PrintRequestAttribute, PrintJobAttribute {
110
111 private static final long serialVersionUID = 8639895197656148392L;
112
113
114 /**
115 * Construct a new page ranges attribute with the given members. The
116 * members are specified in "array form;" see class {@link
117 * javax.print.attribute.SetOfIntegerSyntax SetOfIntegerSyntax} for an
118 * explanation of array form.
119 *
120 * @param members Set members in array form.
121 *
122 * @exception NullPointerException
123 * (unchecked exception) Thrown if <CODE>members</CODE> is null or
|
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
51 * If a PageRanges attribute is not specified for a print job, all pages of
52 * the document will be printed. In other words, the default value for the
53 * PageRanges attribute is always <CODE>{{1, Integer.MAX_VALUE}}</CODE>.
54 * <P>
55 * The effect of a PageRanges attribute on a multidoc print job (a job with
56 * multiple documents) depends on whether all the docs have the same page ranges
57 * specified or whether different docs have different page ranges specified, and
58 * on the (perhaps defaulted) value of the {@link MultipleDocumentHandling
59 * MultipleDocumentHandling} attribute.
60 * <UL>
61 * <LI>
62 * If all the docs have the same page ranges specified, then any value of {@link
63 * MultipleDocumentHandling MultipleDocumentHandling} makes sense, and the
64 * printer's processing depends on the {@link MultipleDocumentHandling
65 * MultipleDocumentHandling} value:
66 * <UL>
67 * <LI>
68 * SINGLE_DOCUMENT -- All the input docs will be combined together into one
69 * output document. The specified page ranges of that output document will be
70 * printed.
71 *
72 * <LI>
73 * SINGLE_DOCUMENT_NEW_SHEET -- All the input docs will be combined together
74 * into one output document, and the first impression of each input doc will
75 * always start on a new media sheet. The specified page ranges of that output
76 * document will be printed.
77 *
78 * <LI>
79 * SEPARATE_DOCUMENTS_UNCOLLATED_COPIES -- For each separate input doc, the
80 * specified page ranges will be printed.
81 *
82 * <LI>
83 * SEPARATE_DOCUMENTS_COLLATED_COPIES -- For each separate input doc, the
84 * specified page ranges will be printed.
85 * </UL>
86 * <UL>
87 * <LI>
88 * SEPARATE_DOCUMENTS_UNCOLLATED_COPIES -- For each separate input doc, its own
89 * specified page ranges will be printed..
90 *
91 * <LI>
92 * SEPARATE_DOCUMENTS_COLLATED_COPIES -- For each separate input doc, its own
93 * specified page ranges will be printed..
94 * </UL>
95 * </UL>
96 * <P>
97 * <B>IPP Compatibility:</B> The PageRanges attribute's canonical array form
98 * gives the lower and upper bound for each range of pages to be included in
99 * and IPP "page-ranges" attribute. See class {@link
100 * javax.print.attribute.SetOfIntegerSyntax SetOfIntegerSyntax} for an
101 * explanation of canonical array form. The category name returned by
102 * <CODE>getName()</CODE> gives the IPP attribute name.
103 *
104 * @author David Mendenhall
105 * @author Alan Kaminsky
106 */
107 public final class PageRanges extends SetOfIntegerSyntax
108 implements DocAttribute, PrintRequestAttribute, PrintJobAttribute {
109
110 private static final long serialVersionUID = 8639895197656148392L;
111
112
113 /**
114 * Construct a new page ranges attribute with the given members. The
115 * members are specified in "array form;" see class {@link
116 * javax.print.attribute.SetOfIntegerSyntax SetOfIntegerSyntax} for an
117 * explanation of array form.
118 *
119 * @param members Set members in array form.
120 *
121 * @exception NullPointerException
122 * (unchecked exception) Thrown if <CODE>members</CODE> is null or
|