jdk/src/share/classes/javax/print/attribute/standard/MultipleDocumentHandling.java
author ohair
Tue, 25 May 2010 15:58:33 -0700
changeset 5506 202f599c92aa
parent 2 90ce3da70b43
child 20451 4cedf4e1560a
permissions -rw-r--r--
6943119: Rebrand source copyright notices Reviewed-by: darcy, weijun
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     2
 * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
package javax.print.attribute.standard;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
import javax.print.attribute.Attribute;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
import javax.print.attribute.EnumSyntax;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
import javax.print.attribute.PrintRequestAttribute;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
import javax.print.attribute.PrintJobAttribute;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
 * Class MultipleDocumentHandling is a printing attribute class, an enumeration,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
 * that controls finishing operations and the placement of one or more
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
 * print-stream pages into impressions and onto media sheets. When the value of
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
 * the {@link Copies Copies} attribute exceeds 1, MultipleDocumentHandling also
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
 * controls the order in which the copies that result from processing the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
 * documents are produced. This attribute is relevant only for a multidoc print
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
 * job consisting of two or more individual docs.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
 * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
 * Briefly, MultipleDocumentHandling determines the relationship between the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
 * multiple input (electronic) documents fed into a multidoc print job and the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
 * output (physical) document or documents produced by the multidoc print job.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
 * There are two possibilities:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
 * <UL>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
 * <LI>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
 * The multiple input documents are combined into a single output document.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
 * Finishing operations ({@link Finishings Finishings}),
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
 * are performed on this single output
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
 * document. The {@link Copies Copies} attribute tells how many copies of this
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
 * single output document to produce. The MultipleDocumentHandling values
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
 * SINGLE_DOCUMENT and SINGLE_DOCUMENT_NEW_SHEET specify two variations of
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
 * this  possibility.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
 * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
 * <LI>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
 * The multiple input documents remain separate output documents. Finishing
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
 * operations ({@link Finishings Finishings}),
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
 * are performed on each output document
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
 * separately. The {@link Copies Copies} attribute tells how many copies of each
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
 * separate output document to produce. The MultipleDocumentHandling values
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
 * SEPARATE_DOCUMENTS_UNCOLLATED_COPIES and SEPARATE_DOCUMENTS_COLLATED_COPIES
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
 * specify two variations of this possibility.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
 * </UL>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
 * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
 * In the detailed explanations below, if "<CODE>a</CODE>" represents an
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
 * instance of document data, then the result of processing the data in
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
 * document "<CODE>a</CODE>" is a sequence of media sheets represented by
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
 * "<CODE>a(*)</CODE>".
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
 * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
 * The standard MultipleDocumentHandling values are:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
 * <UL>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
 * <LI>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
 * <A NAME="sdfi">{@link #SINGLE_DOCUMENT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
 * <B><CODE>SINGLE_DOCUMENT</CODE></B>}</A>. If a print job has multiple
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
 * documents -- say, the document data is called <CODE>a</CODE> and
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
 * <CODE>b</CODE> -- then the result of processing all the document data
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
 * (<CODE>a</CODE> and then <CODE>b</CODE>) must be treated as a single sequence
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
 * of media sheets for finishing operations; that is, finishing would be
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
 * performed on the concatenation of the sequences <CODE>a(*),b(*)</CODE>. The
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
 * printer must not force the data in each document instance to be formatted
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
 * onto a new print-stream page, nor to start a new impression on a new media
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
 * sheet. If more than one copy is made, the ordering of the sets of media
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
 * sheets resulting from processing the document data must be
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
 * <CODE>a(*),b(*),a(*),b(*),...</CODE>, and the printer object must force
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
 * each copy (<CODE>a(*),b(*)</CODE>) to start on a new media sheet.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
 * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
 * <LI>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
 * <A NAME="sducfi">{@link #SEPARATE_DOCUMENTS_UNCOLLATED_COPIES
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
 * <B><CODE>SEPARATE_DOCUMENTS_UNCOLLATED_COPIES</CODE></B>}</A>. If a print job
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
 * has multiple documents -- say, the document data is called <CODE>a</CODE> and
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
 * <CODE>b</CODE> -- then the result of processing the data in each document
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
 * instance must be treated as a single sequence of media sheets for finishing
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
 * operations; that is, the sets <CODE>a(*)</CODE> and <CODE>b(*)</CODE> would
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
 * each be finished separately. The printer must force each copy of the result
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
 * of processing the data in a single document to start on a new media sheet.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
 * If more than one copy is made, the ordering of the sets of media sheets
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
 * resulting from processing the document data must be
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
 * <CODE>a(*),a(*),...,b(*),b(*)...</CODE>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
 * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
 * <LI>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
 * <A NAME="sdccfi">{@link #SEPARATE_DOCUMENTS_COLLATED_COPIES
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
 * <B><CODE>SEPARATE_DOCUMENTS_COLLATED_COPIES</CODE></B>}</A>. If a print job
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
 * has multiple documents -- say, the document data is called <CODE>a</CODE> and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
 * <CODE>b</CODE> -- then the result of processing the data in each document
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
 * instance must be treated as a single sequence of media sheets for finishing
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
 * operations; that is, the sets <CODE>a(*)</CODE> and <CODE>b(*)</CODE> would
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
 * each be finished separately. The printer must force each copy of the result
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
 * of processing the data in a single document to start on a new media sheet.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
 * If more than one copy is made, the ordering of the sets of media sheets
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
 * resulting from processing the document data must be
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
 * <CODE>a(*),b(*),a(*),b(*),...</CODE>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
 * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
 * <LI>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
 * <A NAME="sdnsfi">{@link #SINGLE_DOCUMENT_NEW_SHEET
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
 * <B><CODE>SINGLE_DOCUMENT_NEW_SHEET</CODE></B>}</A>. Same as SINGLE_DOCUMENT,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
 * except that the printer must ensure that the first impression of each
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
 * document instance in the job is placed on a new media sheet. This value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
 * allows multiple documents to be stapled together with a single staple where
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
 * each document starts on a new sheet.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
 * </UL>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
 * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
 * SINGLE_DOCUMENT is the same as SEPARATE_DOCUMENTS_COLLATED_COPIES with
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
 * respect to ordering of print-stream pages, but not media sheet generation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
 * since SINGLE_DOCUMENT will put the first page of the next document on the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
 * back side of a sheet if an odd number of pages have been produced so far
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
 * for the job, while SEPARATE_DOCUMENTS_COLLATED_COPIES always forces the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
 * next document or document copy on to a new sheet.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
 * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
 * In addition, if a {@link Finishings Finishings} attribute of
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
 * {@link Finishings#STAPLE <CODE>STAPLE</CODE>} is specified, then:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
 * <UL>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
 * <LI>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
 * With SINGLE_DOCUMENT, documents <CODE>a</CODE> and <CODE>b</CODE> are
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
 * stapled together as a single document with no regard to new sheets.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
 * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
 * <LI>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
 * With SINGLE_DOCUMENT_NEW_SHEET, documents <CODE>a</CODE> and <CODE>b</CODE>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
 * are stapled together as a single document, but document <CODE>b</CODE>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
 * starts on a new sheet.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
 * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
 * <LI>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
 * With SEPARATE_DOCUMENTS_UNCOLLATED_COPIES and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
 * SEPARATE_DOCUMENTS_COLLATED_COPIES, documents <CODE>a</CODE> and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
 * <CODE>b</CODE> are stapled separately.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
 * </UL>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
 * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
 * <I>Note:</I> None of these values provide means to produce uncollated
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
 * sheets within a document, i.e., where multiple copies of sheet <I>n</I>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
 * are produced before sheet <I>n</I>+1 of the same document.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
 * To specify that, see the {@link SheetCollate SheetCollate} attribute.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
 * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
 * <B>IPP Compatibility:</B> The category name returned by
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
 * <CODE>getName()</CODE> is the IPP attribute name.  The enumeration's
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
 * integer value is the IPP enum value.  The <code>toString()</code> method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
 * returns the IPP string representation of the attribute value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
 * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
 * @see  Copies
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
 * @see  Finishings
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
 * @see  NumberUp
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
 * @see  PageRanges
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
 * @see  SheetCollate
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
 * @see  Sides
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
 * @author  David Mendenhall
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
 * @author  Alan Kaminsky
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
public class MultipleDocumentHandling extends EnumSyntax
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
    implements PrintRequestAttribute, PrintJobAttribute {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
    private static final long serialVersionUID = 8098326460746413466L;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
     * Single document -- see above for <A HREF="#sdfi">further
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
     * information</A>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
    public static final MultipleDocumentHandling
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
        SINGLE_DOCUMENT = new MultipleDocumentHandling (0);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
     * Separate documents uncollated copies -- see above for
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
     * <A HREF="#sducfi">further information</A>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
    public static final MultipleDocumentHandling
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
       SEPARATE_DOCUMENTS_UNCOLLATED_COPIES = new MultipleDocumentHandling (1);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
     * Separate documents collated copies -- see above for
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
     * <A HREF="#sdccfi">further information</A>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
    public static final MultipleDocumentHandling
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
        SEPARATE_DOCUMENTS_COLLATED_COPIES = new MultipleDocumentHandling (2);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
     * Single document new sheet -- see above for
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
     * <A HREF="#sdnsfi">further information</A>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
    public static final MultipleDocumentHandling
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
        SINGLE_DOCUMENT_NEW_SHEET = new MultipleDocumentHandling (3);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
     * Construct a new multiple document handling enumeration value with the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
     * given integer value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
     * @param  value  Integer value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
    protected MultipleDocumentHandling(int value) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
        super (value);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
    private static final String[] myStringTable = {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
        "single-document",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
        "separate-documents-uncollated-copies",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
        "separate-documents-collated-copies",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
        "single-document-new-sheet"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
    };
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
    private static final MultipleDocumentHandling[] myEnumValueTable = {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
        SINGLE_DOCUMENT,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
        SEPARATE_DOCUMENTS_UNCOLLATED_COPIES,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
        SEPARATE_DOCUMENTS_COLLATED_COPIES,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
        SINGLE_DOCUMENT_NEW_SHEET
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
    };
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
     * Returns the string table for class MultipleDocumentHandling.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
    protected String[] getStringTable() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
        return (String[])myStringTable.clone();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
     * Returns the enumeration value table for class MultipleDocumentHandling.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
    protected EnumSyntax[] getEnumValueTable() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
        return (EnumSyntax[])myEnumValueTable.clone();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
     * Get the printing attribute class which is to be used as the "category"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
     * for this printing attribute value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
     * For class MultipleDocumentHandling and any vendor-defined subclasses,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
     * the category is class MultipleDocumentHandling itself.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
     * @return  Printing attribute class (category), an instance of class
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
     *          {@link java.lang.Class java.lang.Class}.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
    public final Class<? extends Attribute> getCategory() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
        return MultipleDocumentHandling.class;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
     * Get the name of the category of which this attribute value is an
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
     * instance.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
     * For class MultipleDocumentHandling and any vendor-defined subclasses,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
     * the category name is <CODE>"multiple-document-handling"</CODE>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
     * @return  Attribute category name.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
    public final String getName() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
        return "multiple-document-handling";
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
}