diff options
author | Wolfgang Baer <WBaer@gmx.de> | 2005-11-30 18:34:58 +0000 |
---|---|---|
committer | Wolfgang Baer <WBaer@gmx.de> | 2005-11-30 18:34:58 +0000 |
commit | 4f2c08b5c75d4c05e18978321d3f258bfd739bf9 (patch) | |
tree | 7bcfe98b470019473a57faa90d9a6ab5405349e6 /javax/print | |
parent | d96780dd3197cc51ee1d53db315052982891a823 (diff) | |
download | classpath-4f2c08b5c75d4c05e18978321d3f258bfd739bf9.tar.gz |
2005-11-30 Wolfgang Baer <WBaer@gmx.de>
* javax/print/attribute/standard/Compression.java:
Added java docs to class and methods.
(getStringTable): New overridden method.
(getEnumValueTable): New overridden method.
(stringTable): New field.
(enumValueTable): New field.
* javax/print/attribute/standard/ColorSupported.java:
Added java docs to class and methods.
(getStringTable): New overridden method.
(getEnumValueTable): New overridden method.
(stringTable): New field.
(enumValueTable): New field.
* javax/print/attribute/standard/Chromaticity.java:
Added java docs to class and methods.
(getStringTable): New overridden method.
(getEnumValueTable): New overridden method.
(stringTable): New field.
(enumValueTable): New field.
Diffstat (limited to 'javax/print')
-rw-r--r-- | javax/print/attribute/standard/Chromaticity.java | 53 | ||||
-rw-r--r-- | javax/print/attribute/standard/ColorSupported.java | 50 | ||||
-rw-r--r-- | javax/print/attribute/standard/Compression.java | 51 |
3 files changed, 143 insertions, 11 deletions
diff --git a/javax/print/attribute/standard/Chromaticity.java b/javax/print/attribute/standard/Chromaticity.java index 3d336a482..cc834f680 100644 --- a/javax/print/attribute/standard/Chromaticity.java +++ b/javax/print/attribute/standard/Chromaticity.java @@ -44,15 +44,40 @@ import javax.print.attribute.PrintJobAttribute; import javax.print.attribute.PrintRequestAttribute; /** + * The <code>Chromaticity</code> printing attribute specifies if print data + * should be printed in monochrome or color. + * <p> + * The attribute interacts with the document to be printed. If the document + * to be printed is a monochrome document it will be printed monochrome + * regardless of the value of this attribute category. However if it is a + * color document supplying the attribute value <code>MONOCHROME</code> + * will prepare the document to be printed in monochrome instead of color. + * </p> + * <p> + * This printing attribute has nothing to do with the capabilities of the + * printer device. To check if a specific printer service supports printing + * in color you have to use the attribute + * {@link javax.print.attribute.standard.ColorSupported} + * </p> + * <p> + * <b>IPP Compatibility:</b> Chromaticity is not an IPP 1.1 attribute. + * </p> + * * @author Michael Koch (konqueror@gmx.de) */ public final class Chromaticity extends EnumSyntax implements DocAttribute, PrintRequestAttribute, PrintJobAttribute { private static final long serialVersionUID = 4660543931355214012L; - + + /** Specifies monochrome printing. */ public static final Chromaticity MONOCHROME = new Chromaticity(0); + + /** Specifies color printing. */ public static final Chromaticity COLOR = new Chromaticity(1); + + private static final String[] stringTable = { "monochrome", "color" }; + private static final Chromaticity[] enumValueTable = { MONOCHROME, COLOR }; /** * Creates a <code>Chromaticity</code> object. @@ -67,7 +92,7 @@ public final class Chromaticity extends EnumSyntax /** * Returns category of this class. * - * @return the class <code>Sides</code> itself + * @return The class <code>Chromaticity</code> itself. */ public Class getCategory() { @@ -77,10 +102,32 @@ public final class Chromaticity extends EnumSyntax /** * Returns the name of this attribute. * - * @return the name + * @return The name "chromaticity". */ public String getName() { return "chromaticity"; } + + /** + * 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; + } + } diff --git a/javax/print/attribute/standard/ColorSupported.java b/javax/print/attribute/standard/ColorSupported.java index fad7ced01..bca932dd7 100644 --- a/javax/print/attribute/standard/ColorSupported.java +++ b/javax/print/attribute/standard/ColorSupported.java @@ -1,5 +1,5 @@ /* ColorSupported.java -- - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -42,6 +42,20 @@ import javax.print.attribute.PrintServiceAttribute; /** + * The <code>ColorSupported</code> printing attribute specifies if a + * printing device is capable of color printing. + * <p> + * This attributes just tells if a printer device supports color printing + * but does not specify how a specific print job is printed. Therefore the + * attribute {@link javax.print.attribute.standard.Chromaticity} exists. + * </p> + * <p> + * <b>IPP Compatibility:</b> ColorSupported is an IPP 1.1 attribute. The IPP + * specification treats ColorSupported as a boolean type which is not available + * in the Java Print Service API. The IPP boolean value true corresponds + * to <code>SUPPORTED</code> and "false" to <code>NOT_SUPPORTED</code>. + * </p> + * * @author Michael Koch (konqueror@gmx.de) */ public final class ColorSupported extends EnumSyntax @@ -49,13 +63,20 @@ public final class ColorSupported extends EnumSyntax { private static final long serialVersionUID = -2700555589688535545L; + /** The printer does not support printing in color. */ public static final ColorSupported NOT_SUPPORTED = new ColorSupported(0); + + /** The printer supports printing in color. */ public static final ColorSupported SUPPORTED = new ColorSupported(1); + private static final String[] stringTable = { "not-supported", "supported" }; + private static final ColorSupported[] enumValueTable = { NOT_SUPPORTED, + SUPPORTED }; + /** * Constructs a <code>ColorSupported</code> object. * - * @param value the value + * @param value the enum value */ protected ColorSupported(int value) { @@ -65,7 +86,7 @@ public final class ColorSupported extends EnumSyntax /** * Returns category of this class. * - * @return the class <code>ColorSupported</code> itself + * @return The class <code>ColorSupported</code> itself. */ public Class getCategory() { @@ -75,10 +96,31 @@ public final class ColorSupported extends EnumSyntax /** * Returns the name of this attribute. * - * @return the name + * @return The name "color-supported". */ public String getName() { return "color-supported"; } + + /** + * 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; + } } diff --git a/javax/print/attribute/standard/Compression.java b/javax/print/attribute/standard/Compression.java index 112202a0b..d29ffa0fc 100644 --- a/javax/print/attribute/standard/Compression.java +++ b/javax/print/attribute/standard/Compression.java @@ -1,5 +1,5 @@ /* Compression.java -- - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -42,6 +42,16 @@ import javax.print.attribute.EnumSyntax; /** + * The <code>Compression</code> printing attribute specifies if and how the + * supplied print data is compressed. + * <p> + * If this attribute is ommitted from the attributes set of the print + * data it is assumed that no compression is done. + * </p> + * <p> + * <b>IPP Compatibility:</b> Compression is an IPP 1.1 attribute. + * </p> + * * @author Michael Koch (konqueror@gmx.de) */ public class Compression extends EnumSyntax @@ -49,15 +59,27 @@ public class Compression extends EnumSyntax { private static final long serialVersionUID = -5716748913324997674L; + /** The print data is not compressed. */ public static final Compression NONE = new Compression(0); + + /** The print data is ZIP compressed. */ public static final Compression DEFLATE = new Compression(1); + + /** The print data is GNU Zip compressed. */ public static final Compression GZIP = new Compression(2); + + /** The print data is UNIX compressed. */ public static final Compression COMPRESS = new Compression(3); + + private static final String[] stringTable = { "none", "deflate", + "gzip", "compress" }; + private static final Compression[] enumValueTable = { NONE, DEFLATE, + GZIP, COMPRESS }; /** * Constructs a <code>Compression</code> object. * - * @param value that value + * @param value the enum value */ protected Compression(int value) { @@ -67,7 +89,7 @@ public class Compression extends EnumSyntax /** * Returns category of this class. * - * @return the class <code>Compression</code> itself + * @return The class <code>Compression</code> itself. */ public Class getCategory() { @@ -77,10 +99,31 @@ public class Compression extends EnumSyntax /** * Returns the name of this attribute. * - * @return the name + * @return The name "compression". */ public String getName() { return "compression"; } + + /** + * 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; + } } |