diff options
Diffstat (limited to 'libjava/classpath/javax/print/attribute/standard/Sides.java')
-rw-r--r-- | libjava/classpath/javax/print/attribute/standard/Sides.java | 67 |
1 files changed, 62 insertions, 5 deletions
diff --git a/libjava/classpath/javax/print/attribute/standard/Sides.java b/libjava/classpath/javax/print/attribute/standard/Sides.java index 94b473c338f..816365aedea 100644 --- a/libjava/classpath/javax/print/attribute/standard/Sides.java +++ b/libjava/classpath/javax/print/attribute/standard/Sides.java @@ -1,5 +1,5 @@ /* Sides.java -- - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -44,19 +44,55 @@ import javax.print.attribute.PrintRequestAttribute; /** + * The <code>Sides</code> printing attribute specifies how consecutive + * printing pages are arranged on the media sheet. + * <p> + * <b>IPP Compatibility:</b> Sides is an IPP 1.1 attribute. + * </p> + * * @author Michael Koch (konqueror@gmx.de) + * @author Wolfgang Baer (WBaer@gmx.de) */ public final class Sides extends EnumSyntax implements DocAttribute, PrintRequestAttribute, PrintJobAttribute { private static final long serialVersionUID = -6890309414893262822L; + /** + * Specifies that each page should be printed on one sheet. + */ public static final Sides ONE_SIDED = new Sides(0); + + /** + * Specifies that two following pages should be printed on the + * front and back of one sheet for binding on the long edge. + */ public static final Sides TWO_SIDED_LONG_EDGE = new Sides(1); + + /** + * Specifies that two following pages should be printed on the + * front and back of one sheet for binding on the short edge. + */ public static final Sides TWO_SIDED_SHORT_EDGE = new Sides(2); - public static final Sides DUPLEX = new Sides(3); - public static final Sides TUMBLE = new Sides(4); + + /** + * An alias constant for "two sided long edge". + */ + public static final Sides DUPLEX = new Sides(1); + + /** + * An alias constant for "two sided short edge". + */ + public static final Sides TUMBLE = new Sides(2); + private static final String[] stringTable = { "one-sided", + "two-sided-long-edge", + "two-sided-short-edge" }; + + private static final Sides[] enumValueTable = { ONE_SIDED, + TWO_SIDED_LONG_EDGE, + TWO_SIDED_SHORT_EDGE }; + /** * Creates a <code>Sides</code> object. * @@ -70,7 +106,7 @@ public final class Sides extends EnumSyntax /** * Returns category of this class. * - * @return the class <code>Sides</code> itself + * @return The class <code>Sides</code> itself. */ public Class getCategory() { @@ -80,10 +116,31 @@ public final class Sides extends EnumSyntax /** * Returns the name of this attribute. * - * @return the name + * @return The name "sides". */ public String getName() { return "sides"; } + + /** + * Returns a table with the enumeration values represented as strings + * for this object. + * + * @return The enumeration values as strings. + */ + protected String[] getStringTable() + { + return stringTable; + } + + /** + * Returns a table with the enumeration values for this object. + * + * @return The enumeration values. + */ + protected EnumSyntax[] getEnumValueTable() + { + return enumValueTable; + } } |