diff options
Diffstat (limited to 'libjava/classpath/javax/print/attribute/standard/PrinterStateReason.java')
-rw-r--r-- | libjava/classpath/javax/print/attribute/standard/PrinterStateReason.java | 199 |
1 files changed, 195 insertions, 4 deletions
diff --git a/libjava/classpath/javax/print/attribute/standard/PrinterStateReason.java b/libjava/classpath/javax/print/attribute/standard/PrinterStateReason.java index 847395e4946..3a13585441b 100644 --- a/libjava/classpath/javax/print/attribute/standard/PrinterStateReason.java +++ b/libjava/classpath/javax/print/attribute/standard/PrinterStateReason.java @@ -1,5 +1,5 @@ /* PrinterStateReason.java -- - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -42,76 +42,246 @@ import javax.print.attribute.Attribute; import javax.print.attribute.EnumSyntax; /** + * The <code>PrinterStateReason</code> attribute provides additional + * information about the current state of the printer device. Its always part + * of the {@link javax.print.attribute.standard.PrinterStateReasons} + * printing attribute. + * <p> + * <b>IPP Compatibility:</b> PrinterStateReason is not an IPP 1.1 + * attribute itself but used inside the <code>PrinterStateReasons</code> + * attribute. + * </p> + * * @author Michael Koch (konqueror@gmx.de) + * @author Wolfgang Baer (WBaer@gmx.de) */ public class PrinterStateReason extends EnumSyntax implements Attribute { private static final long serialVersionUID = -1623720656201472593L; + /** + * Any state other state not listed here. + */ public static final PrinterStateReason OTHER = new PrinterStateReason(0); + + /** + * A media tray has run out of media. + */ public static final PrinterStateReason MEDIA_NEEDED = new PrinterStateReason(1); + + /** + * A media jam occured in the printer device. + */ public static final PrinterStateReason MEDIA_JAM = new PrinterStateReason(2); + + /** + * Indicates that the printer has been paused by the pause printer + * operation and is currently moving to the pause state. + */ public static final PrinterStateReason MOVING_TO_PAUSED = new PrinterStateReason(3); + + /** + * The printer device has be paused by the pause printer operation. + */ public static final PrinterStateReason PAUSED = new PrinterStateReason(4); + + /** + * The printer device has been shutdown or removed from service. + */ public static final PrinterStateReason SHUTDOWN = new PrinterStateReason(5); + + /** + * The printer object is connecting to the device. If a printer + * device is on the network the printer object may be unable to connect. + */ public static final PrinterStateReason CONNECTING_TO_DEVICE = new PrinterStateReason(6); + + /** + * The connection to the device has timed out. + */ public static final PrinterStateReason TIMED_OUT = new PrinterStateReason(7); + + /** + * The printer object is stopping the printer device. + */ public static final PrinterStateReason STOPPING = new PrinterStateReason(8); + + /** + * The printer object has stopped partly. A printer object may control + * several physical output devices (e.g. a printer class in CUPS) and + * stop only some of the devices. + */ public static final PrinterStateReason STOPPED_PARTLY = new PrinterStateReason(9); + + /** + * The printer device is low on toner. + */ public static final PrinterStateReason TONER_LOW = new PrinterStateReason(10); + + /** + * The printer device is out of toner. + */ public static final PrinterStateReason TONER_EMPTY = new PrinterStateReason(11); + + /** + * The printers spool area is currently full. The printer is + * currently not able to accept jobs. + */ public static final PrinterStateReason SPOOL_AREA_FULL = new PrinterStateReason(12); + + /** + * One or more covers of the printer device are open. + */ public static final PrinterStateReason COVER_OPEN = new PrinterStateReason(13); + + /** + * One or more interlocks of the printer device are open. + */ public static final PrinterStateReason INTERLOCK_OPEN = new PrinterStateReason(14); + + /** + * One or more doors of the printer device are open. + */ public static final PrinterStateReason DOOR_OPEN = new PrinterStateReason(15); + + /** + * One or more input trays are missing in the printer device. + */ public static final PrinterStateReason INPUT_TRAY_MISSING = new PrinterStateReason(16); + + /** + * The printer device is low on media. + */ public static final PrinterStateReason MEDIA_LOW = new PrinterStateReason(17); + + /** + * The printer device is out of media. + */ public static final PrinterStateReason MEDIA_EMPTY = new PrinterStateReason(18); + + /** + * One or more output trays are missing in the printer device. + */ public static final PrinterStateReason OUTPUT_TRAY_MISSING = new PrinterStateReason(19); + + /** + * One or more output areas of the printer device are almost full. + */ public static final PrinterStateReason OUTPUT_AREA_ALMOST_FULL = new PrinterStateReason(20); + + /** + * One or more output areas of the printer device are full. + */ public static final PrinterStateReason OUTPUT_AREA_FULL = new PrinterStateReason(21); + + /** + * The printer device is low on marker supply. + */ public static final PrinterStateReason MARKER_SUPPLY_LOW = new PrinterStateReason(22); + + /** + * The printer device is out of marker supply. + */ public static final PrinterStateReason MARKER_SUPPLY_EMPTY = new PrinterStateReason(23); + + /** + * The marker waste bin of the printer device is almost full. + */ public static final PrinterStateReason MARKER_WASTE_ALMOST_FULL = new PrinterStateReason(24); + + /** + * The marker waste bin of the printer device is full. + */ public static final PrinterStateReason MARKER_WASTE_FULL = new PrinterStateReason(25); + + /** + * The fuser of the printer device is over temperature. + */ public static final PrinterStateReason FUSER_OVER_TEMP = new PrinterStateReason(26); + + /** + * The fuser of the printer device is under the needed temperature. + */ public static final PrinterStateReason FUSER_UNDER_TEMP = new PrinterStateReason(27); + + /** + * The optical photo conductor is near its end of life (EOL). + */ public static final PrinterStateReason OPC_NEAR_EOL = new PrinterStateReason(28); + + /** + * The optical photo conductor has reached its end of life. + */ public static final PrinterStateReason OPC_LIFE_OVER = new PrinterStateReason(29); + + /** + * The printer device is low on developer. + */ public static final PrinterStateReason DEVELOPER_LOW = new PrinterStateReason(30); + + /** + * The printer device is out of developer. + */ public static final PrinterStateReason DEVELOPER_EMPTY = new PrinterStateReason(31); + + /** + * An interpreter resource (e.g. font) is unavailable. + */ public static final PrinterStateReason INTERPRETER_RESOURCE_UNAVAILABLE = new PrinterStateReason(32); + private static final String[] stringTable = + { "other", "media-needed", "media-jam", "moving-to-paused", "paused", + "shutdown", "connecting-to-device", "timed-out", "stopping", + "stopped-partly", "toner-low", "toner-empty", "spool-area-full", + "cover-open", "interlock-open", "door-open", "input-tray-missing", + "media-low", "media-empty", "output-tray-missing", "output-area-almost-full", + "output-area-full", "marker-supply-low", "marker-supply-empty", + "marker-waste-almost-full", "marker-waste-full", "fuser-over-temp", + "fuser-under-temp", "opc-near-eol", "opc-life-over", "developer-low", + "developer-empty", "interpreter-resource-unavailable" }; + + private static final PrinterStateReason[] enumValueTable = + { OTHER, MEDIA_NEEDED, MEDIA_JAM, MOVING_TO_PAUSED, PAUSED, SHUTDOWN, + CONNECTING_TO_DEVICE, TIMED_OUT, STOPPING, STOPPED_PARTLY, TONER_LOW, + TONER_EMPTY, SPOOL_AREA_FULL, COVER_OPEN, INTERLOCK_OPEN, DOOR_OPEN, + INPUT_TRAY_MISSING, MEDIA_LOW, MEDIA_EMPTY, OUTPUT_TRAY_MISSING, + OUTPUT_AREA_ALMOST_FULL, OUTPUT_AREA_FULL, MARKER_SUPPLY_LOW, + MARKER_SUPPLY_EMPTY, MARKER_WASTE_ALMOST_FULL, MARKER_WASTE_FULL, + FUSER_OVER_TEMP, FUSER_UNDER_TEMP, OPC_NEAR_EOL, OPC_LIFE_OVER, + DEVELOPER_LOW, DEVELOPER_EMPTY, INTERPRETER_RESOURCE_UNAVAILABLE }; + /** * Constructs a <code>PrinterStateReason</code> object. + * + * @param value the enum value. */ protected PrinterStateReason(int value) { @@ -121,7 +291,7 @@ public class PrinterStateReason extends EnumSyntax /** * Returns category of this class. * - * @return the class <code>PrintStateReason</code> itself + * @return The class <code>PrintStateReason</code> itself. */ public Class getCategory() { @@ -129,12 +299,33 @@ public class PrinterStateReason extends EnumSyntax } /** - * Returns name of this class. + * Returns the name of this attribute. * - * @return the string "printer-state-reason" + * @return The name "printer-state-reason". */ public String getName() { return "printer-state-reason"; } + + /** + * 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; + } } |