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 MediaTray extends Media implements Attribute {
28: private static final long serialVersionUID = -982503611095214703L;
29:
30: public static final MediaTray TOP = new MediaTray(0);
31:
32: public static final MediaTray MIDDLE = new MediaTray(1);
33:
34: public static final MediaTray BOTTOM = new MediaTray(2);
35:
36: public static final MediaTray ENVELOPE = new MediaTray(3);
37:
38: public static final MediaTray MANUAL = new MediaTray(4);
39:
40: public static final MediaTray LARGE_CAPACITY = new MediaTray(5);
41:
42: public static final MediaTray MAIN = new MediaTray(6);
43:
44: public static final MediaTray SIDE = new MediaTray(7);
45:
46: private static final MediaTray[] enumValueTable = { TOP, MIDDLE,
47: BOTTOM, ENVELOPE, MANUAL, LARGE_CAPACITY, MAIN, SIDE };
48:
49: private static final String[] stringTable = { "top", "middle",
50: "bottom", "envelope", "manual", "large-capacity", "main",
51: "side" };
52:
53: protected MediaTray(int value) {
54: super (value);
55: }
56:
57: @Override
58: protected EnumSyntax[] getEnumValueTable() {
59: return enumValueTable.clone();
60: }
61:
62: @Override
63: protected String[] getStringTable() {
64: return stringTable.clone();
65: }
66: }
|