Dead
[official-gcc.git] / gomp-20050608-branch / libjava / classpath / javax / print / attribute / standard / PresentationDirection.java
blob3a479abfac4a16d1baf41d5138ae8b419f973e95
1 /* PresentationDirection.java --
2 Copyright (C) 2004, 2005 Free Software Foundation, Inc.
4 This file is part of GNU Classpath.
6 GNU Classpath is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
11 GNU Classpath is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU Classpath; see the file COPYING. If not, write to the
18 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19 02110-1301 USA.
21 Linking this library statically or dynamically with other modules is
22 making a combined work based on this library. Thus, the terms and
23 conditions of the GNU General Public License cover the whole
24 combination.
26 As a special exception, the copyright holders of this library give you
27 permission to link this library with independent modules to produce an
28 executable, regardless of the license terms of these independent
29 modules, and to copy and distribute the resulting executable under
30 terms of your choice, provided that you also meet, for each linked
31 independent module, the terms and conditions of the license of that
32 module. An independent module is a module which is not derived from
33 or based on this library. If you modify this library, you may extend
34 this exception to your version of the library, but you are not
35 obligated to do so. If you do not wish to do so, delete this
36 exception statement from your version. */
38 package javax.print.attribute.standard;
40 import javax.print.attribute.EnumSyntax;
41 import javax.print.attribute.PrintJobAttribute;
42 import javax.print.attribute.PrintRequestAttribute;
45 /**
46 * The <code>PresentationDirection</code> attribute specifies
47 * a value to be used together with the <code>NumberUp</code> attribute
48 * to indicate the layout of multiple pages on a single media sheet.
49 * <p>
50 * <b>IPP Compatibility:</b> PresentationDirection is not an IPP 1.1
51 * attribute.
52 * </p>
54 * @author Michael Koch (konqueror@gmx.de)
55 * @author Wolfgang Baer (WBaer@gmx.de)
57 public final class PresentationDirection extends EnumSyntax
58 implements PrintRequestAttribute, PrintJobAttribute
60 private static final long serialVersionUID = 8294728067230931780L;
62 /**
63 * The single pages are arranged on the media in columns starting
64 * at the top left towards the bottom left.
66 public static final PresentationDirection TOBOTTOM_TORIGHT =
67 new PresentationDirection(0);
69 /**
70 * The single pages are arranged on the media in columns starting
71 * at the top right towards the bottom left.
73 public static final PresentationDirection TOBOTTOM_TOLEFT =
74 new PresentationDirection(1);
76 /**
77 * The single pages are arranged on the media in columns starting
78 * at the bottom left towards the top right.
80 public static final PresentationDirection TOTOP_TORIGHT =
81 new PresentationDirection(2);
83 /**
84 * The single pages are arranged on the media in columns starting
85 * at the bottom right towards the top left.
87 public static final PresentationDirection TOTOP_TOLEFT =
88 new PresentationDirection(3);
90 /**
91 * The single pages are arranged on the media in rows starting
92 * at the top left towards the right bottom.
94 public static final PresentationDirection TORIGHT_TOBOTTOM =
95 new PresentationDirection(4);
97 /**
98 * The single pages are arranged on the media in rows starting
99 * at the bottom left towards the right top.
101 public static final PresentationDirection TORIGHT_TOTOP =
102 new PresentationDirection(5);
105 * The single pages are arranged on the media in rows starting
106 * at the top right towards the left bottom.
108 public static final PresentationDirection TOLEFT_TOBOTTOM =
109 new PresentationDirection(6);
112 * The single pages are arranged on the media in rows starting
113 * at the bottom right towards the left top.
115 public static final PresentationDirection TOLEFT_TOTOP =
116 new PresentationDirection(7);
118 private static final String[] stringTable = { "tobottom-toright",
119 "tobottom-toleft", "totop-toright", "totop-toleft", "toright-tobottom",
120 "toright-totop", "toleft-tobottom", "toleft-totop" };
122 private static final PresentationDirection[] enumValueTable =
123 { TOBOTTOM_TORIGHT, TOBOTTOM_TOLEFT, TOTOP_TORIGHT, TOTOP_TOLEFT,
124 TORIGHT_TOBOTTOM, TORIGHT_TOTOP, TOLEFT_TOBOTTOM, TOLEFT_TOTOP };
127 * Constructs a <code>PresentationDirection</code> object.
129 * @param value the enum value.
131 private PresentationDirection(int value)
133 super(value);
137 * Returns category of this class.
139 * @return The class <code>PresentationDirection</code> itself.
141 public Class getCategory()
143 return PresentationDirection.class;
147 * Returns the name of this attribute.
149 * @return The name "presentation-direction".
151 public String getName()
153 return "presentation-direction";
157 * Returns a table with the enumeration values represented as strings
158 * for this object.
160 * @return The enumeration values as strings.
162 protected String[] getStringTable()
164 return stringTable;
168 * Returns a table with the enumeration values for this object.
170 * @return The enumeration values.
172 protected EnumSyntax[] getEnumValueTable()
174 return enumValueTable;