01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17:
18: package javax.print.attribute.standard;
19:
20: import javax.print.attribute.Attribute;
21: import javax.print.attribute.EnumSyntax;
22:
23: /*
24: * Table values are obtained from RFC2911: Internet Printing Protocol/1.1:
25: * Model and Semantics, Appendix C, http://ietf.org/rfc/rfc2911.txt?number=2911
26: */
27: public class MediaName extends Media implements Attribute {
28: private static final long serialVersionUID = 4653117714524155448L;
29:
30: public static final MediaName NA_LETTER_WHITE = new MediaName(0);
31:
32: public static final MediaName NA_LETTER_TRANSPARENT = new MediaName(
33: 1);
34:
35: public static final MediaName ISO_A4_WHITE = new MediaName(2);
36:
37: public static final MediaName ISO_A4_TRANSPARENT = new MediaName(3);
38:
39: private static final MediaName[] enumValueTable = {
40: NA_LETTER_WHITE, NA_LETTER_TRANSPARENT, ISO_A4_WHITE,
41: ISO_A4_TRANSPARENT };
42:
43: private static final String[] stringTable = { "na-letter-white",
44: "na-letter-transparent", "iso-a4-white",
45: "iso-a4-transparent" };
46:
47: protected MediaName(int value) {
48: super (value);
49: }
50:
51: @Override
52: protected EnumSyntax[] getEnumValueTable() {
53: return enumValueTable.clone();
54: }
55:
56: @Override
57: protected String[] getStringTable() {
58: return stringTable.clone();
59: }
60: }
|