summaryrefslogtreecommitdiff
path: root/javax/print
diff options
context:
space:
mode:
authorWolfgang Baer <WBaer@gmx.de>2005-12-16 19:27:47 +0000
committerWolfgang Baer <WBaer@gmx.de>2005-12-16 19:27:47 +0000
commitdb529297d0693a3845522b2ec2a5cd1ad2010ab0 (patch)
tree146ebce768d673eb6a8bc75133e917ea54df87e7 /javax/print
parentc527bd5c8f75b20cbc1516b18962064ab0b3c7bf (diff)
downloadclasspath-db529297d0693a3845522b2ec2a5cd1ad2010ab0.tar.gz
2005-12-16 Wolfgang Baer <WBaer@gmx.de>
* javax/print/attribute/standard/MediaSizeName.java: Added and updated javadocs to class and methods. (getStringTable): Implemented. (getEnumValueTable): Implemented. (stringTable): New field. (enumValueTable): New field. * javax/print/attribute/standard/MediaName.java: Added and updated javadocs to class and methods. (getStringTable): Implemented. (getEnumValueTable): Implemented. (stringTable): New field. (enumValueTable): New field. (NA_LETTER_WHITE): Fixed value of enum. (NA_LETTER_TRANSPARENT): Likewise. (ISO_A4_WHITE): Likewise. (ISO_A4_TRANSPARENT): Likewise. (serialVersionUID): New field. * javax/print/attribute/standard/Media.java: Added and updated javadocs to class and methods. (equals): New overridden method. * javax/print/attribute/standard/MediaTray.java: Added and updated javadocs to class and methods. (getStringTable): Implemented. (getEnumValueTable): Implemented. (stringTable): New field. (enumValueTable): New field. (TOP): Fixed value of enum. (MIDDLE): Likewise. (BOTTOM): Likewise. (ENVELOPE): Likewise. (LARGE_CAPACITY): Likewise. (MAIN): Likewise. (SIDE): Likewise. (serialVersionUID): New field. * javax/print/attribute/standard/PrinterState.java: Added and updated javadocs to class and methods. (getStringTable): New overridden method. (getEnumValueTable): New overridden method. (stringTable): New field. (enumValueTable): New field. (IDLE): Fixed value of enum. (PROCESSING): Likewise. (STOPPED): Likewise. * javax/print/attribute/standard/JobState.java: Added and updated javadocs to class and methods. (getStringTable): New overridden method. (getEnumValueTable): New overridden method. (stringTable): New field. (enumValueTable): New field. (PENDING): Fixed value of enum. (PENDING_HELD): Likewise. (PROCESSING): Likewise. (PROCESSING_STOPPED): Likewise. (CANCELED): Likewise. (ABORTED): Likewise. (COMPLETED): Likewise. * javax/print/attribute/standard/SheetCollate.java, * javax/print/attribute/standard/PresentationDirection.java, * javax/print/attribute/standard/ReferenceUriSchemesSupported.java, * javax/print/attribute/standard/PrinterStateReason.java, * javax/print/attribute/standard/JobStateReason.java, * javax/print/attribute/standard/JobSheets.java: Added and updated javadocs 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/JobSheets.java49
-rw-r--r--javax/print/attribute/standard/JobState.java107
-rw-r--r--javax/print/attribute/standard/JobStateReason.java197
-rw-r--r--javax/print/attribute/standard/Media.java50
-rw-r--r--javax/print/attribute/standard/MediaName.java73
-rw-r--r--javax/print/attribute/standard/MediaSizeName.java364
-rw-r--r--javax/print/attribute/standard/MediaTray.java88
-rw-r--r--javax/print/attribute/standard/PresentationDirection.java85
-rw-r--r--javax/print/attribute/standard/PrinterState.java74
-rw-r--r--javax/print/attribute/standard/PrinterStateReason.java199
-rw-r--r--javax/print/attribute/standard/ReferenceUriSchemesSupported.java84
-rw-r--r--javax/print/attribute/standard/SheetCollate.java62
12 files changed, 1335 insertions, 97 deletions
diff --git a/javax/print/attribute/standard/JobSheets.java b/javax/print/attribute/standard/JobSheets.java
index 183aed2a1..d61acfee9 100644
--- a/javax/print/attribute/standard/JobSheets.java
+++ b/javax/print/attribute/standard/JobSheets.java
@@ -1,5 +1,5 @@
/* JobSheets.java --
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -43,18 +43,40 @@ import javax.print.attribute.PrintRequestAttribute;
/**
+ * The <code>JobSheets</code> printing attribute specifies if a
+ * job start/end sheets should be printed.
+ * <p>
+ * <b>IPP Compatibility:</b> JobSheets is an IPP 1.1 attribute.
+ * </p>
+ *
* @author Michael Koch (konqueror@gmx.de)
+ * @author Wolfgang Baer (WBaer@gmx.de)
*/
public class JobSheets extends EnumSyntax
implements PrintJobAttribute, PrintRequestAttribute
{
private static final long serialVersionUID = -4735258056132519759L;
+ /**
+ * No job sheet is printed.
+ */
public static final JobSheets NONE = new JobSheets(0);
+
+ /**
+ * The standard job sheet is printed. The sheet and if it
+ * is printed only as start sheet or also as end sheet is
+ * site specific.
+ */
public static final JobSheets STANDARD = new JobSheets(1);
+ private static final String[] stringTable = { "none", "standard" };
+
+ private static final JobSheets[] enumValueTable = { NONE, STANDARD };
+
/**
* Constructs a <code>JobSheets</code> object.
+ *
+ * @param value the enum value.
*/
protected JobSheets(int value)
{
@@ -64,7 +86,7 @@ public class JobSheets extends EnumSyntax
/**
* Returns category of this class.
*
- * @return the class <code>JobSheets</code> itself
+ * @return The class <code>JobSheets</code> itself.
*/
public Class getCategory()
{
@@ -74,10 +96,31 @@ public class JobSheets extends EnumSyntax
/**
* Returns the name of this attribute.
*
- * @return the name
+ * @return The name "job-sheets".
*/
public String getName()
{
return "job-sheets";
}
+
+ /**
+ * 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/JobState.java b/javax/print/attribute/standard/JobState.java
index 1350e697f..bd09e1fb1 100644
--- a/javax/print/attribute/standard/JobState.java
+++ b/javax/print/attribute/standard/JobState.java
@@ -1,5 +1,5 @@
/* JobState.java --
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -42,24 +42,90 @@ import javax.print.attribute.PrintJobAttribute;
/**
+ * The <code>JobState</code> printing attribute reports
+ * the current state of a job.
+ * <p>
+ * The {@link javax.print.attribute.standard.JobStateReasons}
+ * attribute provides further detailed information about
+ * the given job state. Detailed information about the job
+ * state and job state reasons can be found in the RFC 2911.
+ * </p>
+ * <p>
+ * <b>IPP Compatibility:</b> JobState is an IPP 1.1 attribute.
+ * </p>
+ *
* @author Michael Koch (konqueror@gmx.de)
+ * @author Wolfgang Baer (WBaer@gmx.de)
*/
public class JobState extends EnumSyntax
implements PrintJobAttribute
{
private static final long serialVersionUID = 400465010094018920L;
+ /**
+ * The job state is currently unknown.
+ */
public static final JobState UNKNOWN = new JobState(0);
- public static final JobState PENDING = new JobState(1);
- public static final JobState PENDING_HELD = new JobState(2);
- public static final JobState PROCESSING = new JobState(3);
- public static final JobState PROCESSING_STOPPED = new JobState(4);
- public static final JobState CANCELED = new JobState(5);
- public static final JobState ABORTED = new JobState(6);
- public static final JobState COMPLETED = new JobState(7);
+
+ /**
+ * The job is pending processing.
+ */
+ public static final JobState PENDING = new JobState(3);
+
+ /**
+ * The job is currently not a candidate for printing because
+ * of reasons reported by the job-state-reasons attribute. If
+ * the reasons are no longer present it will return to the
+ * pending state.
+ */
+ public static final JobState PENDING_HELD = new JobState(4);
+
+ /**
+ * The job is currently processed.
+ */
+ public static final JobState PROCESSING = new JobState(5);
+
+ /**
+ * The job's processing has stopped. The job-state-reasons
+ * attribute may indicate the reason(s). The job will return
+ * to the processing state if the reasons are no longer present.
+ */
+ public static final JobState PROCESSING_STOPPED = new JobState(6);
+
+ /**
+ * The job has been canceled by the client.
+ */
+ public static final JobState CANCELED = new JobState(7);
+
+ /**
+ * The job has been aborted by the system.
+ */
+ public static final JobState ABORTED = new JobState(8);
+
+ /**
+ * The job has completed successfully.
+ */
+ public static final JobState COMPLETED = new JobState(9);
+
+ private static final String[] stringTable = { "unknown", null, null,
+ "pending", "pending-held",
+ "processing",
+ "processing-stopped",
+ "canceled", "aborted",
+ "completed"};
+
+ private static final JobState[] enumValueTable = { UNKNOWN, null, null,
+ PENDING, PENDING_HELD,
+ PROCESSING,
+ PROCESSING_STOPPED,
+ CANCELED, ABORTED,
+ COMPLETED };
+
/**
* Constructs a <code>JobState</code> object.
+ *
+ * @param value the enum value.
*/
protected JobState(int value)
{
@@ -69,7 +135,7 @@ public class JobState extends EnumSyntax
/**
* Returns category of this class.
*
- * @return the class <code>JobState</code> itself
+ * @return The class <code>JobState</code> itself.
*/
public Class getCategory()
{
@@ -79,10 +145,31 @@ public class JobState extends EnumSyntax
/**
* Returns the name of this attribute.
*
- * @return the name
+ * @return The name "job-state".
*/
public String getName()
{
return "job-state";
}
+
+ /**
+ * 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/JobStateReason.java b/javax/print/attribute/standard/JobStateReason.java
index 4a9f1a91a..bd831cda5 100644
--- a/javax/print/attribute/standard/JobStateReason.java
+++ b/javax/print/attribute/standard/JobStateReason.java
@@ -1,5 +1,5 @@
/* JobStateReason.java --
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -42,45 +42,215 @@ import javax.print.attribute.EnumSyntax;
/**
+ * The <code>JobStateReason</code> attribute provides additional
+ * information about the current state of a job. Its always part
+ * of the {@link javax.print.attribute.standard.JobStateReasons}
+ * printing attribute.
+ * <p>
+ * <b>IPP Compatibility:</b> JobStateReason is not an IPP 1.1
+ * attribute itself but used inside the <code>JobStateReasons</code>
+ * attribute.
+ * </p>
+ *
* @author Michael Koch (konqueror@gmx.de)
+ * @author Wolfgang Baer (WBaer@gmx.de)
*/
public class JobStateReason extends EnumSyntax
implements Attribute
{
private static final long serialVersionUID = -8765894420449009168L;
+ /**
+ * The printer has accepted the job or is retrieving document
+ * data for processing.
+ */
public static final JobStateReason JOB_INCOMING = new JobStateReason(0);
+
+ /**
+ * The printer is expecting additional document data before it
+ * can move this job into the processing state.
+ */
public static final JobStateReason JOB_DATA_INSUFFICIENT = new JobStateReason(1);
+
+ /**
+ * The printer is unable to access one or more documents provided
+ * by reference in the print job.
+ */
public static final JobStateReason DOCUMENT_ACCESS_ERROR = new JobStateReason(2);
+
+ /**
+ * The printer has not received the whole job submission. This
+ * indicates no reason for the interruption.
+ */
public static final JobStateReason SUBMISSION_INTERRUPTED = new JobStateReason(3);
+
+ /**
+ * The printer transfers the job to the actual output device.
+ */
public static final JobStateReason JOB_OUTGOING = new JobStateReason(4);
+
+ /**
+ * The job was submitted with a <code>JobHoldUntil</code> attribute which
+ * specifies a time period still in the future and causes the job to
+ * be on hold.
+ */
public static final JobStateReason JOB_HOLD_UNTIL_SPECIFIED = new JobStateReason(5);
+
+ /**
+ * One or more resources needed by the job are not ready. E.g. needed
+ * media type.
+ */
public static final JobStateReason RESOURCES_ARE_NOT_READY = new JobStateReason(6);
+
+ /**
+ * The printer stopped partly.
+ */
public static final JobStateReason PRINTER_STOPPED_PARTLY = new JobStateReason(7);
+
+ /**
+ * The printer stopped complete.
+ */
public static final JobStateReason PRINTER_STOPPED = new JobStateReason(8);
+
+ /**
+ * The printer is currently interpreting the jobs document data.
+ * Detailed state of the job's processing state.
+ */
public static final JobStateReason JOB_INTERPRETING = new JobStateReason(9);
+
+ /**
+ * The printer has queued the document data.
+ * Detailed state of the job's processing state.
+ */
public static final JobStateReason JOB_QUEUED = new JobStateReason(10);
+
+ /**
+ * The printer is transforming the document data to another representation.
+ * Detailed state of the job's processing state.
+ */
public static final JobStateReason JOB_TRANSFORMING = new JobStateReason(11);
+
+ /**
+ * The job is queued for marking.
+ */
public static final JobStateReason JOB_QUEUED_FOR_MARKER = new JobStateReason(12);
+
+ /**
+ * The job is currently printing.
+ */
public static final JobStateReason JOB_PRINTING = new JobStateReason(13);
+
+ /**
+ * The job was canceled by the user (the owner of the job).
+ */
public static final JobStateReason JOB_CANCELED_BY_USER = new JobStateReason(14);
+
+ /**
+ * The job was canceled by the operator.
+ */
public static final JobStateReason JOB_CANCELED_BY_OPERATOR = new JobStateReason(15);
+
+ /**
+ * The job was canceled by an unidentified local user at the device.
+ */
public static final JobStateReason JOB_CANCELED_AT_DEVICE = new JobStateReason(16);
+
+ /**
+ * The job has been aborted by the system.
+ */
public static final JobStateReason ABORTED_BY_SYSTEM = new JobStateReason(17);
+
+ /**
+ * The printer aborted the job because of an unsupported compression while
+ * trying to decompress the document data.
+ */
public static final JobStateReason UNSUPPORTED_COMPRESSION = new JobStateReason(18);
+
+ /**
+ * The printer aborted the job because of a compression error while
+ * trying to decompress the document data. If this state is given the test
+ * for supported compression has already been passed.
+ */
public static final JobStateReason COMPRESSION_ERROR = new JobStateReason(19);
+
+ /**
+ * The printer aborted the job because of the document format is not supported.
+ * This may happen if a job is specified as application/octet-stream format.
+ */
public static final JobStateReason UNSUPPORTED_DOCUMENT_FORMAT = new JobStateReason(20);
+
+ /**
+ * The printer aborted the job because of an error in the document data.
+ */
public static final JobStateReason DOCUMENT_FORMAT_ERROR = new JobStateReason(21);
+
+ /**
+ * The client has either canceled the job or the printer aborted the job.
+ * However the printer still performs some action on the job e.g. to cleanup.
+ */
public static final JobStateReason PROCESSING_TO_STOP_POINT = new JobStateReason(22);
+
+ /**
+ * The printer is offline and therefore is not accepting jobs.
+ */
public static final JobStateReason SERVICE_OFF_LINE = new JobStateReason(23);
+
+ /**
+ * The printer completed the job successfully.
+ */
public static final JobStateReason JOB_COMPLETED_SUCCESSFULLY = new JobStateReason(24);
+
+ /**
+ * The printer completed the job with warnings.
+ */
public static final JobStateReason JOB_COMPLETED_WITH_WARNINGS = new JobStateReason(25);
+
+ /**
+ * The printer completed the job with errors.
+ */
public static final JobStateReason JOB_COMPLETED_WITH_ERRORS = new JobStateReason(26);
+
+ /**
+ * The job is retained and is able to be restared.
+ */
public static final JobStateReason JOB_RESTARTABLE = new JobStateReason(27);
+
+ /**
+ * The printer has forwarded the job to the actual output device. This device
+ * is not capable of reporting the state back so that the job state is set
+ * to completed by the printer.
+ */
public static final JobStateReason QUEUED_IN_DEVICE = new JobStateReason(28);
+ private static final String[] stringTable =
+ { "job-incoming", "job-data-insufficient", "document-access-error",
+ "submission-interrupted", "job-outgoing", "job-hold-until-specified",
+ "resources-are-not-ready", "printer-stopped-partly", "printer-stopped",
+ "job-interpreting", "job-queued", "job-transforming",
+ "job-queued-for-marker", "job-printing", "job-canceled-by-user",
+ "job-canceled-by-operator", "job-canceled-at-device",
+ "aborted-by-system", "unsupported-compression", "compression-error",
+ "unsupported-document-format", "document-format-error",
+ "processing-to-stop-point", "service-off-line",
+ "job-completed-successfully", "job-completed-with-warnings",
+ "job-completed-with-errors", "job-restartable", "queued-in-device" };
+
+ private static final JobStateReason[] enumValueTable =
+ { JOB_INCOMING, JOB_DATA_INSUFFICIENT, DOCUMENT_ACCESS_ERROR,
+ SUBMISSION_INTERRUPTED, JOB_OUTGOING, JOB_HOLD_UNTIL_SPECIFIED,
+ RESOURCES_ARE_NOT_READY, PRINTER_STOPPED_PARTLY, PRINTER_STOPPED,
+ JOB_INTERPRETING, JOB_QUEUED, JOB_TRANSFORMING, JOB_QUEUED_FOR_MARKER,
+ JOB_PRINTING, JOB_CANCELED_BY_USER, JOB_CANCELED_BY_OPERATOR,
+ JOB_CANCELED_AT_DEVICE, ABORTED_BY_SYSTEM, UNSUPPORTED_COMPRESSION,
+ COMPRESSION_ERROR, UNSUPPORTED_DOCUMENT_FORMAT, DOCUMENT_FORMAT_ERROR,
+ PROCESSING_TO_STOP_POINT, SERVICE_OFF_LINE, JOB_COMPLETED_SUCCESSFULLY,
+ JOB_COMPLETED_WITH_WARNINGS, JOB_COMPLETED_WITH_ERRORS, JOB_RESTARTABLE,
+ QUEUED_IN_DEVICE };
+
/**
* Constructs a <code>JobStateReason</code> object.
+ *
+ * @param value the enum value.
*/
protected JobStateReason(int value)
{
@@ -90,7 +260,7 @@ public class JobStateReason extends EnumSyntax
/**
* Returns category of this class.
*
- * @return the class <code>JobStateReason</code> itself
+ * @return The class <code>JobStateReason</code> itself.
*/
public Class getCategory()
{
@@ -100,10 +270,31 @@ public class JobStateReason extends EnumSyntax
/**
* Returns the name of this attribute.
*
- * @return the name
+ * @return The name "job-state-reason".
*/
public String getName()
{
return "job-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;
+ }
}
diff --git a/javax/print/attribute/standard/Media.java b/javax/print/attribute/standard/Media.java
index ebb15d0d0..ebb39f601 100644
--- a/javax/print/attribute/standard/Media.java
+++ b/javax/print/attribute/standard/Media.java
@@ -1,5 +1,5 @@
/* Media.java --
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -44,7 +44,27 @@ import javax.print.attribute.PrintRequestAttribute;
/**
+ * The <code>Media</code> printing attribute specifies which
+ * type of media should be used for printing.
+ * <p>
+ * The media to be used can be specified in three ways represented
+ * by the media subclasses {@link javax.print.attribute.standard.MediaTray},
+ * {@link javax.print.attribute.standard.MediaName} and
+ * {@link javax.print.attribute.standard.MediaSizeName}:
+ * <ul>
+ * <li>Selection by paper source - selection of printer tray to be used.</li>
+ * <li>Selection by name - e.g. A4 paper.</li>
+ * <li>Selection by standard sizes - e.g. ISO A5, JIS B4.</li>
+ * </ul>
+ * Each of the sublcasses represents the IPP attribute <code>media</code>
+ * and provides predefined values to be used.
+ * </p>
+ * <p>
+ * <b>IPP Compatibility:</b> Media is an IPP 1.1 attribute.
+ * </p>
+ *
* @author Michael Koch (konqueror@gmx.de)
+ * @author Wolfgang Baer (WBaer@gmx.de)
*/
public abstract class Media extends EnumSyntax
implements DocAttribute, PrintRequestAttribute, PrintJobAttribute
@@ -53,16 +73,40 @@ public abstract class Media extends EnumSyntax
/**
* Constructs a <code>Media</code> object.
+ *
+ * @param value the enum value.
*/
protected Media(int value)
{
super(value);
}
+
+ /**
+ * Tests if the given object is equal to this object.
+ * The objects are considered equal if both are of the same
+ * Media subclass, not null and the values are equal.
+ *
+ * @param obj the object to test
+ *
+ * @return <code>true</code> if both objects are equal,
+ * <code>false</code> otherwise.
+ */
+ public boolean equals(Object obj)
+ {
+ if ((obj instanceof MediaName && this instanceof MediaName)
+ || (obj instanceof MediaTray && this instanceof MediaTray)
+ || (obj instanceof MediaSizeName && this instanceof MediaSizeName))
+ {
+ return ((Media) obj).getValue() == this.getValue();
+ }
+
+ return false;
+ }
/**
* Returns category of this class.
*
- * @return the class <code>Media</code> itself
+ * @return The class <code>Media</code> itself.
*/
public Class getCategory()
{
@@ -72,7 +116,7 @@ public abstract class Media extends EnumSyntax
/**
* Returns the name of this attribute.
*
- * @return the name
+ * @return The name "media".
*/
public String getName()
{
diff --git a/javax/print/attribute/standard/MediaName.java b/javax/print/attribute/standard/MediaName.java
index a6dc3e63e..2fa7cea09 100644
--- a/javax/print/attribute/standard/MediaName.java
+++ b/javax/print/attribute/standard/MediaName.java
@@ -40,47 +40,82 @@ package javax.print.attribute.standard;
import javax.print.attribute.EnumSyntax;
/**
- * An enumeration of media types, which may be used in alternative to MediaSize/MediaTray.
- *
+ * <code>MediaName</code> is a subclass of the <code>Media</code> printing
+ * attribute and provides selection of media to be used by the means of
+ * defined names. The class pre-defines commonly available media names.
+ * This media type enumeration may be used in alternative to
+ * MediaSizeName/MediaTray.
+ * <p>
+ * <b>IPP Compatibility:</b> MediaName is not an IPP 1.1 attribute on its own.
+ * It provides parts of the <code>media</code> attribute type values.
+ * </p>
+ *
* @author Sven de Marothy
+ * @author Wolfgang Baer (WBaer@gmx.de)
*/
public class MediaName extends Media
{
+ private static final long serialVersionUID = 4653117714524155448L;
+
/**
- * Transparent A4
+ * The North American letter white medium.
*/
- public static final MediaName ISO_A4_TRANSPARENT = new MediaName(0);
-
+ public static final MediaName NA_LETTER_WHITE = new MediaName(0);
+
/**
- * White A4
+ * The North American letter transparent medium.
*/
- public static final MediaName ISO_A4_WHITE = new MediaName(1);
-
+ public static final MediaName NA_LETTER_TRANSPARENT = new MediaName(1);
+
/**
- * Transparent Letter
+ * The ISO A4 white medium.
*/
- public static final MediaName NA_LETTER_TRANSPARENT = new MediaName(2);
-
+ public static final MediaName ISO_A4_WHITE = new MediaName(2);
+
/**
- * White Letter
+ * The ISO A4 transparent medium.
*/
- public static final MediaName NA_LETTER_WHITE = new MediaName(3);
+ public static final MediaName ISO_A4_TRANSPARENT = new MediaName(3);
+ private static final String[] stringTable = { "na-letter-white",
+ "na-letter-transparent",
+ "iso-a4-white",
+ "iso-a4-transparent" };
+
+ private static final MediaName[] enumValueTable = { NA_LETTER_WHITE,
+ NA_LETTER_TRANSPARENT,
+ ISO_A4_WHITE,
+ ISO_A4_TRANSPARENT };
+
+ /**
+ * Creates a <code>MediaName</code> object.
+ *
+ * @param i the enum value.
+ */
protected MediaName(int i)
{
super( i );
}
- protected EnumSyntax[] getEnumValueTable()
+ /**
+ * Returns a table with the enumeration values represented as strings
+ * for this object.
+ *
+ * @return The enumeration values as strings.
+ */
+ protected String[] getStringTable()
{
- // FIXME
- return (EnumSyntax[])null;
+ return stringTable;
}
- protected String[] getStringTable()
+ /**
+ * Returns a table with the enumeration values for this object.
+ *
+ * @return The enumeration values.
+ */
+ protected EnumSyntax[] getEnumValueTable()
{
- // FIXME
- return (String[])null;
+ return enumValueTable;
}
}
diff --git a/javax/print/attribute/standard/MediaSizeName.java b/javax/print/attribute/standard/MediaSizeName.java
index ed345163d..e29b1ae34 100644
--- a/javax/print/attribute/standard/MediaSizeName.java
+++ b/javax/print/attribute/standard/MediaSizeName.java
@@ -1,5 +1,5 @@
/* MediaSizeName.java --
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -40,112 +40,458 @@ package javax.print.attribute.standard;
import javax.print.attribute.EnumSyntax;
/**
- * An enumeration of media size names, conforming to RFC 2911.
- *
+ * <code>MediaSizeName</code> is a subclass of the <code>Media</code> printing
+ * attribute and provides selection of media to be used by the means of
+ * defined size names. The class pre-defines commonly available media sizes.
+ * This media type enumeration may be used in alternative to
+ * MediaName/MediaTray.
+ * <p>
+ * <b>IPP Compatibility:</b> MediaSizeName is not an IPP 1.1 attribute on its
+ * own. It provides parts of the <code>media</code> attribute type values.
+ * </p>
+ *
* @author Michael Koch (konqueror@gmx.de)
+ * @author Wolfgang Baer (WBaer@gmx.de)
*/
public class MediaSizeName extends Media
{
private static final long serialVersionUID = 2778798329756942747L;
+ /**
+ * The ISO A0 size: 841 mm by 1189 mm.
+ */
public static final MediaSizeName ISO_A0 = new MediaSizeName(0);
+
+ /**
+ * The ISO A1 size: 594 mm by 841 mm.
+ */
public static final MediaSizeName ISO_A1 = new MediaSizeName(1);
+
+ /**
+ * The ISO A2 size: 420 mm by 594 mm.
+ */
public static final MediaSizeName ISO_A2 = new MediaSizeName(2);
+
+ /**
+ * The ISO A3 size: 297 mm by 420 mm.
+ */
public static final MediaSizeName ISO_A3 = new MediaSizeName(3);
+
+ /**
+ * The ISO A4 size: 210 mm by 297 mm.
+ */
public static final MediaSizeName ISO_A4 = new MediaSizeName(4);
+
+ /**
+ * The ISO A5 size: 148 mm by 210 mm.
+ */
public static final MediaSizeName ISO_A5 = new MediaSizeName(5);
+
+ /**
+ * The ISO A6 size: 105 mm by 148 mm.
+ */
public static final MediaSizeName ISO_A6 = new MediaSizeName(6);
+
+ /**
+ * The ISO A7 size: 74 mm by 105 mm.
+ */
public static final MediaSizeName ISO_A7 = new MediaSizeName(7);
+
+ /**
+ * The ISO A8 size: 52 mm by 74 mm.
+ */
public static final MediaSizeName ISO_A8 = new MediaSizeName(8);
+
+ /**
+ * The ISO A9 size: 37 mm by 52 mm.
+ */
public static final MediaSizeName ISO_A9 = new MediaSizeName(9);
+
+ /**
+ * The ISO A10 size: 26 mm by 37 mm.
+ */
public static final MediaSizeName ISO_A10 = new MediaSizeName(10);
+
+ /**
+ * The ISO B0 size: 1000 mm by 1414 mm.
+ */
public static final MediaSizeName ISO_B0 = new MediaSizeName(11);
+
+ /**
+ * The ISO B1 size: 707 mm by 1000 mm.
+ */
public static final MediaSizeName ISO_B1 = new MediaSizeName(12);
+
+ /**
+ * The ISO B2 size: 500 mm by 707 mm.
+ */
public static final MediaSizeName ISO_B2 = new MediaSizeName(13);
+
+ /**
+ * The ISO B3 size: 353 mm by 500 mm.
+ */
public static final MediaSizeName ISO_B3 = new MediaSizeName(14);
+
+ /**
+ * The ISO B4 size: 250 mm by 353 mm.
+ */
public static final MediaSizeName ISO_B4 = new MediaSizeName(15);
+
+ /**
+ * The ISO B5 size: 176 mm by 250 mm.
+ */
public static final MediaSizeName ISO_B5 = new MediaSizeName(16);
+
+ /**
+ * The ISO B6 size: 125 mm by 176 mm.
+ */
public static final MediaSizeName ISO_B6 = new MediaSizeName(17);
+
+ /**
+ * The ISO B7 size: 88 mm by 125 mm.
+ */
public static final MediaSizeName ISO_B7 = new MediaSizeName(18);
+
+ /**
+ * The ISO B8 size: 62 mm by 88 mm.
+ */
public static final MediaSizeName ISO_B8 = new MediaSizeName(19);
+
+ /**
+ * The ISO B9 size: 44 mm by 62 mm.
+ */
public static final MediaSizeName ISO_B9 = new MediaSizeName(20);
+
+ /**
+ * The ISO B10 size: 31 mm by 44 mm.
+ */
public static final MediaSizeName ISO_B10 = new MediaSizeName(21);
+
+ /**
+ * The JIS B0 size: 1030mm x 1456mm.
+ */
public static final MediaSizeName JIS_B0 = new MediaSizeName(22);
+
+ /**
+ * The JIS B1 size: 728mm x 1030mm.
+ */
public static final MediaSizeName JIS_B1 = new MediaSizeName(23);
+
+ /**
+ * The JIS B2 size: 515mm x 728mm.
+ */
public static final MediaSizeName JIS_B2 = new MediaSizeName(24);
+
+ /**
+ * The JIS B3 size: 364mm x 515mm.
+ */
public static final MediaSizeName JIS_B3 = new MediaSizeName(25);
+
+ /**
+ * The JIS B4 size: 257mm x 364mm.
+ */
public static final MediaSizeName JIS_B4 = new MediaSizeName(26);
+
+ /**
+ * The JIS B5 size: 182mm x 257mm.
+ */
public static final MediaSizeName JIS_B5 = new MediaSizeName(27);
+
+ /**
+ * The JIS B6 size: 128mm x 182mm.
+ */
public static final MediaSizeName JIS_B6 = new MediaSizeName(28);
+
+ /**
+ * The JIS B7 size: 91mm x 128mm.
+ */
public static final MediaSizeName JIS_B7 = new MediaSizeName(29);
+
+ /**
+ * The JIS B8 size: 64mm x 91mm.
+ */
public static final MediaSizeName JIS_B8 = new MediaSizeName(30);
+
+ /**
+ * The JIS B9 size: 45mm x 64mm.
+ */
public static final MediaSizeName JIS_B9 = new MediaSizeName(31);
+
+ /**
+ * The JIS B10 size: 32mm x 45mm.
+ */
public static final MediaSizeName JIS_B10 = new MediaSizeName(32);
+
+ /**
+ * The ISO C0 size: 917 mm by 1297 mm.
+ */
public static final MediaSizeName ISO_C0 = new MediaSizeName(33);
+
+ /**
+ * The ISO C1 size: 648 mm by 917 mm.
+ */
public static final MediaSizeName ISO_C1 = new MediaSizeName(34);
+
+ /**
+ * The ISO C2 size: 458 mm by 648 mm.
+ */
public static final MediaSizeName ISO_C2 = new MediaSizeName(35);
+
+ /**
+ * The ISO C3 size: 324 mm by 458 mm.
+ */
public static final MediaSizeName ISO_C3 = new MediaSizeName(36);
+
+ /**
+ * The ISO C4 size: 229 mm by 324 mm.
+ */
public static final MediaSizeName ISO_C4 = new MediaSizeName(37);
+
+ /**
+ * The ISO C5 size: 162 mm by 229 mm.
+ */
public static final MediaSizeName ISO_C5 = new MediaSizeName(38);
+
+ /**
+ * The ISO C6 size: 114 mm by 162 mm.
+ */
public static final MediaSizeName ISO_C6 = new MediaSizeName(39);
+
+ /**
+ * The North American letter size: 8.5 inches by 11 inches.
+ */
public static final MediaSizeName NA_LETTER = new MediaSizeName(40);
+
+ /**
+ * The North American legal size: 8.5 inches by 14 inches.
+ */
public static final MediaSizeName NA_LEGAL = new MediaSizeName(41);
+
+ /**
+ * The executive size: 7.25 inches by 10.5 inches.
+ */
public static final MediaSizeName EXECUTIVE = new MediaSizeName(42);
+
+ /**
+ * The ledger size: 11 inches by 17 inches.
+ */
public static final MediaSizeName LEDGER = new MediaSizeName(43);
+
+ /**
+ * The tabloid size: 11 inches by 17 inches.
+ */
public static final MediaSizeName TABLOID = new MediaSizeName(44);
+
+ /**
+ * The invoice size: 5.5 inches by 8.5 inches.
+ */
public static final MediaSizeName INVOICE = new MediaSizeName(45);
+
+ /**
+ * The folio size: 8.5 inches by 13 inches.
+ */
public static final MediaSizeName FOLIO = new MediaSizeName(46);
+
+ /**
+ * The quarto size: 8.5 inches by 10.83 inches.
+ */
public static final MediaSizeName QUARTO = new MediaSizeName(47);
+
+ /**
+ * The Japanese postcard size, 100 mm by 148 mm.
+ */
public static final MediaSizeName JAPANESE_POSTCARD = new MediaSizeName(48);
+
+ /**
+ * The Japanese Double postcard size: 148 mm by 200 mm.
+ */
public static final MediaSizeName JAPANESE_DOUBLE_POSTCARD =
new MediaSizeName(49);
+
+ /**
+ * The engineering ANSI A size medium: 8.5 inches x 11 inches.
+ */
public static final MediaSizeName A = new MediaSizeName(50);
+
+ /**
+ * The engineering ANSI B size medium: 11 inches x 17 inches.
+ */
public static final MediaSizeName B = new MediaSizeName(51);
+
+ /**
+ * The engineering ANSI C size medium: 17 inches x 22 inches.
+ */
public static final MediaSizeName C = new MediaSizeName(52);
+
+ /**
+ * The engineering ANSI D size medium: 22 inches x 34 inches.
+ */
public static final MediaSizeName D = new MediaSizeName(53);
+
+ /**
+ * The engineering ANSI E size medium: 34 inches x 44 inches.
+ */
public static final MediaSizeName E = new MediaSizeName(54);
+
+ /**
+ * The ISO Designated Long size: 110 mm by 220 mm.
+ */
public static final MediaSizeName ISO_DESIGNATED_LONG =
new MediaSizeName(55);
+
+ /**
+ * The Italy envelope size: 110 mm by 230 mm.
+ */
public static final MediaSizeName ITALY_ENVELOPE = new MediaSizeName(56);
+
+ /**
+ * The Monarch envelope size: 3.87 inch by 7.5 inch.
+ */
public static final MediaSizeName MONARCH_ENVELOPE = new MediaSizeName(57);
+
+ /**
+ * The Personal envelope size: 3.625 inch by 6.5 inch.
+ */
public static final MediaSizeName PERSONAL_ENVELOPE = new MediaSizeName(58);
+
+ /**
+ * The North American number 9 business envelope size:
+ * 3.875 inches by 8.875 inches.
+ */
public static final MediaSizeName NA_NUMBER_9_ENVELOPE =
new MediaSizeName(59);
+
+ /**
+ * The North American number 10 business envelope size:
+ * 4.125 inches by 9.5 inches.
+ */
public static final MediaSizeName NA_NUMBER_10_ENVELOPE =
new MediaSizeName(60);
+
+ /**
+ * The North American number 11 business envelope size:
+ * 4.5 inches by 10.375 inches.
+ */
public static final MediaSizeName NA_NUMBER_11_ENVELOPE =
new MediaSizeName(61);
+
+ /**
+ * The North American number 12 business envelope size:
+ * 4.75 inches by 11 inches.
+ */
public static final MediaSizeName NA_NUMBER_12_ENVELOPE =
new MediaSizeName(62);
+
+ /**
+ * The North American number 14 business envelope size:
+ * 5 inches by 11.5 inches.
+ */
public static final MediaSizeName NA_NUMBER_14_ENVELOPE =
new MediaSizeName(63);
+
+ /**
+ * The North American 6x9 inch envelope size.
+ */
public static final MediaSizeName NA_6X9_ENVELOPE = new MediaSizeName(64);
+
+ /**
+ * The North American 7x9 inch envelope size.
+ */
public static final MediaSizeName NA_7X9_ENVELOPE = new MediaSizeName(65);
+
+ /**
+ * The North American 9x11 inch envelope size.
+ */
public static final MediaSizeName NA_9X11_ENVELOPE = new MediaSizeName(66);
+
+ /**
+ * The North American 9x12 inch envelope size.
+ */
public static final MediaSizeName NA_9X12_ENVELOPE = new MediaSizeName(67);
+
+ /**
+ * The North American 10x13 inch envelope size.
+ */
public static final MediaSizeName NA_10X13_ENVELOPE = new MediaSizeName(68);
+
+ /**
+ * The North American 10x14 inch envelope size.
+ */
public static final MediaSizeName NA_10X14_ENVELOPE = new MediaSizeName(69);
+
+ /**
+ * The North American 10x15 inch envelope size.
+ */
public static final MediaSizeName NA_10X15_ENVELOPE = new MediaSizeName(70);
+
+ /**
+ * The North American 5 inches by 7 inches.
+ */
public static final MediaSizeName NA_5X7 = new MediaSizeName(71);
+
+ /**
+ * The North American 8 inches by 10 inches.
+ */
public static final MediaSizeName NA_8X10 = new MediaSizeName(72);
+ private static final String[] stringTable =
+ { "iso-a0", "iso-a1", "iso-a2", "iso-a3", "iso-a4", "iso-a5", "iso-a6",
+ "iso-a7", "iso-a8", "iso-a9", "iso-a10", "iso-b0", "iso-b1", "iso-b2",
+ "iso-b3", "iso-b4", "iso-b5", "iso-b6", "iso-b7", "iso-b8", "iso-b9",
+ "iso-b10", "jis-b0", "jis-b1", "jis-b2", "jis-b3", "jis-b4", "jis-b5",
+ "jis-b6", "jis-b7", "jis-b8", "jis-b9", "jis-b10", "iso-c0", "iso-c1",
+ "iso-c2", "iso-c3", "iso-c4", "iso-c5", "iso-c6", "na-letter",
+ "na-legal", "executive", "ledger", "tabloid", "invoice", "folio",
+ "quarto", "japanese-postcard", "oufuko-postcard", "a", "b", "c", "d",
+ "e", "iso-designated-long", "italian-envelope", "monarch-envelope",
+ "personal-envelope", "na-number-9-envelope", "na-number-10-envelope",
+ "na-number-11-envelope", "na-number-12-envelope",
+ "na-number-14-envelope", "na-6x9-envelope", "na-7x9-envelope",
+ "na-9x11-envelope", "na-9x12-envelope", "na-10x13-envelope",
+ "na-10x14-envelope", "na-10x15-envelope", "na-5x7", "na-8x10" };
+
+ private static final MediaSizeName[] enumValueTable =
+ { ISO_A0, ISO_A1, ISO_A2, ISO_A3, ISO_A4, ISO_A5, ISO_A6, ISO_A7, ISO_A8,
+ ISO_A9, ISO_A10, ISO_B0, ISO_B1, ISO_B2, ISO_B3, ISO_B4, ISO_B5, ISO_B6,
+ ISO_B7, ISO_B8, ISO_B9, ISO_B10, JIS_B0, JIS_B1, JIS_B2, JIS_B3, JIS_B4,
+ JIS_B5, JIS_B6, JIS_B7, JIS_B8, JIS_B9, JIS_B10, ISO_C0, ISO_C1, ISO_C2,
+ ISO_C3, ISO_C4, ISO_C5, ISO_C6, NA_LETTER, NA_LEGAL, EXECUTIVE, LEDGER,
+ TABLOID, INVOICE, FOLIO, QUARTO, JAPANESE_POSTCARD,
+ JAPANESE_DOUBLE_POSTCARD, A, B, C, D, E, ISO_DESIGNATED_LONG,
+ ITALY_ENVELOPE, MONARCH_ENVELOPE, PERSONAL_ENVELOPE,
+ NA_NUMBER_9_ENVELOPE, NA_NUMBER_10_ENVELOPE, NA_NUMBER_11_ENVELOPE,
+ NA_NUMBER_12_ENVELOPE, NA_NUMBER_14_ENVELOPE, NA_6X9_ENVELOPE,
+ NA_7X9_ENVELOPE, NA_9X11_ENVELOPE, NA_9X12_ENVELOPE, NA_10X13_ENVELOPE,
+ NA_10X14_ENVELOPE, NA_10X15_ENVELOPE, NA_5X7, NA_8X10 };
+
/**
* Constructs a <code>MediaSizeName</code> object.
+ *
+ * @param value the enum value.
*/
protected MediaSizeName(int value)
{
super(value);
}
- protected EnumSyntax[] getEnumValueTable()
+ /**
+ * Returns a table with the enumeration values represented as strings
+ * for this object.
+ *
+ * @return The enumeration values as strings.
+ */
+ protected String[] getStringTable()
{
- // FIXME
- return null;
+ return stringTable;
}
- protected String[] getStringTable()
+ /**
+ * Returns a table with the enumeration values for this object.
+ *
+ * @return The enumeration values.
+ */
+ protected EnumSyntax[] getEnumValueTable()
{
- // FIXME
- return null;
+ return enumValueTable;
}
}
diff --git a/javax/print/attribute/standard/MediaTray.java b/javax/print/attribute/standard/MediaTray.java
index 36e11b259..23811a0a4 100644
--- a/javax/print/attribute/standard/MediaTray.java
+++ b/javax/print/attribute/standard/MediaTray.java
@@ -40,67 +40,103 @@ package javax.print.attribute.standard;
import javax.print.attribute.EnumSyntax;
/**
- * An enumeration of input tray parameters.
- *
+ * <code>MediaTray</code> is a subclass of the <code>Media</code> printing
+ * attribute and provides selection of media to be used by the means of the
+ * input tray of the printer. The class pre-defines commonly available types
+ * of input trays in printers. This media type enumeration may be used in
+ * alternative to MediaSizeName/MediaName.
+ * <p>
+ * <b>IPP Compatibility:</b> MediaTray is not an IPP 1.1 attribute on its own.
+ * It provides parts of the <code>media</code> attribute type values.
+ * </p>
+ *
* @author Sven de Marothy
+ * @author Wolfgang Baer (WBaer@gmx.de)
*/
public class MediaTray extends Media
{
+
+ private static final long serialVersionUID = -982503611095214703L;
+
/**
- * Bottom tray
+ * Top tray
*/
- public static final MediaTray BOTTOM = new MediaTray(0);
-
+ public static final MediaTray TOP = new MediaTray(0);
+
/**
- * Envelope tray
+ * Middle tray
*/
- public static final MediaTray ENVELOPE = new MediaTray(1);
-
+ public static final MediaTray MIDDLE = new MediaTray(1);
+
/**
- * Large capacity tray
+ * Bottom tray
*/
- public static final MediaTray LARGE_CAPACITY = new MediaTray(2);
+ public static final MediaTray BOTTOM = new MediaTray(2);
/**
- * Main tray
+ * Envelope tray
*/
- public static final MediaTray MAIN = new MediaTray(3);
+ public static final MediaTray ENVELOPE = new MediaTray(3);
/**
* Manual-feed tray
*/
public static final MediaTray MANUAL = new MediaTray(4);
-
+
/**
- * Middle tray
+ * Large capacity tray
*/
- public static final MediaTray MIDDLE = new MediaTray(5);
+ public static final MediaTray LARGE_CAPACITY = new MediaTray(5);
/**
- * Side tray
+ * Main tray
*/
- public static final MediaTray SIDE = new MediaTray(6);
-
+ public static final MediaTray MAIN = new MediaTray(6);
+
/**
- * Top tray
+ * Side tray
*/
- public static final MediaTray TOP = new MediaTray(7);
+ public static final MediaTray SIDE = new MediaTray(7);
+
+ private static final String[] stringTable = { "top", "middle", "bottom",
+ "envelope", "manual",
+ "large-capacity", "main",
+ "side" };
+ private static final MediaTray[] enumValueTable = { TOP, MIDDLE, BOTTOM,
+ ENVELOPE, MANUAL,
+ LARGE_CAPACITY, MAIN,
+ SIDE };
+
+ /**
+ * Creates a <code>MediaTray</code> object.
+ *
+ * @param i the enum value.
+ */
protected MediaTray(int i)
{
super( i );
}
- protected EnumSyntax[] getEnumValueTable()
+ /**
+ * Returns a table with the enumeration values represented as strings
+ * for this object.
+ *
+ * @return The enumeration values as strings.
+ */
+ protected String[] getStringTable()
{
- // FIXME
- return (EnumSyntax[])null;
+ return stringTable;
}
- protected String[] getStringTable()
+ /**
+ * Returns a table with the enumeration values for this object.
+ *
+ * @return The enumeration values.
+ */
+ protected EnumSyntax[] getEnumValueTable()
{
- // FIXME
- return (String[])null;
+ return enumValueTable;
}
}
diff --git a/javax/print/attribute/standard/PresentationDirection.java b/javax/print/attribute/standard/PresentationDirection.java
index bd1821d12..3a479abfa 100644
--- a/javax/print/attribute/standard/PresentationDirection.java
+++ b/javax/print/attribute/standard/PresentationDirection.java
@@ -1,5 +1,5 @@
/* PresentationDirection.java --
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -43,32 +43,90 @@ import javax.print.attribute.PrintRequestAttribute;
/**
+ * The <code>PresentationDirection</code> attribute specifies
+ * a value to be used together with the <code>NumberUp</code> attribute
+ * to indicate the layout of multiple pages on a single media sheet.
+ * <p>
+ * <b>IPP Compatibility:</b> PresentationDirection is not an IPP 1.1
+ * attribute.
+ * </p>
+ *
* @author Michael Koch (konqueror@gmx.de)
+ * @author Wolfgang Baer (WBaer@gmx.de)
*/
public final class PresentationDirection extends EnumSyntax
implements PrintRequestAttribute, PrintJobAttribute
{
private static final long serialVersionUID = 8294728067230931780L;
+ /**
+ * The single pages are arranged on the media in columns starting
+ * at the top left towards the bottom left.
+ */
public static final PresentationDirection TOBOTTOM_TORIGHT =
new PresentationDirection(0);
+
+ /**
+ * The single pages are arranged on the media in columns starting
+ * at the top right towards the bottom left.
+ */
public static final PresentationDirection TOBOTTOM_TOLEFT =
new PresentationDirection(1);
+
+ /**
+ * The single pages are arranged on the media in columns starting
+ * at the bottom left towards the top right.
+ */
public static final PresentationDirection TOTOP_TORIGHT =
new PresentationDirection(2);
+
+ /**
+ * The single pages are arranged on the media in columns starting
+ * at the bottom right towards the top left.
+ */
public static final PresentationDirection TOTOP_TOLEFT =
new PresentationDirection(3);
+
+ /**
+ * The single pages are arranged on the media in rows starting
+ * at the top left towards the right bottom.
+ */
public static final PresentationDirection TORIGHT_TOBOTTOM =
new PresentationDirection(4);
+
+ /**
+ * The single pages are arranged on the media in rows starting
+ * at the bottom left towards the right top.
+ */
public static final PresentationDirection TORIGHT_TOTOP =
new PresentationDirection(5);
+
+ /**
+ * The single pages are arranged on the media in rows starting
+ * at the top right towards the left bottom.
+ */
public static final PresentationDirection TOLEFT_TOBOTTOM =
new PresentationDirection(6);
+
+ /**
+ * The single pages are arranged on the media in rows starting
+ * at the bottom right towards the left top.
+ */
public static final PresentationDirection TOLEFT_TOTOP =
new PresentationDirection(7);
+ private static final String[] stringTable = { "tobottom-toright",
+ "tobottom-toleft", "totop-toright", "totop-toleft", "toright-tobottom",
+ "toright-totop", "toleft-tobottom", "toleft-totop" };
+
+ private static final PresentationDirection[] enumValueTable =
+ { TOBOTTOM_TORIGHT, TOBOTTOM_TOLEFT, TOTOP_TORIGHT, TOTOP_TOLEFT,
+ TORIGHT_TOBOTTOM, TORIGHT_TOTOP, TOLEFT_TOBOTTOM, TOLEFT_TOTOP };
+
/**
* Constructs a <code>PresentationDirection</code> object.
+ *
+ * @param value the enum value.
*/
private PresentationDirection(int value)
{
@@ -78,7 +136,7 @@ public final class PresentationDirection extends EnumSyntax
/**
* Returns category of this class.
*
- * @return the class <code>PresentationDirection</code> itself
+ * @return The class <code>PresentationDirection</code> itself.
*/
public Class getCategory()
{
@@ -88,10 +146,31 @@ public final class PresentationDirection extends EnumSyntax
/**
* Returns the name of this attribute.
*
- * @return the name
+ * @return The name "presentation-direction".
*/
public String getName()
{
return "presentation-direction";
}
+
+ /**
+ * 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/PrinterState.java b/javax/print/attribute/standard/PrinterState.java
index 28d78cd50..6fd4c3f46 100644
--- a/javax/print/attribute/standard/PrinterState.java
+++ b/javax/print/attribute/standard/PrinterState.java
@@ -1,5 +1,5 @@
/* PrinterState.java --
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -42,20 +42,61 @@ import javax.print.attribute.PrintServiceAttribute;
/**
+ * The <code>PrinterState</code> printing attribute reports
+ * the current state of the printer device.
+ * <p>
+ * The {@link javax.print.attribute.standard.PrinterStateReasons}
+ * attribute provides further detailed information about
+ * the given printer state. Detailed information about the printer
+ * state and printer state reasons attributes can be found in the
+ * RFC 2911.
+ * </p>
+ * <p>
+ * <b>IPP Compatibility:</b> PrinterState is an IPP 1.1 attribute.
+ * </p>
+ *
* @author Michael Koch (konqueror@gmx.de)
+ * @author Wolfgang Baer (WBaer@gmx.de)
*/
public final class PrinterState extends EnumSyntax
implements PrintServiceAttribute
{
private static final long serialVersionUID = -649578618346507718L;
+ /**
+ * The state is unknown currently.
+ */
public static final PrinterState UNKNOWN = new PrinterState(0);
- public static final PrinterState IDLE = new PrinterState(1);
- public static final PrinterState PROCESSING = new PrinterState(2);
- public static final PrinterState STOPPED = new PrinterState(3);
+
+ /**
+ * The printer device is in idle state. New jobs can start
+ * processing without waiting.
+ */
+ public static final PrinterState IDLE = new PrinterState(3);
+
+ /**
+ * The printer device is in processing state.
+ */
+ public static final PrinterState PROCESSING = new PrinterState(4);
+
+ /**
+ * The printer device has stopped. No jobs can be processed and
+ * normally manual intervention is needed.
+ */
+ public static final PrinterState STOPPED = new PrinterState(5);
+ private static final String[] stringTable = { "unknown", null, null,
+ "idle", "processing",
+ "stopped" };
+
+ private static final PrinterState[] enumValueTable = { UNKNOWN, null, null,
+ IDLE, PROCESSING,
+ STOPPED };
+
/**
* Constructs a <code>PrinterState</code> object.
+ *
+ * @param value the enum value.
*/
protected PrinterState(int value)
{
@@ -65,7 +106,7 @@ public final class PrinterState extends EnumSyntax
/**
* Returns category of this class.
*
- * @return the class <code>PrinterState</code> itself
+ * @return The class <code>PrinterState</code> itself.
*/
public Class getCategory()
{
@@ -75,10 +116,31 @@ public final class PrinterState extends EnumSyntax
/**
* Returns the name of this attribute.
*
- * @return the name
+ * @return The name "printer-state".
*/
public String getName()
{
return "printer-state";
}
+
+ /**
+ * 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/PrinterStateReason.java b/javax/print/attribute/standard/PrinterStateReason.java
index 847395e49..3a1358544 100644
--- a/javax/print/attribute/standard/PrinterStateReason.java
+++ b/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;
+ }
}
diff --git a/javax/print/attribute/standard/ReferenceUriSchemesSupported.java b/javax/print/attribute/standard/ReferenceUriSchemesSupported.java
index b4c0d9408..8a00218b8 100644
--- a/javax/print/attribute/standard/ReferenceUriSchemesSupported.java
+++ b/javax/print/attribute/standard/ReferenceUriSchemesSupported.java
@@ -1,5 +1,5 @@
/* ReferenceUriSchemesSupported.java --
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -42,33 +42,82 @@ import javax.print.attribute.EnumSyntax;
/**
+ * The <code>ReferenceUriSchemesSupported</code> attribute provides
+ * the supported URI schemes (e.g. ftp) which are supported by the
+ * printer service to be used as uri reference for document data.
+ * <p>
+ * <b>IPP Compatibility:</b> ReferenceUriSchemesSupported is an IPP 1.1
+ * attribute.
+ * </p>
+ *
* @author Michael Koch (konqueror@gmx.de)
+ * @author Wolfgang Baer (WBaer@gmx.de)
*/
public class ReferenceUriSchemesSupported extends EnumSyntax
implements Attribute
{
private static final long serialVersionUID = -8989076942813442805L;
+ /**
+ * The file transfer protocol (FTP).
+ */
public static final ReferenceUriSchemesSupported FTP =
new ReferenceUriSchemesSupported(0);
+
+ /**
+ * The hyper text transfer protocol (HTTP).
+ */
public static final ReferenceUriSchemesSupported HTTP =
new ReferenceUriSchemesSupported(1);
+
+ /**
+ * The secure hyper text transfer protocol (HTTPS).
+ */
public static final ReferenceUriSchemesSupported HTTPS =
new ReferenceUriSchemesSupported(2);
+
+ /**
+ * The gopher protocol.
+ */
public static final ReferenceUriSchemesSupported GOPHER =
new ReferenceUriSchemesSupported(3);
+
+ /**
+ * The USENET news - RFC 1738.
+ */
public static final ReferenceUriSchemesSupported NEWS =
new ReferenceUriSchemesSupported(4);
+
+ /**
+ * The network news transfer protocol (NNTP) - RFC 1738.
+ */
public static final ReferenceUriSchemesSupported NNTP =
new ReferenceUriSchemesSupported(5);
+
+ /**
+ * The wide area information server protocol (WAIS) - RFC 4156.
+ */
public static final ReferenceUriSchemesSupported WAIS =
new ReferenceUriSchemesSupported(6);
+
+ /**
+ * A filename specific to the host.
+ */
public static final ReferenceUriSchemesSupported FILE =
new ReferenceUriSchemesSupported(7);
- /**
- * Constructs a <code>ReferenceUriSchemeSupported</code> object.
- */
+ private static final String[] stringTable = { "ftp", "http", "https",
+ "gopher", "news", "nntp",
+ "wais", "file" };
+
+ private static final ReferenceUriSchemesSupported[] enumValueTable =
+ { FTP, HTTP, HTTPS, GOPHER, NEWS, NNTP, WAIS, FILE };
+
+ /**
+ * Constructs a <code>ReferenceUriSchemeSupported</code> object.
+ *
+ * @param value the enum value.
+ */
protected ReferenceUriSchemesSupported(int value)
{
super(value);
@@ -77,7 +126,7 @@ public class ReferenceUriSchemesSupported extends EnumSyntax
/**
* Returns category of this class.
*
- * @return the class <code>ReferenceUriSchemesSupported</code> itself
+ * @return The class <code>ReferenceUriSchemesSupported</code> itself.
*/
public Class getCategory()
{
@@ -85,12 +134,33 @@ public class ReferenceUriSchemesSupported extends EnumSyntax
}
/**
- * Returns name of this class.
+ * Returns the name of this attribute.
*
- * @return the string "reference-uri-schemes-supported"
+ * @return The name "reference-uri-schemes-supported".
*/
public String getName()
{
return "reference-uri-schemes-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/SheetCollate.java b/javax/print/attribute/standard/SheetCollate.java
index a4e31f443..5343bc6df 100644
--- a/javax/print/attribute/standard/SheetCollate.java
+++ b/javax/print/attribute/standard/SheetCollate.java
@@ -1,5 +1,5 @@
/* SheetCollate.java --
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -44,16 +44,49 @@ import javax.print.attribute.PrintRequestAttribute;
/**
+ * The <code>SheetCollate</code> printing attribute specifies
+ * whether or not the sheets of each copy in a print job have to be
+ * in sequence.
+ * <p>
+ * The attribute only makes sense if multiple copies are specified through
+ * the <code>Copies</code> printing attribute. If <code>UNCOLLATED</code>
+ * is specified every page of a print job is printed for all requested
+ * copies before the next page is processed. <code>COLLATED</code> means
+ * that for every copy requested the pages have to be printed in sequence.
+ * </p>
+ * <p>
+ * <b>IPP Compatibility:</b> SheetCollate is not an IPP 1.1 attribute.
+ * </p>
+ *
* @author Michael Koch (konqueror@gmx.de)
+ * @author Wolfgang Baer (WBaer@gmx.de)
*/
public final class SheetCollate extends EnumSyntax
implements DocAttribute, PrintRequestAttribute, PrintJobAttribute
{
private static final long serialVersionUID = 7080587914259873003L;
+ /**
+ * The sheets of the different copies are uncollated.
+ */
public static final SheetCollate UNCOLLATED = new SheetCollate(0);
+
+ /**
+ * The sheets of the different copies are collated.
+ */
public static final SheetCollate COLLATED = new SheetCollate(1);
+
+ private static final String[] stringTable = { "uncollated", "collated" };
+
+ private static final SheetCollate[] enumValueTable = { UNCOLLATED,
+ COLLATED };
+
+ /**
+ * Creates a <code>SheetCollate</code> object.
+ *
+ * @param value the enum value.
+ */
protected SheetCollate(int value)
{
super(value);
@@ -62,7 +95,7 @@ public final class SheetCollate extends EnumSyntax
/**
* Returns category of this class.
*
- * @return the class <code>SheetCollate</code> itself
+ * @return The class <code>SheetCollate</code> itself.
*/
public Class getCategory()
{
@@ -70,12 +103,33 @@ public final class SheetCollate extends EnumSyntax
}
/**
- * Returns name of this class.
+ * Returns the name of this attribute.
*
- * @return the string "sheet-collate"
+ * @return The name "sheet-collate".
*/
public String getName()
{
return "sheet-collate";
}
+
+ /**
+ * 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;
+ }
}