jdk/src/share/classes/java/awt/PageAttributes.java
author sherman
Tue, 30 Aug 2011 11:53:11 -0700
changeset 10419 12c063b39232
parent 5506 202f599c92aa
child 21777 c0a423e43b0d
permissions -rw-r--r--
7084245: Update usages of InternalError to use exception chaining Summary: to use new InternalError constructor with cause chainning Reviewed-by: alanb, ksrini, xuelei, neugens Contributed-by: sebastian.sickelmann@gmx.de
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) 1999, 2006, 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
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
package java.awt;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
import java.util.Locale;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
 * A set of attributes which control the output of a printed page.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
 * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
 * Instances of this class control the color state, paper size (media type),
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
 * orientation, logical origin, print quality, and resolution of every
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
 * page which uses the instance. Attribute names are compliant with the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
 * Internet Printing Protocol (IPP) 1.1 where possible. Attribute values
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
 * are partially compliant where possible.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
 * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
 * To use a method which takes an inner class type, pass a reference to
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
 * one of the constant fields of the inner class. Client code cannot create
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
 * new instances of the inner class types because none of those classes
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
 * has a public constructor. For example, to set the color state to
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
 * monochrome, use the following code:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
 * <pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
 * import java.awt.PageAttributes;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
 * public class MonochromeExample {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
 *     public void setMonochrome(PageAttributes pageAttributes) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
 *         pageAttributes.setColor(PageAttributes.ColorType.MONOCHROME);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
 *     }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
 * }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
 * </pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
 * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
 * Every IPP attribute which supports an <i>attributeName</i>-default value
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
 * has a corresponding <code>set<i>attributeName</i>ToDefault</code> method.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
 * Default value fields are not provided.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
 * @author      David Mendenhall
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
 * @since 1.3
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
public final class PageAttributes implements Cloneable {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
     * A type-safe enumeration of possible color states.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
     * @since 1.3
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
    public static final class ColorType extends AttributeValue {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
        private static final int I_COLOR = 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
        private static final int I_MONOCHROME = 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
        private static final String NAMES[] = {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
            "color", "monochrome"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
        };
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
         * The ColorType instance to use for specifying color printing.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
        public static final ColorType COLOR = new ColorType(I_COLOR);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
         * The ColorType instance to use for specifying monochrome printing.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
        public static final ColorType MONOCHROME = new ColorType(I_MONOCHROME);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
        private ColorType(int type) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
            super(type, NAMES);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
     * A type-safe enumeration of possible paper sizes. These sizes are in
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
     * compliance with IPP 1.1.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
     * @since 1.3
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
    public static final class MediaType extends AttributeValue {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
        private static final int I_ISO_4A0 = 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
        private static final int I_ISO_2A0 = 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
        private static final int I_ISO_A0 = 2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
        private static final int I_ISO_A1 = 3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
        private static final int I_ISO_A2 = 4;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
        private static final int I_ISO_A3 = 5;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
        private static final int I_ISO_A4 = 6;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
        private static final int I_ISO_A5 = 7;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
        private static final int I_ISO_A6 = 8;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
        private static final int I_ISO_A7 = 9;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
        private static final int I_ISO_A8 = 10;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
        private static final int I_ISO_A9 = 11;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
        private static final int I_ISO_A10 = 12;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
        private static final int I_ISO_B0 = 13;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
        private static final int I_ISO_B1 = 14;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
        private static final int I_ISO_B2 = 15;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
        private static final int I_ISO_B3 = 16;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
        private static final int I_ISO_B4 = 17;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
        private static final int I_ISO_B5 = 18;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
        private static final int I_ISO_B6 = 19;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
        private static final int I_ISO_B7 = 20;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
        private static final int I_ISO_B8 = 21;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
        private static final int I_ISO_B9 = 22;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
        private static final int I_ISO_B10 = 23;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
        private static final int I_JIS_B0 = 24;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
        private static final int I_JIS_B1 = 25;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
        private static final int I_JIS_B2 = 26;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
        private static final int I_JIS_B3 = 27;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
        private static final int I_JIS_B4 = 28;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
        private static final int I_JIS_B5 = 29;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
        private static final int I_JIS_B6 = 30;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
        private static final int I_JIS_B7 = 31;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
        private static final int I_JIS_B8 = 32;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
        private static final int I_JIS_B9 = 33;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
        private static final int I_JIS_B10 = 34;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
        private static final int I_ISO_C0 = 35;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
        private static final int I_ISO_C1 = 36;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
        private static final int I_ISO_C2 = 37;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
        private static final int I_ISO_C3 = 38;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
        private static final int I_ISO_C4 = 39;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
        private static final int I_ISO_C5 = 40;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
        private static final int I_ISO_C6 = 41;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
        private static final int I_ISO_C7 = 42;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
        private static final int I_ISO_C8 = 43;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
        private static final int I_ISO_C9 = 44;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
        private static final int I_ISO_C10 = 45;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
        private static final int I_ISO_DESIGNATED_LONG = 46;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
        private static final int I_EXECUTIVE = 47;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
        private static final int I_FOLIO = 48;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
        private static final int I_INVOICE = 49;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
        private static final int I_LEDGER = 50;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
        private static final int I_NA_LETTER = 51;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
        private static final int I_NA_LEGAL = 52;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
        private static final int I_QUARTO = 53;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
        private static final int I_A = 54;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
        private static final int I_B = 55;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
        private static final int I_C = 56;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
        private static final int I_D = 57;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
        private static final int I_E = 58;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
        private static final int I_NA_10X15_ENVELOPE = 59;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
        private static final int I_NA_10X14_ENVELOPE = 60;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
        private static final int I_NA_10X13_ENVELOPE = 61;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
        private static final int I_NA_9X12_ENVELOPE = 62;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
        private static final int I_NA_9X11_ENVELOPE = 63;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
        private static final int I_NA_7X9_ENVELOPE = 64;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
        private static final int I_NA_6X9_ENVELOPE = 65;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
        private static final int I_NA_NUMBER_9_ENVELOPE = 66;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
        private static final int I_NA_NUMBER_10_ENVELOPE = 67;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
        private static final int I_NA_NUMBER_11_ENVELOPE = 68;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
        private static final int I_NA_NUMBER_12_ENVELOPE = 69;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
        private static final int I_NA_NUMBER_14_ENVELOPE = 70;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
        private static final int I_INVITE_ENVELOPE = 71;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
        private static final int I_ITALY_ENVELOPE = 72;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
        private static final int I_MONARCH_ENVELOPE = 73;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
        private static final int I_PERSONAL_ENVELOPE = 74;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
        private static final String NAMES[] = {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
            "iso-4a0", "iso-2a0", "iso-a0", "iso-a1", "iso-a2", "iso-a3",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
            "iso-a4", "iso-a5", "iso-a6", "iso-a7", "iso-a8", "iso-a9",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
            "iso-a10", "iso-b0", "iso-b1", "iso-b2", "iso-b3", "iso-b4",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
            "iso-b5", "iso-b6", "iso-b7", "iso-b8", "iso-b9", "iso-b10",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
            "jis-b0", "jis-b1", "jis-b2", "jis-b3", "jis-b4", "jis-b5",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
            "jis-b6", "jis-b7", "jis-b8", "jis-b9", "jis-b10", "iso-c0",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
            "iso-c1", "iso-c2", "iso-c3", "iso-c4", "iso-c5", "iso-c6",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
            "iso-c7", "iso-c8", "iso-c9", "iso-c10", "iso-designated-long",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
            "executive", "folio", "invoice", "ledger", "na-letter", "na-legal",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
            "quarto", "a", "b", "c", "d", "e", "na-10x15-envelope",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
            "na-10x14-envelope", "na-10x13-envelope", "na-9x12-envelope",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
            "na-9x11-envelope", "na-7x9-envelope", "na-6x9-envelope",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
            "na-number-9-envelope", "na-number-10-envelope",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
            "na-number-11-envelope", "na-number-12-envelope",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
            "na-number-14-envelope", "invite-envelope", "italy-envelope",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
            "monarch-envelope", "personal-envelope"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
        };
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
         * The MediaType instance for ISO/DIN & JIS 4A0, 1682 x 2378 mm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
        public static final MediaType ISO_4A0 = new MediaType(I_ISO_4A0);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
         * The MediaType instance for ISO/DIN & JIS 2A0, 1189 x 1682 mm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
        public static final MediaType ISO_2A0 = new MediaType(I_ISO_2A0);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
         * The MediaType instance for ISO/DIN & JIS A0, 841 x 1189 mm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
        public static final MediaType ISO_A0 = new MediaType(I_ISO_A0);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
         * The MediaType instance for ISO/DIN & JIS A1, 594 x 841 mm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
        public static final MediaType ISO_A1 = new MediaType(I_ISO_A1);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
         * The MediaType instance for ISO/DIN & JIS A2, 420 x 594 mm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
        public static final MediaType ISO_A2 = new MediaType(I_ISO_A2);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
         * The MediaType instance for ISO/DIN & JIS A3, 297 x 420 mm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
        public static final MediaType ISO_A3 = new MediaType(I_ISO_A3);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
         * The MediaType instance for ISO/DIN & JIS A4, 210 x 297 mm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
        public static final MediaType ISO_A4 = new MediaType(I_ISO_A4);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
         * The MediaType instance for ISO/DIN & JIS A5, 148 x 210 mm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
        public static final MediaType ISO_A5 = new MediaType(I_ISO_A5);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
         * The MediaType instance for ISO/DIN & JIS A6, 105 x 148 mm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
        public static final MediaType ISO_A6 = new MediaType(I_ISO_A6);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
         * The MediaType instance for ISO/DIN & JIS A7, 74 x 105 mm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
        public static final MediaType ISO_A7 = new MediaType(I_ISO_A7);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
         * The MediaType instance for ISO/DIN & JIS A8, 52 x 74 mm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
        public static final MediaType ISO_A8 = new MediaType(I_ISO_A8);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
         * The MediaType instance for ISO/DIN & JIS A9, 37 x 52 mm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
        public static final MediaType ISO_A9 = new MediaType(I_ISO_A9);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
         * The MediaType instance for ISO/DIN & JIS A10, 26 x 37 mm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
        public static final MediaType ISO_A10 = new MediaType(I_ISO_A10);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
         * The MediaType instance for ISO/DIN B0, 1000 x 1414 mm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
        public static final MediaType ISO_B0 = new MediaType(I_ISO_B0);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
         * The MediaType instance for ISO/DIN B1, 707 x 1000 mm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
        public static final MediaType ISO_B1 = new MediaType(I_ISO_B1);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
         * The MediaType instance for ISO/DIN B2, 500 x 707 mm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
        public static final MediaType ISO_B2 = new MediaType(I_ISO_B2);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
         * The MediaType instance for ISO/DIN B3, 353 x 500 mm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
        public static final MediaType ISO_B3 = new MediaType(I_ISO_B3);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
         * The MediaType instance for ISO/DIN B4, 250 x 353 mm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
        public static final MediaType ISO_B4 = new MediaType(I_ISO_B4);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
         * The MediaType instance for ISO/DIN B5, 176 x 250 mm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
        public static final MediaType ISO_B5 = new MediaType(I_ISO_B5);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
         * The MediaType instance for ISO/DIN B6, 125 x 176 mm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
        public static final MediaType ISO_B6 = new MediaType(I_ISO_B6);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   269
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
         * The MediaType instance for ISO/DIN B7, 88 x 125 mm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
        public static final MediaType ISO_B7 = new MediaType(I_ISO_B7);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
         * The MediaType instance for ISO/DIN B8, 62 x 88 mm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   276
        public static final MediaType ISO_B8 = new MediaType(I_ISO_B8);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   277
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   278
         * The MediaType instance for ISO/DIN B9, 44 x 62 mm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   279
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   280
        public static final MediaType ISO_B9 = new MediaType(I_ISO_B9);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   281
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   282
         * The MediaType instance for ISO/DIN B10, 31 x 44 mm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   283
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   284
        public static final MediaType ISO_B10 = new MediaType(I_ISO_B10);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   285
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   286
         * The MediaType instance for JIS B0, 1030 x 1456 mm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   287
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   288
        public static final MediaType JIS_B0 = new MediaType(I_JIS_B0);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   289
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   290
         * The MediaType instance for JIS B1, 728 x 1030 mm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   291
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   292
        public static final MediaType JIS_B1 = new MediaType(I_JIS_B1);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   293
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   294
         * The MediaType instance for JIS B2, 515 x 728 mm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   295
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   296
        public static final MediaType JIS_B2 = new MediaType(I_JIS_B2);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   297
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   298
         * The MediaType instance for JIS B3, 364 x 515 mm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   299
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   300
        public static final MediaType JIS_B3 = new MediaType(I_JIS_B3);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   301
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   302
         * The MediaType instance for JIS B4, 257 x 364 mm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   303
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   304
        public static final MediaType JIS_B4 = new MediaType(I_JIS_B4);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   305
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   306
         * The MediaType instance for JIS B5, 182 x 257 mm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   307
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   308
        public static final MediaType JIS_B5 = new MediaType(I_JIS_B5);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   309
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   310
         * The MediaType instance for JIS B6, 128 x 182 mm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   311
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   312
        public static final MediaType JIS_B6 = new MediaType(I_JIS_B6);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   313
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   314
         * The MediaType instance for JIS B7, 91 x 128 mm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   315
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   316
        public static final MediaType JIS_B7 = new MediaType(I_JIS_B7);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   317
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   318
         * The MediaType instance for JIS B8, 64 x 91 mm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   319
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   320
        public static final MediaType JIS_B8 = new MediaType(I_JIS_B8);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   321
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   322
         * The MediaType instance for JIS B9, 45 x 64 mm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   323
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   324
        public static final MediaType JIS_B9 = new MediaType(I_JIS_B9);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   325
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   326
         * The MediaType instance for JIS B10, 32 x 45 mm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   327
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   328
        public static final MediaType JIS_B10 = new MediaType(I_JIS_B10);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   329
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   330
         * The MediaType instance for ISO/DIN C0, 917 x 1297 mm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   331
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   332
        public static final MediaType ISO_C0 = new MediaType(I_ISO_C0);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   333
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   334
         * The MediaType instance for ISO/DIN C1, 648 x 917 mm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   335
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   336
        public static final MediaType ISO_C1 = new MediaType(I_ISO_C1);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   337
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   338
         * The MediaType instance for ISO/DIN C2, 458 x 648 mm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   339
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   340
        public static final MediaType ISO_C2 = new MediaType(I_ISO_C2);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   341
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   342
         * The MediaType instance for ISO/DIN C3, 324 x 458 mm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   343
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   344
        public static final MediaType ISO_C3 = new MediaType(I_ISO_C3);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   345
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   346
         * The MediaType instance for ISO/DIN C4, 229 x 324 mm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   347
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   348
        public static final MediaType ISO_C4 = new MediaType(I_ISO_C4);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   349
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   350
         * The MediaType instance for ISO/DIN C5, 162 x 229 mm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   351
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   352
        public static final MediaType ISO_C5 = new MediaType(I_ISO_C5);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   353
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   354
         * The MediaType instance for ISO/DIN C6, 114 x 162 mm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   355
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   356
        public static final MediaType ISO_C6 = new MediaType(I_ISO_C6);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   357
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   358
         * The MediaType instance for ISO/DIN C7, 81 x 114 mm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   359
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   360
        public static final MediaType ISO_C7 = new MediaType(I_ISO_C7);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   361
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   362
         * The MediaType instance for ISO/DIN C8, 57 x 81 mm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   363
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   364
        public static final MediaType ISO_C8 = new MediaType(I_ISO_C8);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   365
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   366
         * The MediaType instance for ISO/DIN C9, 40 x 57 mm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   367
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   368
        public static final MediaType ISO_C9 = new MediaType(I_ISO_C9);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   369
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   370
         * The MediaType instance for ISO/DIN C10, 28 x 40 mm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   371
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   372
        public static final MediaType ISO_C10 = new MediaType(I_ISO_C10);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   373
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   374
         * The MediaType instance for ISO Designated Long, 110 x 220 mm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   375
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   376
        public static final MediaType ISO_DESIGNATED_LONG =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   377
            new MediaType(I_ISO_DESIGNATED_LONG);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   378
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   379
         * The MediaType instance for Executive, 7 1/4 x 10 1/2 in.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   380
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   381
        public static final MediaType EXECUTIVE = new MediaType(I_EXECUTIVE);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   382
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   383
         * The MediaType instance for Folio, 8 1/2 x 13 in.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   384
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   385
        public static final MediaType FOLIO = new MediaType(I_FOLIO);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   386
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   387
         * The MediaType instance for Invoice, 5 1/2 x 8 1/2 in.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   388
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   389
        public static final MediaType INVOICE = new MediaType(I_INVOICE);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   390
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   391
         * The MediaType instance for Ledger, 11 x 17 in.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   392
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   393
        public static final MediaType LEDGER = new MediaType(I_LEDGER);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   394
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   395
         * The MediaType instance for North American Letter, 8 1/2 x 11 in.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   396
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   397
        public static final MediaType NA_LETTER = new MediaType(I_NA_LETTER);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   398
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   399
         * The MediaType instance for North American Legal, 8 1/2 x 14 in.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   400
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   401
        public static final MediaType NA_LEGAL = new MediaType(I_NA_LEGAL);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   402
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   403
         * The MediaType instance for Quarto, 215 x 275 mm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   404
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   405
        public static final MediaType QUARTO = new MediaType(I_QUARTO);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   406
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   407
         * The MediaType instance for Engineering A, 8 1/2 x 11 in.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   408
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   409
        public static final MediaType A = new MediaType(I_A);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   410
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   411
         * The MediaType instance for Engineering B, 11 x 17 in.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   412
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   413
        public static final MediaType B = new MediaType(I_B);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   414
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   415
         * The MediaType instance for Engineering C, 17 x 22 in.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   416
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   417
        public static final MediaType C = new MediaType(I_C);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   418
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   419
         * The MediaType instance for Engineering D, 22 x 34 in.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   420
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   421
        public static final MediaType D = new MediaType(I_D);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   422
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   423
         * The MediaType instance for Engineering E, 34 x 44 in.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   424
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   425
        public static final MediaType E = new MediaType(I_E);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   426
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   427
         * The MediaType instance for North American 10 x 15 in.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   428
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   429
        public static final MediaType NA_10X15_ENVELOPE =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   430
            new MediaType(I_NA_10X15_ENVELOPE);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   431
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   432
         * The MediaType instance for North American 10 x 14 in.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   433
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   434
        public static final MediaType NA_10X14_ENVELOPE =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   435
            new MediaType(I_NA_10X14_ENVELOPE);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   436
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   437
         * The MediaType instance for North American 10 x 13 in.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   438
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   439
        public static final MediaType NA_10X13_ENVELOPE =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   440
            new MediaType(I_NA_10X13_ENVELOPE);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   441
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   442
         * The MediaType instance for North American 9 x 12 in.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   443
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   444
        public static final MediaType NA_9X12_ENVELOPE =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   445
            new MediaType(I_NA_9X12_ENVELOPE);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   446
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   447
         * The MediaType instance for North American 9 x 11 in.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   448
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   449
        public static final MediaType NA_9X11_ENVELOPE =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   450
            new MediaType(I_NA_9X11_ENVELOPE);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   451
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   452
         * The MediaType instance for North American 7 x 9 in.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   453
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   454
        public static final MediaType NA_7X9_ENVELOPE =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   455
            new MediaType(I_NA_7X9_ENVELOPE);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   456
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   457
         * The MediaType instance for North American 6 x 9 in.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   458
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   459
        public static final MediaType NA_6X9_ENVELOPE =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   460
            new MediaType(I_NA_6X9_ENVELOPE);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   461
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   462
         * The MediaType instance for North American #9 Business Envelope,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   463
         * 3 7/8 x 8 7/8 in.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   464
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   465
        public static final MediaType NA_NUMBER_9_ENVELOPE =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   466
            new MediaType(I_NA_NUMBER_9_ENVELOPE);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   467
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   468
         * The MediaType instance for North American #10 Business Envelope,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   469
         * 4 1/8 x 9 1/2 in.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   470
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   471
        public static final MediaType NA_NUMBER_10_ENVELOPE =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   472
            new MediaType(I_NA_NUMBER_10_ENVELOPE);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   473
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   474
         * The MediaType instance for North American #11 Business Envelope,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   475
         * 4 1/2 x 10 3/8 in.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   476
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   477
        public static final MediaType NA_NUMBER_11_ENVELOPE =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   478
            new MediaType(I_NA_NUMBER_11_ENVELOPE);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   479
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   480
         * The MediaType instance for North American #12 Business Envelope,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   481
         * 4 3/4 x 11 in.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   482
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   483
        public static final MediaType NA_NUMBER_12_ENVELOPE =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   484
            new MediaType(I_NA_NUMBER_12_ENVELOPE);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   485
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   486
         * The MediaType instance for North American #14 Business Envelope,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   487
         * 5 x 11 1/2 in.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   488
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   489
        public static final MediaType NA_NUMBER_14_ENVELOPE =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   490
            new MediaType(I_NA_NUMBER_14_ENVELOPE);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   491
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   492
         * The MediaType instance for Invitation Envelope, 220 x 220 mm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   493
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   494
        public static final MediaType INVITE_ENVELOPE =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   495
            new MediaType(I_INVITE_ENVELOPE);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   496
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   497
         * The MediaType instance for Italy Envelope, 110 x 230 mm.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   498
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   499
        public static final MediaType ITALY_ENVELOPE =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   500
            new MediaType(I_ITALY_ENVELOPE);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   501
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   502
         * The MediaType instance for Monarch Envelope, 3 7/8 x 7 1/2 in.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   503
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   504
        public static final MediaType MONARCH_ENVELOPE =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   505
            new MediaType(I_MONARCH_ENVELOPE);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   506
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   507
         * The MediaType instance for 6 3/4 envelope, 3 5/8 x 6 1/2 in.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   508
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   509
        public static final MediaType PERSONAL_ENVELOPE =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   510
            new MediaType(I_PERSONAL_ENVELOPE);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   511
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   512
         * An alias for ISO_A0.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   513
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   514
        public static final MediaType A0 = ISO_A0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   515
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   516
         * An alias for ISO_A1.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   517
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   518
        public static final MediaType A1 = ISO_A1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   519
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   520
         * An alias for ISO_A2.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   521
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   522
        public static final MediaType A2 = ISO_A2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   523
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   524
         * An alias for ISO_A3.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   525
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   526
        public static final MediaType A3 = ISO_A3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   527
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   528
         * An alias for ISO_A4.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   529
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   530
        public static final MediaType A4 = ISO_A4;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   531
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   532
         * An alias for ISO_A5.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   533
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   534
        public static final MediaType A5 = ISO_A5;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   535
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   536
         * An alias for ISO_A6.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   537
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   538
        public static final MediaType A6 = ISO_A6;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   539
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   540
         * An alias for ISO_A7.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   541
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   542
        public static final MediaType A7 = ISO_A7;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   543
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   544
         * An alias for ISO_A8.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   545
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   546
        public static final MediaType A8 = ISO_A8;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   547
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   548
         * An alias for ISO_A9.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   549
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   550
        public static final MediaType A9 = ISO_A9;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   551
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   552
         * An alias for ISO_A10.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   553
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   554
        public static final MediaType A10 = ISO_A10;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   555
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   556
         * An alias for ISO_B0.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   557
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   558
        public static final MediaType B0 = ISO_B0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   559
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   560
         * An alias for ISO_B1.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   561
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   562
        public static final MediaType B1 = ISO_B1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   563
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   564
         * An alias for ISO_B2.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   565
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   566
        public static final MediaType B2 = ISO_B2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   567
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   568
         * An alias for ISO_B3.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   569
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   570
        public static final MediaType B3 = ISO_B3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   571
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   572
         * An alias for ISO_B4.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   573
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   574
        public static final MediaType B4 = ISO_B4;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   575
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   576
         * An alias for ISO_B4.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   577
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   578
        public static final MediaType ISO_B4_ENVELOPE = ISO_B4;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   579
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   580
         * An alias for ISO_B5.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   581
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   582
        public static final MediaType B5 = ISO_B5;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   583
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   584
         * An alias for ISO_B5.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   585
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   586
        public static final MediaType ISO_B5_ENVELOPE = ISO_B5;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   587
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   588
         * An alias for ISO_B6.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   589
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   590
        public static final MediaType B6 = ISO_B6;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   591
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   592
         * An alias for ISO_B7.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   593
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   594
        public static final MediaType B7 = ISO_B7;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   595
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   596
         * An alias for ISO_B8.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   597
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   598
        public static final MediaType B8 = ISO_B8;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   599
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   600
         * An alias for ISO_B9.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   601
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   602
        public static final MediaType B9 = ISO_B9;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   603
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   604
         * An alias for ISO_B10.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   605
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   606
        public static final MediaType B10 = ISO_B10;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   607
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   608
         * An alias for ISO_C0.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   609
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   610
        public static final MediaType C0 = ISO_C0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   611
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   612
         * An alias for ISO_C0.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   613
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   614
        public static final MediaType ISO_C0_ENVELOPE = ISO_C0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   615
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   616
         * An alias for ISO_C1.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   617
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   618
        public static final MediaType C1 = ISO_C1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   619
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   620
         * An alias for ISO_C1.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   621
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   622
        public static final MediaType ISO_C1_ENVELOPE = ISO_C1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   623
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   624
         * An alias for ISO_C2.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   625
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   626
        public static final MediaType C2 = ISO_C2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   627
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   628
         * An alias for ISO_C2.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   629
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   630
        public static final MediaType ISO_C2_ENVELOPE = ISO_C2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   631
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   632
         * An alias for ISO_C3.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   633
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   634
        public static final MediaType C3 = ISO_C3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   635
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   636
         * An alias for ISO_C3.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   637
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   638
        public static final MediaType ISO_C3_ENVELOPE = ISO_C3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   639
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   640
         * An alias for ISO_C4.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   641
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   642
        public static final MediaType C4 = ISO_C4;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   643
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   644
         * An alias for ISO_C4.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   645
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   646
        public static final MediaType ISO_C4_ENVELOPE = ISO_C4;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   647
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   648
         * An alias for ISO_C5.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   649
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   650
        public static final MediaType C5 = ISO_C5;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   651
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   652
         * An alias for ISO_C5.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   653
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   654
        public static final MediaType ISO_C5_ENVELOPE = ISO_C5;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   655
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   656
         * An alias for ISO_C6.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   657
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   658
        public static final MediaType C6 = ISO_C6;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   659
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   660
         * An alias for ISO_C6.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   661
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   662
        public static final MediaType ISO_C6_ENVELOPE = ISO_C6;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   663
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   664
         * An alias for ISO_C7.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   665
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   666
        public static final MediaType C7 = ISO_C7;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   667
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   668
         * An alias for ISO_C7.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   669
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   670
        public static final MediaType ISO_C7_ENVELOPE = ISO_C7;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   671
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   672
         * An alias for ISO_C8.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   673
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   674
        public static final MediaType C8 = ISO_C8;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   675
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   676
         * An alias for ISO_C8.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   677
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   678
        public static final MediaType ISO_C8_ENVELOPE = ISO_C8;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   679
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   680
         * An alias for ISO_C9.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   681
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   682
        public static final MediaType C9 = ISO_C9;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   683
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   684
         * An alias for ISO_C9.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   685
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   686
        public static final MediaType ISO_C9_ENVELOPE = ISO_C9;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   687
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   688
         * An alias for ISO_C10.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   689
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   690
        public static final MediaType C10 = ISO_C10;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   691
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   692
         * An alias for ISO_C10.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   693
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   694
        public static final MediaType ISO_C10_ENVELOPE = ISO_C10;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   695
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   696
         * An alias for ISO_DESIGNATED_LONG.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   697
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   698
        public static final MediaType ISO_DESIGNATED_LONG_ENVELOPE =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   699
                ISO_DESIGNATED_LONG;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   700
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   701
         * An alias for INVOICE.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   702
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   703
        public static final MediaType STATEMENT = INVOICE;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   704
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   705
         * An alias for LEDGER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   706
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   707
        public static final MediaType TABLOID = LEDGER;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   708
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   709
         * An alias for NA_LETTER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   710
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   711
        public static final MediaType LETTER = NA_LETTER;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   712
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   713
         * An alias for NA_LETTER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   714
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   715
        public static final MediaType NOTE = NA_LETTER;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   716
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   717
         * An alias for NA_LEGAL.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   718
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   719
        public static final MediaType LEGAL = NA_LEGAL;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   720
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   721
         * An alias for NA_10X15_ENVELOPE.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   722
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   723
        public static final MediaType ENV_10X15 = NA_10X15_ENVELOPE;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   724
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   725
         * An alias for NA_10X14_ENVELOPE.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   726
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   727
        public static final MediaType ENV_10X14 = NA_10X14_ENVELOPE;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   728
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   729
         * An alias for NA_10X13_ENVELOPE.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   730
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   731
        public static final MediaType ENV_10X13 = NA_10X13_ENVELOPE;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   732
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   733
         * An alias for NA_9X12_ENVELOPE.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   734
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   735
        public static final MediaType ENV_9X12 = NA_9X12_ENVELOPE;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   736
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   737
         * An alias for NA_9X11_ENVELOPE.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   738
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   739
        public static final MediaType ENV_9X11 = NA_9X11_ENVELOPE;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   740
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   741
         * An alias for NA_7X9_ENVELOPE.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   742
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   743
        public static final MediaType ENV_7X9 = NA_7X9_ENVELOPE;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   744
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   745
         * An alias for NA_6X9_ENVELOPE.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   746
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   747
        public static final MediaType ENV_6X9 = NA_6X9_ENVELOPE;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   748
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   749
         * An alias for NA_NUMBER_9_ENVELOPE.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   750
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   751
        public static final MediaType ENV_9 = NA_NUMBER_9_ENVELOPE;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   752
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   753
         * An alias for NA_NUMBER_10_ENVELOPE.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   754
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   755
        public static final MediaType ENV_10 = NA_NUMBER_10_ENVELOPE;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   756
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   757
         * An alias for NA_NUMBER_11_ENVELOPE.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   758
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   759
        public static final MediaType ENV_11 = NA_NUMBER_11_ENVELOPE;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   760
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   761
         * An alias for NA_NUMBER_12_ENVELOPE.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   762
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   763
        public static final MediaType ENV_12 = NA_NUMBER_12_ENVELOPE;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   764
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   765
         * An alias for NA_NUMBER_14_ENVELOPE.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   766
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   767
        public static final MediaType ENV_14 = NA_NUMBER_14_ENVELOPE;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   768
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   769
         * An alias for INVITE_ENVELOPE.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   770
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   771
        public static final MediaType ENV_INVITE = INVITE_ENVELOPE;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   772
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   773
         * An alias for ITALY_ENVELOPE.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   774
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   775
        public static final MediaType ENV_ITALY = ITALY_ENVELOPE;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   776
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   777
         * An alias for MONARCH_ENVELOPE.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   778
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   779
        public static final MediaType ENV_MONARCH = MONARCH_ENVELOPE;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   780
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   781
         * An alias for PERSONAL_ENVELOPE.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   782
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   783
        public static final MediaType ENV_PERSONAL = PERSONAL_ENVELOPE;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   784
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   785
         * An alias for INVITE_ENVELOPE.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   786
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   787
        public static final MediaType INVITE = INVITE_ENVELOPE;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   788
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   789
         * An alias for ITALY_ENVELOPE.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   790
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   791
        public static final MediaType ITALY = ITALY_ENVELOPE;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   792
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   793
         * An alias for MONARCH_ENVELOPE.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   794
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   795
        public static final MediaType MONARCH = MONARCH_ENVELOPE;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   796
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   797
         * An alias for PERSONAL_ENVELOPE.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   798
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   799
        public static final MediaType PERSONAL = PERSONAL_ENVELOPE;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   800
90ce3da70b43 Initial load
duke
parents:
diff changeset
   801
        private MediaType(int type) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   802
            super(type, NAMES);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   803
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   804
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   805
90ce3da70b43 Initial load
duke
parents:
diff changeset
   806
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   807
     * A type-safe enumeration of possible orientations. These orientations
90ce3da70b43 Initial load
duke
parents:
diff changeset
   808
     * are in partial compliance with IPP 1.1.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   809
     * @since 1.3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   810
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   811
    public static final class OrientationRequestedType extends AttributeValue {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   812
        private static final int I_PORTRAIT = 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   813
        private static final int I_LANDSCAPE = 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   814
90ce3da70b43 Initial load
duke
parents:
diff changeset
   815
        private static final String NAMES[] = {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   816
            "portrait", "landscape"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   817
        };
90ce3da70b43 Initial load
duke
parents:
diff changeset
   818
90ce3da70b43 Initial load
duke
parents:
diff changeset
   819
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   820
         * The OrientationRequestedType instance to use for specifying a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   821
         * portrait orientation.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   822
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   823
        public static final OrientationRequestedType PORTRAIT =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   824
            new OrientationRequestedType(I_PORTRAIT);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   825
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   826
         * The OrientationRequestedType instance to use for specifying a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   827
         * landscape orientation.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   828
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   829
        public static final OrientationRequestedType LANDSCAPE =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   830
            new OrientationRequestedType(I_LANDSCAPE);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   831
90ce3da70b43 Initial load
duke
parents:
diff changeset
   832
        private OrientationRequestedType(int type) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   833
            super(type, NAMES);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   834
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   835
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   836
90ce3da70b43 Initial load
duke
parents:
diff changeset
   837
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   838
     * A type-safe enumeration of possible origins.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   839
     * @since 1.3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   840
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   841
    public static final class OriginType extends AttributeValue {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   842
        private static final int I_PHYSICAL = 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   843
        private static final int I_PRINTABLE = 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   844
90ce3da70b43 Initial load
duke
parents:
diff changeset
   845
        private static final String NAMES[] = {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   846
            "physical", "printable"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   847
        };
90ce3da70b43 Initial load
duke
parents:
diff changeset
   848
90ce3da70b43 Initial load
duke
parents:
diff changeset
   849
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   850
         * The OriginType instance to use for specifying a physical origin.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   851
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   852
        public static final OriginType PHYSICAL = new OriginType(I_PHYSICAL);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   853
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   854
         * The OriginType instance to use for specifying a printable origin.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   855
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   856
        public static final OriginType PRINTABLE = new OriginType(I_PRINTABLE);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   857
90ce3da70b43 Initial load
duke
parents:
diff changeset
   858
        private OriginType(int type) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   859
            super(type, NAMES);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   860
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   861
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   862
90ce3da70b43 Initial load
duke
parents:
diff changeset
   863
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   864
     * A type-safe enumeration of possible print qualities. These print
90ce3da70b43 Initial load
duke
parents:
diff changeset
   865
     * qualities are in compliance with IPP 1.1.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   866
     * @since 1.3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   867
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   868
    public static final class PrintQualityType extends AttributeValue {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   869
        private static final int I_HIGH = 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   870
        private static final int I_NORMAL = 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   871
        private static final int I_DRAFT = 2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   872
90ce3da70b43 Initial load
duke
parents:
diff changeset
   873
        private static final String NAMES[] = {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   874
            "high", "normal", "draft"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   875
        };
90ce3da70b43 Initial load
duke
parents:
diff changeset
   876
90ce3da70b43 Initial load
duke
parents:
diff changeset
   877
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   878
         * The PrintQualityType instance to use for specifying a high print
90ce3da70b43 Initial load
duke
parents:
diff changeset
   879
         * quality.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   880
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   881
        public static final PrintQualityType HIGH =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   882
            new PrintQualityType(I_HIGH);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   883
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   884
         * The PrintQualityType instance to use for specifying a normal print
90ce3da70b43 Initial load
duke
parents:
diff changeset
   885
         * quality.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   886
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   887
        public static final PrintQualityType NORMAL =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   888
            new PrintQualityType(I_NORMAL);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   889
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   890
         * The PrintQualityType instance to use for specifying a draft print
90ce3da70b43 Initial load
duke
parents:
diff changeset
   891
         * quality.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   892
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   893
        public static final PrintQualityType DRAFT =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   894
            new PrintQualityType(I_DRAFT);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   895
90ce3da70b43 Initial load
duke
parents:
diff changeset
   896
        private PrintQualityType(int type) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   897
            super(type, NAMES);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   898
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   899
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   900
90ce3da70b43 Initial load
duke
parents:
diff changeset
   901
    private ColorType color;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   902
    private MediaType media;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   903
    private OrientationRequestedType orientationRequested;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   904
    private OriginType origin;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   905
    private PrintQualityType printQuality;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   906
    private int[] printerResolution;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   907
90ce3da70b43 Initial load
duke
parents:
diff changeset
   908
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   909
     * Constructs a PageAttributes instance with default values for every
90ce3da70b43 Initial load
duke
parents:
diff changeset
   910
     * attribute.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   911
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   912
    public PageAttributes() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   913
        setColor(ColorType.MONOCHROME);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   914
        setMediaToDefault();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   915
        setOrientationRequestedToDefault();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   916
        setOrigin(OriginType.PHYSICAL);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   917
        setPrintQualityToDefault();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   918
        setPrinterResolutionToDefault();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   919
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   920
90ce3da70b43 Initial load
duke
parents:
diff changeset
   921
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   922
     * Constructs a PageAttributes instance which is a copy of the supplied
90ce3da70b43 Initial load
duke
parents:
diff changeset
   923
     * PageAttributes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   924
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   925
     * @param   obj the PageAttributes to copy.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   926
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   927
    public PageAttributes(PageAttributes obj) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   928
        set(obj);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   929
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   930
90ce3da70b43 Initial load
duke
parents:
diff changeset
   931
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   932
     * Constructs a PageAttributes instance with the specified values for
90ce3da70b43 Initial load
duke
parents:
diff changeset
   933
     * every attribute.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   934
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   935
     * @param   color ColorType.COLOR or ColorType.MONOCHROME.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   936
     * @param   media one of the constant fields of the MediaType class.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   937
     * @param   orientationRequested OrientationRequestedType.PORTRAIT or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   938
     *          OrientationRequestedType.LANDSCAPE.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   939
     * @param   origin OriginType.PHYSICAL or OriginType.PRINTABLE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   940
     * @param   printQuality PrintQualityType.DRAFT, PrintQualityType.NORMAL,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   941
     *          or PrintQualityType.HIGH
90ce3da70b43 Initial load
duke
parents:
diff changeset
   942
     * @param   printerResolution an integer array of 3 elements. The first
90ce3da70b43 Initial load
duke
parents:
diff changeset
   943
     *          element must be greater than 0. The second element must be
90ce3da70b43 Initial load
duke
parents:
diff changeset
   944
     *          must be greater than 0. The third element must be either
90ce3da70b43 Initial load
duke
parents:
diff changeset
   945
     *          <code>3</code> or <code>4</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   946
     * @throws  IllegalArgumentException if one or more of the above
90ce3da70b43 Initial load
duke
parents:
diff changeset
   947
     *          conditions is violated.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   948
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   949
    public PageAttributes(ColorType color, MediaType media,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   950
                          OrientationRequestedType orientationRequested,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   951
                          OriginType origin, PrintQualityType printQuality,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   952
                          int[] printerResolution) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   953
        setColor(color);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   954
        setMedia(media);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   955
        setOrientationRequested(orientationRequested);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   956
        setOrigin(origin);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   957
        setPrintQuality(printQuality);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   958
        setPrinterResolution(printerResolution);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   959
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   960
90ce3da70b43 Initial load
duke
parents:
diff changeset
   961
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   962
     * Creates and returns a copy of this PageAttributes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   963
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   964
     * @return  the newly created copy. It is safe to cast this Object into
90ce3da70b43 Initial load
duke
parents:
diff changeset
   965
     *          a PageAttributes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   966
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   967
    public Object clone() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   968
        try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   969
            return super.clone();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   970
        } catch (CloneNotSupportedException e) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   971
            // Since we implement Cloneable, this should never happen
10419
12c063b39232 7084245: Update usages of InternalError to use exception chaining
sherman
parents: 5506
diff changeset
   972
            throw new InternalError(e);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   973
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   974
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   975
90ce3da70b43 Initial load
duke
parents:
diff changeset
   976
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   977
     * Sets all of the attributes of this PageAttributes to the same values as
90ce3da70b43 Initial load
duke
parents:
diff changeset
   978
     * the attributes of obj.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   979
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   980
     * @param   obj the PageAttributes to copy.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   981
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   982
    public void set(PageAttributes obj) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   983
        color = obj.color;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   984
        media = obj.media;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   985
        orientationRequested = obj.orientationRequested;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   986
        origin = obj.origin;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   987
        printQuality = obj.printQuality;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   988
        // okay because we never modify the contents of printerResolution
90ce3da70b43 Initial load
duke
parents:
diff changeset
   989
        printerResolution = obj.printerResolution;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   990
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   991
90ce3da70b43 Initial load
duke
parents:
diff changeset
   992
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   993
     * Returns whether pages using these attributes will be rendered in
90ce3da70b43 Initial load
duke
parents:
diff changeset
   994
     * color or monochrome. This attribute is updated to the value chosen
90ce3da70b43 Initial load
duke
parents:
diff changeset
   995
     * by the user.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   996
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   997
     * @return  ColorType.COLOR or ColorType.MONOCHROME.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   998
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   999
    public ColorType getColor() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1000
        return color;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1001
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1002
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1003
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1004
     * Specifies whether pages using these attributes will be rendered in
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1005
     * color or monochrome. Not specifying this attribute is equivalent to
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1006
     * specifying ColorType.MONOCHROME.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1007
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1008
     * @param   color ColorType.COLOR or ColorType.MONOCHROME.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1009
     * @throws  IllegalArgumentException if color is null.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1010
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1011
    public void setColor(ColorType color) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1012
        if (color == null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1013
            throw new IllegalArgumentException("Invalid value for attribute "+
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1014
                                               "color");
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1015
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1016
        this.color = color;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1017
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1018
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1019
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1020
     * Returns the paper size for pages using these attributes. This
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1021
     * attribute is updated to the value chosen by the user.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1022
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1023
     * @return  one of the constant fields of the MediaType class.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1024
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1025
    public MediaType getMedia() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1026
        return media;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1027
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1028
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1029
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1030
     * Specifies the desired paper size for pages using these attributes. The
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1031
     * actual paper size will be determined by the limitations of the target
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1032
     * printer. If an exact match cannot be found, an implementation will
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1033
     * choose the closest possible match. Not specifying this attribute is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1034
     * equivalent to specifying the default size for the default locale. The
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1035
     * default size for locales in the United States and Canada is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1036
     * MediaType.NA_LETTER. The default size for all other locales is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1037
     * MediaType.ISO_A4.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1038
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1039
     * @param   media one of the constant fields of the MediaType class.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1040
     * @throws  IllegalArgumentException if media is null.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1041
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1042
    public void setMedia(MediaType media) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1043
        if (media == null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1044
            throw new IllegalArgumentException("Invalid value for attribute "+
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1045
                                               "media");
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1046
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1047
        this.media = media;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1048
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1049
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1050
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1051
     * Sets the paper size for pages using these attributes to the default
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1052
     * size for the default locale. The default size for locales in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1053
     * United States and Canada is MediaType.NA_LETTER. The default size for
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1054
     * all other locales is MediaType.ISO_A4.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1055
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1056
    public void setMediaToDefault(){
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1057
        String defaultCountry = Locale.getDefault().getCountry();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1058
        if (defaultCountry != null &&
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1059
            (defaultCountry.equals(Locale.US.getCountry()) ||
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1060
             defaultCountry.equals(Locale.CANADA.getCountry()))) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1061
            setMedia(MediaType.NA_LETTER);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1062
        } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1063
            setMedia(MediaType.ISO_A4);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1064
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1065
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1066
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1067
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1068
     * Returns the print orientation for pages using these attributes. This
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1069
     * attribute is updated to the value chosen by the user.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1070
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1071
     * @return  OrientationRequestedType.PORTRAIT or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1072
     *          OrientationRequestedType.LANDSCAPE.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1073
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1074
    public OrientationRequestedType getOrientationRequested() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1075
        return orientationRequested;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1076
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1077
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1078
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1079
     * Specifies the print orientation for pages using these attributes. Not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1080
     * specifying the property is equivalent to specifying
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1081
     * OrientationRequestedType.PORTRAIT.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1082
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1083
     * @param   orientationRequested OrientationRequestedType.PORTRAIT or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1084
     *          OrientationRequestedType.LANDSCAPE.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1085
     * @throws  IllegalArgumentException if orientationRequested is null.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1086
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1087
    public void setOrientationRequested(OrientationRequestedType
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1088
                                        orientationRequested) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1089
        if (orientationRequested == null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1090
            throw new IllegalArgumentException("Invalid value for attribute "+
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1091
                                               "orientationRequested");
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1092
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1093
        this.orientationRequested = orientationRequested;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1094
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1095
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1096
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1097
     * Specifies the print orientation for pages using these attributes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1098
     * Specifying <code>3</code> denotes portrait. Specifying <code>4</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1099
     * denotes landscape. Specifying any other value will generate an
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1100
     * IllegalArgumentException. Not specifying the property is equivalent
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1101
     * to calling setOrientationRequested(OrientationRequestedType.PORTRAIT).
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1102
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1103
     * @param   orientationRequested <code>3</code> or <code>4</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1104
     * @throws  IllegalArgumentException if orientationRequested is not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1105
     *          <code>3</code> or <code>4</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1106
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1107
    public void setOrientationRequested(int orientationRequested) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1108
        switch (orientationRequested) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1109
          case 3:
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1110
            setOrientationRequested(OrientationRequestedType.PORTRAIT);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1111
            break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1112
          case 4:
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1113
            setOrientationRequested(OrientationRequestedType.LANDSCAPE);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1114
            break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1115
          default:
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1116
            // This will throw an IllegalArgumentException
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1117
            setOrientationRequested(null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1118
            break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1119
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1120
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1121
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1122
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1123
     * Sets the print orientation for pages using these attributes to the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1124
     * default. The default orientation is portrait.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1125
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1126
    public void setOrientationRequestedToDefault() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1127
        setOrientationRequested(OrientationRequestedType.PORTRAIT);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1128
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1129
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1130
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1131
     * Returns whether drawing at (0, 0) to pages using these attributes
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1132
     * draws at the upper-left corner of the physical page, or at the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1133
     * upper-left corner of the printable area. (Note that these locations
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1134
     * could be equivalent.) This attribute cannot be modified by,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1135
     * and is not subject to any limitations of, the implementation or the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1136
     * target printer.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1137
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1138
     * @return  OriginType.PHYSICAL or OriginType.PRINTABLE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1139
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1140
    public OriginType getOrigin() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1141
        return origin;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1142
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1143
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1144
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1145
     * Specifies whether drawing at (0, 0) to pages using these attributes
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1146
     * draws at the upper-left corner of the physical page, or at the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1147
     * upper-left corner of the printable area. (Note that these locations
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1148
     * could be equivalent.) Not specifying the property is equivalent to
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1149
     * specifying OriginType.PHYSICAL.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1150
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1151
     * @param   origin OriginType.PHYSICAL or OriginType.PRINTABLE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1152
     * @throws  IllegalArgumentException if origin is null.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1153
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1154
    public void setOrigin(OriginType origin) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1155
        if (origin == null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1156
            throw new IllegalArgumentException("Invalid value for attribute "+
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1157
                                               "origin");
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1158
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1159
        this.origin = origin;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1160
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1161
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1162
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1163
     * Returns the print quality for pages using these attributes. This
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1164
     * attribute is updated to the value chosen by the user.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1165
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1166
     * @return  PrintQualityType.DRAFT, PrintQualityType.NORMAL, or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1167
     *          PrintQualityType.HIGH
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1168
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1169
    public PrintQualityType getPrintQuality() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1170
        return printQuality;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1171
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1172
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1173
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1174
     * Specifies the print quality for pages using these attributes. Not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1175
     * specifying the property is equivalent to specifying
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1176
     * PrintQualityType.NORMAL.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1177
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1178
     * @param   printQuality PrintQualityType.DRAFT, PrintQualityType.NORMAL,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1179
     *          or PrintQualityType.HIGH
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1180
     * @throws  IllegalArgumentException if printQuality is null.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1181
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1182
    public void setPrintQuality(PrintQualityType printQuality) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1183
        if (printQuality == null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1184
            throw new IllegalArgumentException("Invalid value for attribute "+
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1185
                                               "printQuality");
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1186
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1187
        this.printQuality = printQuality;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1188
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1189
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1190
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1191
     * Specifies the print quality for pages using these attributes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1192
     * Specifying <code>3</code> denotes draft. Specifying <code>4</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1193
     * denotes normal. Specifying <code>5</code> denotes high. Specifying
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1194
     * any other value will generate an IllegalArgumentException. Not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1195
     * specifying the property is equivalent to calling
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1196
     * setPrintQuality(PrintQualityType.NORMAL).
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1197
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1198
     * @param   printQuality <code>3</code>, <code>4</code>, or <code>5</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1199
     * @throws  IllegalArgumentException if printQuality is not <code>3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1200
     *          </code>, <code>4</code>, or <code>5</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1201
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1202
    public void setPrintQuality(int printQuality) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1203
        switch (printQuality) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1204
          case 3:
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1205
            setPrintQuality(PrintQualityType.DRAFT);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1206
            break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1207
          case 4:
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1208
            setPrintQuality(PrintQualityType.NORMAL);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1209
            break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1210
          case 5:
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1211
            setPrintQuality(PrintQualityType.HIGH);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1212
            break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1213
          default:
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1214
            // This will throw an IllegalArgumentException
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1215
            setPrintQuality(null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1216
            break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1217
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1218
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1219
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1220
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1221
     * Sets the print quality for pages using these attributes to the default.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1222
     * The default print quality is normal.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1223
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1224
    public void setPrintQualityToDefault() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1225
        setPrintQuality(PrintQualityType.NORMAL);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1226
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1227
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1228
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1229
     * Returns the print resolution for pages using these attributes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1230
     * Index 0 of the array specifies the cross feed direction resolution
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1231
     * (typically the horizontal resolution). Index 1 of the array specifies
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1232
     * the feed direction resolution (typically the vertical resolution).
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1233
     * Index 2 of the array specifies whether the resolutions are in dots per
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1234
     * inch or dots per centimeter. <code>3</code> denotes dots per inch.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1235
     * <code>4</code> denotes dots per centimeter.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1236
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1237
     * @return  an integer array of 3 elements. The first
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1238
     *          element must be greater than 0. The second element must be
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1239
     *          must be greater than 0. The third element must be either
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1240
     *          <code>3</code> or <code>4</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1241
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1242
    public int[] getPrinterResolution() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1243
        // Return a copy because otherwise client code could circumvent the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1244
        // the checks made in setPrinterResolution by modifying the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1245
        // returned array.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1246
        int[] copy = new int[3];
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1247
        copy[0] = printerResolution[0];
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1248
        copy[1] = printerResolution[1];
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1249
        copy[2] = printerResolution[2];
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1250
        return copy;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1251
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1252
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1253
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1254
     * Specifies the desired print resolution for pages using these attributes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1255
     * The actual resolution will be determined by the limitations of the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1256
     * implementation and the target printer. Index 0 of the array specifies
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1257
     * the cross feed direction resolution (typically the horizontal
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1258
     * resolution). Index 1 of the array specifies the feed direction
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1259
     * resolution (typically the vertical resolution). Index 2 of the array
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1260
     * specifies whether the resolutions are in dots per inch or dots per
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1261
     * centimeter. <code>3</code> denotes dots per inch. <code>4</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1262
     * denotes dots per centimeter. Note that the 1.1 printing implementation
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1263
     * (Toolkit.getPrintJob) requires that the feed and cross feed resolutions
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1264
     * be the same. Not specifying the property is equivalent to calling
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1265
     * setPrinterResolution(72).
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1266
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1267
     * @param   printerResolution an integer array of 3 elements. The first
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1268
     *          element must be greater than 0. The second element must be
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1269
     *          must be greater than 0. The third element must be either
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1270
     *          <code>3</code> or <code>4</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1271
     * @throws  IllegalArgumentException if one or more of the above
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1272
     *          conditions is violated.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1273
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1274
    public void setPrinterResolution(int[] printerResolution) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1275
        if (printerResolution == null ||
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1276
            printerResolution.length != 3 ||
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1277
            printerResolution[0] <= 0 ||
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1278
            printerResolution[1] <= 0 ||
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1279
            (printerResolution[2] != 3 && printerResolution[2] != 4)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1280
            throw new IllegalArgumentException("Invalid value for attribute "+
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1281
                                               "printerResolution");
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1282
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1283
        // Store a copy because otherwise client code could circumvent the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1284
        // the checks made above by holding a reference to the array and
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1285
        // modifying it after calling setPrinterResolution.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1286
        int[] copy = new int[3];
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1287
        copy[0] = printerResolution[0];
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1288
        copy[1] = printerResolution[1];
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1289
        copy[2] = printerResolution[2];
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1290
        this.printerResolution = copy;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1291
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1292
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1293
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1294
     * Specifies the desired cross feed and feed print resolutions in dots per
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1295
     * inch for pages using these attributes. The same value is used for both
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1296
     * resolutions. The actual resolutions will be determined by the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1297
     * limitations of the implementation and the target printer. Not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1298
     * specifying the property is equivalent to specifying <code>72</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1299
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1300
     * @param   printerResolution an integer greater than 0.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1301
     * @throws  IllegalArgumentException if printerResolution is less than or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1302
     *          equal to 0.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1303
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1304
    public void setPrinterResolution(int printerResolution) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1305
        setPrinterResolution(new int[] { printerResolution, printerResolution,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1306
                                         3 } );
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1307
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1308
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1309
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1310
     * Sets the printer resolution for pages using these attributes to the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1311
     * default. The default is 72 dpi for both the feed and cross feed
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1312
     * resolutions.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1313
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1314
    public void setPrinterResolutionToDefault() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1315
        setPrinterResolution(72);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1316
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1317
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1318
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1319
     * Determines whether two PageAttributes are equal to each other.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1320
     * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1321
     * Two PageAttributes are equal if and only if each of their attributes are
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1322
     * equal. Attributes of enumeration type are equal if and only if the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1323
     * fields refer to the same unique enumeration object. This means that
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1324
     * an aliased media is equal to its underlying unique media. Printer
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1325
     * resolutions are equal if and only if the feed resolution, cross feed
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1326
     * resolution, and units are equal.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1327
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1328
     * @param   obj the object whose equality will be checked.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1329
     * @return  whether obj is equal to this PageAttribute according to the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1330
     *          above criteria.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1331
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1332
    public boolean equals(Object obj) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1333
        if (!(obj instanceof PageAttributes)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1334
            return false;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1335
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1336
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1337
        PageAttributes rhs = (PageAttributes)obj;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1338
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1339
        return (color == rhs.color &&
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1340
                media == rhs.media &&
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1341
                orientationRequested == rhs.orientationRequested &&
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1342
                origin == rhs.origin &&
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1343
                printQuality == rhs.printQuality &&
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1344
                printerResolution[0] == rhs.printerResolution[0] &&
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1345
                printerResolution[1] == rhs.printerResolution[1] &&
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1346
                printerResolution[2] == rhs.printerResolution[2]);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1347
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1348
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1349
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1350
     * Returns a hash code value for this PageAttributes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1351
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1352
     * @return  the hash code.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1353
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1354
    public int hashCode() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1355
        return (color.hashCode() << 31 ^
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1356
                media.hashCode() << 24 ^
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1357
                orientationRequested.hashCode() << 23 ^
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1358
                origin.hashCode() << 22 ^
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1359
                printQuality.hashCode() << 20 ^
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1360
                printerResolution[2] >> 2 << 19 ^
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1361
                printerResolution[1] << 10 ^
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1362
                printerResolution[0]);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1363
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1364
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1365
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1366
     * Returns a string representation of this PageAttributes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1367
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1368
     * @return  the string representation.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1369
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1370
    public String toString() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1371
        // int[] printerResolution = getPrinterResolution();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1372
        return "color=" + getColor() + ",media=" + getMedia() +
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1373
            ",orientation-requested=" + getOrientationRequested() +
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1374
            ",origin=" + getOrigin() + ",print-quality=" + getPrintQuality() +
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1375
            ",printer-resolution=[" + printerResolution[0] + "," +
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1376
            printerResolution[1] + "," + printerResolution[2] + "]";
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1377
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1378
}