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: import javax.print.attribute.PrintJobAttribute;
23: import javax.print.attribute.PrintRequestAttribute;
24:
25: /*
26: * Table values are obtained from PWG 5100.3:Production Printing Attributes
27: * Set1, section 3.17, ftp://ftp.pwg.org/pub/pwg/candidates/cs-ippprodprint10-20010212-5100.3.pdf
28: */
29: public final class PresentationDirection extends EnumSyntax implements
30: PrintJobAttribute, PrintRequestAttribute {
31: private static final long serialVersionUID = 8294728067230931780L;
32:
33: public static final PresentationDirection TOBOTTOM_TORIGHT = new PresentationDirection(
34: 0);
35:
36: public static final PresentationDirection TOBOTTOM_TOLEFT = new PresentationDirection(
37: 1);
38:
39: public static final PresentationDirection TOTOP_TORIGHT = new PresentationDirection(
40: 2);
41:
42: public static final PresentationDirection TOTOP_TOLEFT = new PresentationDirection(
43: 3);
44:
45: public static final PresentationDirection TORIGHT_TOBOTTOM = new PresentationDirection(
46: 4);
47:
48: public static final PresentationDirection TORIGHT_TOTOP = new PresentationDirection(
49: 5);
50:
51: public static final PresentationDirection TOLEFT_TOBOTTOM = new PresentationDirection(
52: 6);
53:
54: public static final PresentationDirection TOLEFT_TOTOP = new PresentationDirection(
55: 7);
56:
57: private static final PresentationDirection[] enumValueTable = {
58: TOBOTTOM_TORIGHT, TOBOTTOM_TOLEFT, TOTOP_TORIGHT,
59: TOTOP_TOLEFT, TORIGHT_TOBOTTOM, TORIGHT_TOTOP,
60: TOLEFT_TOBOTTOM, TOLEFT_TOTOP };
61:
62: private static final String[] stringTable = { "tobottom-toright",
63: "tobottom-toleft", "totop-toright", "totop-toleft",
64: "toright-tobottom", "toright-totop", "toleft-tobottom",
65: "toleft-totop" };
66:
67: PresentationDirection(int value) {
68: super (value);
69: }
70:
71: public final Class<? extends Attribute> getCategory() {
72: return PresentationDirection.class;
73: }
74:
75: @Override
76: protected EnumSyntax[] getEnumValueTable() {
77: return enumValueTable.clone();
78: }
79:
80: public final String getName() {
81: return "presentation-direction";
82: }
83:
84: @Override
85: protected String[] getStringTable() {
86: return stringTable.clone();
87: }
88: }
|