diff options
author | Mark Wielaard <mark@gcc.gnu.org> | 2004-05-15 20:39:10 +0000 |
---|---|---|
committer | Mark Wielaard <mark@gcc.gnu.org> | 2004-05-15 20:39:10 +0000 |
commit | 85ff6f624e23ae016b859f4829dd6f177b24c8b7 (patch) | |
tree | 73cba0b7256346db3e226b255a113c6de89e2c8f /libjava/javax | |
parent | 7cd9b02827c8e773dc0c484a24dda26cfb2c8f1f (diff) | |
download | gcc-85ff6f624e23ae016b859f4829dd6f177b24c8b7.zip gcc-85ff6f624e23ae016b859f4829dd6f177b24c8b7.tar.gz gcc-85ff6f624e23ae016b859f4829dd6f177b24c8b7.tar.bz2 |
[multiple changes]
2004-05-15 Mark Wielaard <mark@klomp.org>
* Makefile.am (ordinary_java_source_files): Add new javax.print
classes.
* Makefile.in: Regenerated.
2004-05-15 Michael Koch <konqueror@gmx.de>
* javax/print/attribute/standard/DateTimeAtCompleted.java,
javax/print/attribute/standard/DateTimeAtCreation.java,
javax/print/attribute/standard/DateTimeAtProcessing.java,
javax/print/attribute/standard/DocumentName.java,
javax/print/attribute/standard/JobHoldUntil.java,
javax/print/attribute/standard/JobImpressionsCompleted.java,
javax/print/attribute/standard/JobMessageFromOperator.java,
javax/print/attribute/standard/JobName.java,
javax/print/attribute/standard/JobOriginatingUserName.java,
javax/print/attribute/standard/JobPriority.java,
javax/print/attribute/standard/JobPrioritySupported.java,
javax/print/attribute/standard/NumberOfInterveningJobs.java,
javax/print/attribute/standard/OutputDeviceAssigned.java,
javax/print/attribute/standard/PrinterInfo.java,
javax/print/attribute/standard/PrinterLocation.java,
javax/print/attribute/standard/PrinterMakeAndModel.java,
javax/print/attribute/standard/PrinterMessageFromOperator.java,
javax/print/attribute/standard/PrinterName.java,
javax/print/attribute/standard/QueuedJobCount.java,
javax/print/attribute/standard/RequestingUserName.java:
Fixed javadocs all over.
2004-05-15 Michael Koch <konqueror@gmx.de>
* javax/print/DocFlavor.java,
javax/print/attribute/standard/ColorSupported.java,
javax/print/attribute/standard/Compression.java,
javax/print/attribute/standard/CopiesSupported.java,
javax/print/attribute/standard/Fidelity.java,
javax/print/attribute/standard/Finishings.java,
javax/print/attribute/standard/JobImpressionsSupported.java,
javax/print/attribute/standard/JobKOctetsSupported.java,
javax/print/attribute/standard/JobMediaSheetsSupported.java,
javax/print/attribute/standard/JobSheets.java,
javax/print/attribute/standard/JobState.java,
javax/print/attribute/standard/JobStateReason.java,
javax/print/attribute/standard/JobStateReasons.java,
javax/print/attribute/standard/Media.java,
javax/print/attribute/standard/MediaSizeName.java,
javax/print/attribute/standard/MultipleDocumentHandling.java,
javax/print/attribute/standard/NumberUpSupported.java,
javax/print/attribute/standard/OrientationRequested.java,
javax/print/attribute/standard/PDLOverrideSupported.java,
javax/print/attribute/standard/PageRanges.java,
javax/print/attribute/standard/PresentationDirection.java,
javax/print/attribute/standard/PrintQuality.java,
javax/print/attribute/standard/PrinterIsAcceptingJobs.java,
javax/print/attribute/standard/PrinterMoreInfo.java,
javax/print/attribute/standard/PrinterMoreInfoManufacturer.java,
javax/print/attribute/standard/PrinterResolution.java,
javax/print/attribute/standard/PrinterState.java,
javax/print/attribute/standard/PrinterStateReason.java,
javax/print/attribute/standard/PrinterStateReasons.java,
javax/print/attribute/standard/PrinterURI.java,
javax/print/attribute/standard/ReferenceUriSchemesSupported.java,
javax/print/attribute/standard/Severity.java,
javax/print/attribute/standard/SheetCollate.java,
javax/print/attribute/standard/Sides.java:
Added serialVersionUID and removed final keyword where it doenst
belong.
2004-05-15 Michael Koch <konqueror@gmx.de>
* javax/print/PrintServiceLookup.java: New file.
2004-05-15 Michael Koch <konqueror@gmx.de>
* javax/print/DocFlavor.java:
Implemented all flavor classes.
2004-05-15 Michael Koch <konqueror@gmx.de>
* javax/print/attribute/standard/ColorSupported.java,
javax/print/attribute/standard/Compression.java,
javax/print/attribute/standard/CopiesSupported.java,
javax/print/attribute/standard/Fidelity.java,
javax/print/attribute/standard/Finishings.java,
javax/print/attribute/standard/JobImpressionsSupported.java,
javax/print/attribute/standard/JobKOctetsSupported.java,
javax/print/attribute/standard/JobMediaSheetsSupported.java,
javax/print/attribute/standard/JobSheets.java,
javax/print/attribute/standard/JobState.java,
javax/print/attribute/standard/JobStateReason.java,
javax/print/attribute/standard/JobStateReasons.java,
javax/print/attribute/standard/Media.java,
javax/print/attribute/standard/MediaSizeName.java,
javax/print/attribute/standard/MultipleDocumentHandling.java,
javax/print/attribute/standard/NumberUpSupported.java,
javax/print/attribute/standard/OrientationRequested.java,
javax/print/attribute/standard/PDLOverrideSupported.java,
javax/print/attribute/standard/PageRanges.java,
javax/print/attribute/standard/PresentationDirection.java,
javax/print/attribute/standard/PrintQuality.java,
javax/print/attribute/standard/PrinterIsAcceptingJobs.java,
javax/print/attribute/standard/PrinterMoreInfo.java,
javax/print/attribute/standard/PrinterMoreInfoManufacturer.java,
javax/print/attribute/standard/PrinterResolution.java,
javax/print/attribute/standard/PrinterState.java,
javax/print/attribute/standard/PrinterStateReason.java,
javax/print/attribute/standard/PrinterStateReasons.java,
javax/print/attribute/standard/PrinterURI.java,
javax/print/attribute/standard/ReferenceUriSchemesSupported.java,
javax/print/attribute/standard/Severity.java,
javax/print/attribute/standard/SheetCollate.java,
javax/print/attribute/standard/Sides.java: New files.
2004-05-15 Michael Koch <konqueror@gmx.de>
* javax/print/Doc.java
(getPrintData): Throws IOException.
(getReaderForText): Likewise.
(getStreamForBytes): Likewise.
* javax/print/DocFlavor.java:
Fixed filename in copyright.
(serialVersionUID): New field.
* javax/print/ServiceUIFactory.java:
Made all constants final.
* javax/print/AttributeException.java
javax/print/MultiDoc.java
javax/print/MultiDocPrintJob.java
javax/print/MultiDocPrintService.java
javax/print/StreamPrintService.java
javax/print/URIException.java: New files.
* javax/print/Makefile.am
(EXTRA_DIST): Added all new files.
2004-05-15 Michael Koch <konqueror@gmx.de>
* javax/print/attribute/standard/Copies.java,
javax/print/attribute/standard/DateTimeAtCompleted.java,
javax/print/attribute/standard/DateTimeAtCreation.java,
javax/print/attribute/standard/DateTimeAtProcessing.java,
javax/print/attribute/standard/DocumentName.java,
javax/print/attribute/standard/JobHoldUntil.java,
javax/print/attribute/standard/JobImpressions.java,
javax/print/attribute/standard/JobImpressionsCompleted.java,
javax/print/attribute/standard/JobKOctets.java,
javax/print/attribute/standard/JobKOctetsProcessed.java,
javax/print/attribute/standard/JobMediaSheets.java,
javax/print/attribute/standard/JobMediaSheetsCompleted.java,
javax/print/attribute/standard/JobMessageFromOperator.java,
javax/print/attribute/standard/JobName.java,
javax/print/attribute/standard/JobOriginatingUserName.java,
javax/print/attribute/standard/JobPriority.java,
javax/print/attribute/standard/JobPrioritySupported.java,
javax/print/attribute/standard/NumberOfDocuments.java,
javax/print/attribute/standard/NumberOfInterveningJobs.java,
javax/print/attribute/standard/NumberUp.java,
javax/print/attribute/standard/OutputDeviceAssigned.java,
javax/print/attribute/standard/PagesPerMinute.java,
javax/print/attribute/standard/PagesPerMinuteColor.java:
Fixed @return tag all over.
2004-05-15 Michael Koch <konqueror@gmx.de>
* javax/print/attribute/AttributeSetUtilities.java
(verifyCategoryForValue): Fixed typo in javadoc.
* javax/print/attribute/HashAttributeSet.java
(containsKey): Fixed @return tag.
(comtainsValue): Likewise.
(equals): Likewise.
* javax/print/attribute/IntegerSyntax.java
(equals): Likewise.
* javax/print/attribute/ResolutionSyntax.java
(equals): Likewise.
(getCrossFeedResolution): Removed unused code.
(getFeedResolution): Likewise.
* javax/print/attribute/SetOfIntegerSyntax.java
(SetOfIntegerSyntax): Fixed HTML entities in javadoc.
(equals): Fixed @return tag.
* javax/print/attribute/TextSyntax.java
(TextSyntax): Take locale into account.
(hashCode): Better implementation.
2004-05-15 Michael Koch <konqueror@gmx.de>
* javax/print/CancelablePrintJob.java,
javax/print/Doc.java,
javax/print/DocFlavor.java,
javax/print/DocPrintJob.java,
javax/print/FlavorException.java,
javax/print/PrintException.java,
javax/print/PrintService.java,
javax/print/ServiceUIFactory.java: New files.
From-SVN: r81901
Diffstat (limited to 'libjava/javax')
92 files changed, 5141 insertions, 70 deletions
diff --git a/libjava/javax/print/AttributeException.java b/libjava/javax/print/AttributeException.java new file mode 100644 index 0000000..780850f --- /dev/null +++ b/libjava/javax/print/AttributeException.java @@ -0,0 +1,63 @@ +/* CancelablePrintJob.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + +package javax.print; + +import javax.print.attribute.Attribute; + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public interface AttributeException +{ + /** + * Returns the unsupported printing attribute classes for a print service + * that does not support them. + * + * @return array of unsupported attribute classes, or null + */ + Class[] getUnsupportedAttributes(); + + /** + * Returns the unsupported values of printing attributes for a print service + * that does not support them. + * + * @return array of unsupperted attribute values, or null + */ + Attribute[] getUnsupportedValues(); +} diff --git a/libjava/javax/print/CancelablePrintJob.java b/libjava/javax/print/CancelablePrintJob.java new file mode 100644 index 0000000..329103e --- /dev/null +++ b/libjava/javax/print/CancelablePrintJob.java @@ -0,0 +1,52 @@ +/* CancelablePrintJob.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + +package javax.print; + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public interface CancelablePrintJob extends DocPrintJob +{ + /** + * Cancel print job. + * + * @exception PrintException if an error occured + */ + void cancel() throws PrintException; +} diff --git a/libjava/javax/print/Doc.java b/libjava/javax/print/Doc.java new file mode 100644 index 0000000..527038f --- /dev/null +++ b/libjava/javax/print/Doc.java @@ -0,0 +1,95 @@ +/* Doc.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + +package javax.print; + +import java.io.IOException; +import java.io.InputStream; +import java.io.Reader; + +import javax.print.attribute.DocAttributeSet; + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public interface Doc +{ + /** + * Returns a set of attributes applying to this document. + * + * @return the attributes + */ + DocAttributeSet getAttributes(); + + /** + * Returns the flavor in which this document will provide its print data. + * + * @return the document flavor for printing + */ + DocFlavor getDocFlavor(); + + /** + * Returns the print data of this document represented in a format that supports + * the document flavor. + * + * @return the print data + * + * @throws IOException if an error occurs + */ + Object getPrintData() throws IOException; + + /** + * Returns a <code>Reader</code> object for extracting character print data + * from this document. + * + * @return the <code>Reader</code> object + * + * @throws IOException if an error occurs + */ + Reader getReaderForText() throws IOException; + + /** + * Returns an <code>InputStream</code> object for extracting byte print data + * from this document. + * + * @return the <code>InputStream</code> object + * + * @throws IOException if an error occurs + */ + InputStream getStreamForBytes() throws IOException; +}
\ No newline at end of file diff --git a/libjava/javax/print/DocFlavor.java b/libjava/javax/print/DocFlavor.java new file mode 100644 index 0000000..96e9842 --- /dev/null +++ b/libjava/javax/print/DocFlavor.java @@ -0,0 +1,287 @@ +/* DocFlavor.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + +package javax.print; + +import java.io.Serializable; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public class DocFlavor implements Cloneable, Serializable +{ + /** + * @author Michael Koch (konqueror@gmx.de) + */ + public static class BYTE_ARRAY + extends DocFlavor + { + public static final BYTE_ARRAY AUTOSENSE = new BYTE_ARRAY("application/octet-stream"); + public static final BYTE_ARRAY GIF = new BYTE_ARRAY("image/gif"); + public static final BYTE_ARRAY JPEG = new BYTE_ARRAY("image/jpeg"); + public static final BYTE_ARRAY PCL = new BYTE_ARRAY("application/vnd.hp-PCL"); + public static final BYTE_ARRAY PDF = new BYTE_ARRAY("application/pdf"); + public static final BYTE_ARRAY PNG = new BYTE_ARRAY("image/png"); + public static final BYTE_ARRAY POSTSCRIPT = new BYTE_ARRAY("application/postscript"); + public static final BYTE_ARRAY TEXT_HTML_HOST = new BYTE_ARRAY("text/html"); + public static final BYTE_ARRAY TEXT_HTML_US_ASCII = new BYTE_ARRAY("text/html; charset=us-ascii"); + public static final BYTE_ARRAY TEXT_HTML_UTF_16 = new BYTE_ARRAY("text/html; charset=utf-16"); + public static final BYTE_ARRAY TEXT_HTML_UTF_16BE = new BYTE_ARRAY("text/html; charset=utf-16be"); + public static final BYTE_ARRAY TEXT_HTML_UTF_16LE = new BYTE_ARRAY("text/html; charset=utf-16le"); + public static final BYTE_ARRAY TEXT_HTML_UTF_8 = new BYTE_ARRAY("text/html; charset=utf-8"); + public static final BYTE_ARRAY TEXT_PLAIN_HOST = new BYTE_ARRAY("text/plain"); + public static final BYTE_ARRAY TEXT_PLAIN_US_ASCII = new BYTE_ARRAY("text/plain; charset=us-ascii"); + public static final BYTE_ARRAY TEXT_PLAIN_UTF_16 = new BYTE_ARRAY("text/plain; charset=utf-16"); + public static final BYTE_ARRAY TEXT_PLAIN_UTF_16BE = new BYTE_ARRAY("text/plain; charset=utf-16be"); + public static final BYTE_ARRAY TEXT_PLAIN_UTF_16LE = new BYTE_ARRAY("text/plain; charset=utf-16le"); + public static final BYTE_ARRAY TEXT_PLAIN_UTF_8 = new BYTE_ARRAY("text/plain; charset=utf-8"); + + public BYTE_ARRAY(String mimeType) + { + super(mimeType, "[B"); + } + } + + /** + * @author Michael Koch (konqueror@gmx.de) + */ + public static class CHAR_ARRAY + extends DocFlavor + { + private static final long serialVersionUID = -8720590903724405128L; + + public CHAR_ARRAY(String mimeType) + { + super(mimeType, "[C"); + } + } + + /** + * @author Michael Koch (konqueror@gmx.de) + */ + public static class INPUT_STREAM + extends DocFlavor + { + public static final INPUT_STREAM AUTOSENSE = new INPUT_STREAM("application/octet-stream"); + public static final INPUT_STREAM GIF = new INPUT_STREAM("image/gif"); + public static final INPUT_STREAM JPEG = new INPUT_STREAM("image/jpeg"); + public static final INPUT_STREAM PCL = new INPUT_STREAM("application/vnd.hp-PCL"); + public static final INPUT_STREAM PDF = new INPUT_STREAM("application/pdf"); + public static final INPUT_STREAM PNG = new INPUT_STREAM("image/png"); + public static final INPUT_STREAM POSTSCRIPT = new INPUT_STREAM("application/postscript"); + public static final INPUT_STREAM TEXT_HTML_HOST = new INPUT_STREAM("text/html"); + public static final INPUT_STREAM TEXT_HTML_US_ASCII = new INPUT_STREAM("text/html; charset=us-ascii"); + public static final INPUT_STREAM TEXT_HTML_UTF_16 = new INPUT_STREAM("text/html; charset=utf-16"); + public static final INPUT_STREAM TEXT_HTML_UTF_16BE = new INPUT_STREAM("text/html; charset=utf-16be"); + public static final INPUT_STREAM TEXT_HTML_UTF_16LE = new INPUT_STREAM("text/html; charset=utf-16le"); + public static final INPUT_STREAM TEXT_HTML_UTF_8 = new INPUT_STREAM("text/html; charset=utf-8"); + public static final INPUT_STREAM TEXT_PLAIN_HOST = new INPUT_STREAM("text/plain"); + public static final INPUT_STREAM TEXT_PLAIN_US_ASCII = new INPUT_STREAM("text/plain; charset=us-ascii"); + public static final INPUT_STREAM TEXT_PLAIN_UTF_16 = new INPUT_STREAM("text/plain; charset=utf-16"); + public static final INPUT_STREAM TEXT_PLAIN_UTF_16BE = new INPUT_STREAM("text/plain; charset=utf-16be"); + public static final INPUT_STREAM TEXT_PLAIN_UTF_16LE = new INPUT_STREAM("text/plain; charset=utf-16le"); + public static final INPUT_STREAM TEXT_PLAIN_UTF_8 = new INPUT_STREAM("text/plain; charset=utf-8"); + + public INPUT_STREAM(String mimeType) + { + super(mimeType, "java.io.InputStream"); + } + } + + /** + * @author Michael Koch (konqueror@gmx.de) + */ + public static class READER + extends DocFlavor + { + private static final long serialVersionUID = 7100295812579351567L; + + public READER(String mimeType) + { + super(mimeType, "java.io.Reader"); + } + } + + /** + * @author Michael Koch (konqueror@gmx.de) + */ + public static class SERVICE_FORMATTED + extends DocFlavor + { + private static final long serialVersionUID = 6181337766266637256L; + + public SERVICE_FORMATTED(String className) + { + super("application/x-java-jvm-local-objectref", className); + } + } + + /** + * @author Michael Koch (konqueror@gmx.de) + */ + public static class STRING + extends DocFlavor + { + private static final long serialVersionUID = 4414407504887034035L; + + public STRING(String mimeType) + { + super(mimeType, "java.lang.String"); + } + } + + /** + * @author Michael Koch (konqueror@gmx.de) + */ + public static class URL + extends DocFlavor + { + private static final long serialVersionUID = 2936725788144902062L; + + public URL(String mimeType) + { + super(mimeType, "java.net.URL"); + } + } + + private static final long serialVersionUID = -4512080796965449721L; + + public static final String hostEncoding = "US-ASCII"; + + private String mediaSubtype; + private String mediaType; + private String className; + private HashMap params = new HashMap(); + + public DocFlavor(String mimeType, String className) + { + if (mimeType == null || className == null) + throw new NullPointerException(); + + parseMimeType(mimeType); + this.className = className; + } + + private void parseMimeType(String mimeType) + { + // FIXME: This method is know to be not completely correct, but it works for now. + + int pos = mimeType.indexOf(';'); + + if (pos != -1) + { + String tmp = mimeType.substring(pos + 2); + mimeType = mimeType.substring(0, pos); + pos = tmp.indexOf('='); + params.put(tmp.substring(0, pos), tmp.substring(pos + 1)); + } + + pos = mimeType.indexOf('/'); + + if (pos == -1) + throw new IllegalArgumentException(); + + mediaType = mimeType.substring(0, pos); + mediaSubtype = mimeType.substring(pos + 1); + } + + public boolean equals(Object obj) + { + if (! (obj instanceof DocFlavor)) + return false; + + DocFlavor tmp = (DocFlavor) obj; + + return (getMimeType().equals(tmp.getMimeType()) + && getRepresentationClassName().equals(tmp.getRepresentationClassName())); + } + + public String getMediaSubtype() + { + return mediaSubtype; + } + + public String getMediaType() + { + return mediaType; + } + + public String getMimeType() + { + // FIXME: Check if this algorithm is correct. + + String mimeType = getMediaType() + "/" + getMediaSubtype(); + Iterator it = params.entrySet().iterator(); + + while (it.hasNext()) + { + Map.Entry entry = (Map.Entry) it.next(); + mimeType += "; " + entry.getKey() + "=\"" + entry.getValue() + "\""; + } + + return mimeType; + } + + public String getParameter(String paramName) + { + if (paramName == null) + throw new NullPointerException(); + + return (String) params.get(paramName); + } + + public String getRepresentationClassName() + { + return className; + } + + public int hashCode() + { + return ((mediaType.hashCode() + * mediaSubtype.hashCode() + * className.hashCode()) ^ params.hashCode()); + } + + public String toString() + { + return getMimeType(); + } +} diff --git a/libjava/javax/print/DocPrintJob.java b/libjava/javax/print/DocPrintJob.java new file mode 100644 index 0000000..db4ba84 --- /dev/null +++ b/libjava/javax/print/DocPrintJob.java @@ -0,0 +1,104 @@ +/* DocPrintJob.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + +package javax.print; + +import javax.print.attribute.PrintJobAttributeSet; +import javax.print.attribute.PrintRequestAttributeSet; +import javax.print.event.PrintJobAttributeListener; +import javax.print.event.PrintJobListener; + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public interface DocPrintJob +{ + /** + * Registers a listener for changes in the specified attributes. + * + * @param listener the listener to add + * @param attributes the attributes to observe + */ + void addPrintJobAttributeListener(PrintJobAttributeListener listener, + PrintJobAttributeSet attributes); + + /** + * Registers a listener for events occuring during this print job. + * + * @param listener the listener to add + */ + void addPrintJobListener(PrintJobListener listener); + + /** + * Returns the print job's attributes. + * + * @return the attributes of this print job + */ + PrintJobAttributeSet getAttributes(); + + /** + * Returns the <code>PrintService</code> object this print job is bound to. + * + * @return the print service + */ + PrintService getPrintService(); + + /** + * Prints a document with the specified print job attributes. + * + * @param doc the document to print + * @param attributes the attributes to use + * + * @throws PrintException if an error occurs + */ + void print(Doc doc, PrintRequestAttributeSet attributes) throws PrintException; + + /** + * De-registers an attribute listener. + * + * @param listener the listener to remove + */ + void removePrintJobAttributeListener(PrintJobAttributeListener listener); + + /** + * De-registers a print job listener. + * + * @param listener the listener to remove + */ + void removePrintJobListener(PrintJobListener listener); +}
\ No newline at end of file diff --git a/libjava/javax/print/FlavorException.java b/libjava/javax/print/FlavorException.java new file mode 100644 index 0000000..b60f1c4 --- /dev/null +++ b/libjava/javax/print/FlavorException.java @@ -0,0 +1,52 @@ +/* FlavorException.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + +package javax.print; + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public interface FlavorException +{ + /** + * Returns the unsupported document flavors. + * + * @return the unsupported document flavors + */ + DocFlavor[] getUnsupportedFlavors(); +}
\ No newline at end of file diff --git a/libjava/javax/print/MultiDoc.java b/libjava/javax/print/MultiDoc.java new file mode 100644 index 0000000..401a706 --- /dev/null +++ b/libjava/javax/print/MultiDoc.java @@ -0,0 +1,66 @@ +/* MultiDoc.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + +package javax.print; + +import java.io.IOException; + + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public interface MultiDoc +{ + /** + * Returns the current document. + * + * @return the current document + * + * @throws IOException if an error occurs + */ + Doc getDoc() throws IOException; + + /** + * Returns the next <code>MultiDoc</code> object. + * + * @return the next <code>MultiDoc</code> object + * + * @throws IOException if an error occurs + */ + MultiDoc next() throws IOException; +}
\ No newline at end of file diff --git a/libjava/javax/print/MultiDocPrintJob.java b/libjava/javax/print/MultiDocPrintJob.java new file mode 100644 index 0000000..e961d18 --- /dev/null +++ b/libjava/javax/print/MultiDocPrintJob.java @@ -0,0 +1,60 @@ +/* MultiDocPrintJob.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + +package javax.print; + +import javax.print.attribute.PrintRequestAttributeSet; + + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public interface MultiDocPrintJob extends DocPrintJob +{ + /** + * Request a print of a <code>MultiDoc</code> object. + * + * @param multiDoc the document to print + * @param attributes the printing attributes to apply + * + * @throws PrintExeption if an error occurs + */ + void print(MultiDoc multiDoc, PrintRequestAttributeSet attributes) + throws PrintException; +} +
\ No newline at end of file diff --git a/libjava/javax/print/MultiDocPrintService.java b/libjava/javax/print/MultiDocPrintService.java new file mode 100644 index 0000000..bf68cc7 --- /dev/null +++ b/libjava/javax/print/MultiDocPrintService.java @@ -0,0 +1,53 @@ +/* MultiDocPrintService.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + +package javax.print; + + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public interface MultiDocPrintService extends PrintService +{ + /** + * Create a job that can print a <code>MultiDoc</code> object. + * + * @return the new print job + */ + MultiDocPrintJob createMultiDocPrintJob(); +}
\ No newline at end of file diff --git a/libjava/javax/print/PrintException.java b/libjava/javax/print/PrintException.java new file mode 100644 index 0000000..e462637 --- /dev/null +++ b/libjava/javax/print/PrintException.java @@ -0,0 +1,84 @@ +/* PrintException.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + +package javax.print; + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public class PrintException extends Exception +{ + /** + * Construct a print exception. + */ + public PrintException() + { + super(); + } + + /** + * Construct a print exception. + * + * @param e chained exception + */ + public PrintException(Exception e) + { + super(e); + } + + /** + * Construct a print exception. + * + * @param s detailed message, or null for no message + */ + public PrintException(String s) + { + super(s); + } + + /** + * Construct a print exception. + * + * @param s detailed message, or null for no message + * @param e chained exception + */ + public PrintException(String s, Exception e) + { + super(s, e); + } +}
\ No newline at end of file diff --git a/libjava/javax/print/PrintService.java b/libjava/javax/print/PrintService.java new file mode 100644 index 0000000..de11368 --- /dev/null +++ b/libjava/javax/print/PrintService.java @@ -0,0 +1,226 @@ +/* PrintService.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + +package javax.print; + +import javax.print.attribute.Attribute; +import javax.print.attribute.AttributeSet; +import javax.print.attribute.PrintServiceAttribute; +import javax.print.attribute.PrintServiceAttributeSet; +import javax.print.event.PrintServiceAttributeListener; + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public interface PrintService +{ + /** + * Returns a new print job capable to handle all supported document flavors. + * + * @return the new print job + */ + DocPrintJob createPrintJob(); + + /** + * Determines if two services refer to the same underlying service. + * + * @param obj the service to check against + * + * @return <code>true</code> if both services refer to the sam underlying + * service, <code>false</code> otherwise + */ + boolean equals(Object obj); + + /** + * Returns the value of a single specified attribute. + * + * @param category the category of a <code>PrintServiceAttribute</code> + * + * @return the value of the attribute + * + * @throws NullPointerException if category is null + * @throws IllegalArgumentException if category is not a class that + * implements <code>PrintServiceAttribute</code> + */ + PrintServiceAttribute getAttribute(Class category); + + /** + * Returns all attributes of this printer service + * + * @return all attributes of this print service + */ + PrintServiceAttributeSet getAttributes(); + + /** + * Returns the service's default value for a given attribute. + * + * @param category the category of the attribute + * + * @return the default value + * + * @throws NullPointerException if <code>category</code> is null + * @throws IllegalArgumentException if <code>category</code> is a class + * not implementing <code>Attribute</code> + */ + Object getDefaultAttributeValue(Class category); + + /** + * Returns the name of this print service. + * + * @return the name + */ + String getName(); + + /** + * Returns a factory for UI components. + * + * @return the factory + */ + ServiceUIFactory getServiceUIFactory(); + + /** + * Returns all supported attribute categories. + * + * @return an array of all supported attribute categories + */ + Class[] getSupportedAttributeCategories(); + + /** + * Returns all supported attribute values a client can use when setting up + * a print job with this service. + * + * @param category the attribute category to test + * @param flavor the document flavor to use, or null + * @param attributes set of printing attributes for a supposed job, or null + * + * @return object indicating supported values for <code>category</code>, + * or null if this print service doesnt support specifying doc-level or + * job-level attribute in a print request. + * + * @throws NullPointerException if <code>category</code> is null + * @throws IllegalArgumentException if <code>category</code> is a class not + * implementing <code>Attribute</code>, or if <code>flavor</code> is not + * supported + */ + Object getSupportedAttributeValues(Class category, DocFlavor flavor, AttributeSet attributes); + + /** + * Returns an array of all supproted document flavors. + * + * @return the supported document flavors + */ + DocFlavor[] getSupportedDocFlavors(); + + /** + * Returns all attributes that are unsupported for a print request in the + * context of a particular document flavor. + * + * @param flavor document flavor to test, or null + * @param attributes set of printing attributes for a supposed job + * + * @return null if this <code>PrintService</code> supports the print request + * specification, else the unsupported attributes + * + * @throws IllegalArgumentException if <code>flavor</code> is unsupported + */ + AttributeSet getUnsupportedAttributes(DocFlavor flavor, AttributeSet attributes); + + /** + * Returns a hashcode for this printer service. + * + * @return the hashcode + */ + int hashCode(); + + /** + * Determines a given attribute category is supported or not. + * + * @param category the category to check + * + * @return <code>true</code> if <code>category</code> is supported, + * <code>false</code> otherwise + * + * @throws NullPointerException if <code>category</code> is null + * @throws IllegalArgumentException if <code>category</code> is a class not + * implementing <code>Attribute</code>. + */ + boolean isAttributeCategorySupported(Class category); + + /** + * Determines a given attribute value is supported when creating a print job + * for this print service. + * + * @param attrval the attribute value to check + * @param flavor the document flavor to use, or null + * @param attributes set of printing attributes to use, or null + * + * @return <code>true</code> if the attribute value is supported, + * <code>false</code> otherwise + * + * @throws NullPointerException if <code>attrval</code> is null + * @throws IllegalArgumentException if <code>flavor</code> is not supported + * by this print service + */ + boolean isAttributeValueSupported(Attribute attrval, DocFlavor flavor, AttributeSet attributes); + + /** + * Determines a given document flavor is supported or not. + * + * @param flavor the document flavor to check + * + * @return <code>true</code> if <code>flavor</code> is supported, + * <code>false</code> otherwise + * + * @throws NullPointerException if <code>flavor</code> is null + */ + boolean isDocFlavorSupported(DocFlavor flavor); + + /** + * Registers a print service attribute listener to this print service. + * + * @param listener the listener to add + */ + void addPrintServiceAttributeListener(PrintServiceAttributeListener listener); + + /** + * De-registers a print service attribute listener from this print service. + * + * @param listener the listener to remove + */ + void removePrintServiceAttributeListener(PrintServiceAttributeListener listener); +} diff --git a/libjava/javax/print/PrintServiceLookup.java b/libjava/javax/print/PrintServiceLookup.java new file mode 100644 index 0000000..aa46bec --- /dev/null +++ b/libjava/javax/print/PrintServiceLookup.java @@ -0,0 +1,76 @@ +/* PrintServiceLookup.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + +package javax.print; + +import javax.print.attribute.AttributeSet; + + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public abstract class PrintServiceLookup +{ + /** + * Constructs a <code>PrintServiceLookup</code> object. + */ + public PrintServiceLookup() + { + // Do nothing here + } + + /** + * Not called direclty by applications. + */ + public abstract PrintService getDefaultPrintService(); + + /** + * Not called direclty by applications. + */ + public abstract MultiDocPrintService[] getMultiDocPrintServices(DocFlavor[] flavors, AttributeSet attributes); + + /** + * Not called direclty by applications. + */ + public abstract PrintService[] getPrintServices(); + + /** + * Not called direclty by applications. + */ + public abstract PrintService[] getPrintServices(DocFlavor flavor, AttributeSet attributes); +} diff --git a/libjava/javax/print/ServiceUIFactory.java b/libjava/javax/print/ServiceUIFactory.java new file mode 100644 index 0000000..7c9ead8 --- /dev/null +++ b/libjava/javax/print/ServiceUIFactory.java @@ -0,0 +1,89 @@ +/* ServiceUIFactory.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + +package javax.print; + +/** + * @author Michael Koch + */ +public abstract class ServiceUIFactory +{ + public static final int ABOUT_UIROLE = 1; + public static final int ADMIN_UIROLE = 2; + public static final int MAIN_UIROLE = 3; + public static final int RESERVED_UIROLE = 99; + + public static final String DIALOG_UI = "java.awt.Dialog"; + public static final String JCOMPONENT_UI = "javax.swing.JComponent"; + public static final String JDIALOG_UI = "javax.swing.JDialog"; + public static final String PANEL_UI = "java.awt.Panel"; + + /** + * Constructs a <code>ServiceUIFactory</code> object. + */ + public ServiceUIFactory() + { + // Do nothing here. + } + + /** + * Returns an UI object which may be cast to the requested UI type. + * + * @param role the role requested. Must be one of the standard roles + * or a private role supported by this factory + * @param ui type in which the role is requested + * + * @return the UI role or null of this role is not supported by this factory + * + * @throws IllegalArgumentException if <code>role</code> is neither one of + * the standard ones nor a private one supported by this factory + */ + public abstract Object getUI(int role, String ui); + + /** + * Returns the UI types supported by this factory for an UI role. + * + * @param role the role to be looked up + * + * @return an array of UI types + * + * @throws IllegalArgumentException if <code>role</code> is neither one of + * the standard ones nor a private one supported by this factory + */ + public abstract String[] getUIClassNamesForRole(int role); +}
\ No newline at end of file diff --git a/libjava/javax/print/StreamPrintService.java b/libjava/javax/print/StreamPrintService.java new file mode 100644 index 0000000..83f936a --- /dev/null +++ b/libjava/javax/print/StreamPrintService.java @@ -0,0 +1,97 @@ +/* StreamPrintService.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + +package javax.print; + +import java.io.OutputStream; + + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public abstract class StreamPrintService implements PrintService +{ + private boolean disposed; + private OutputStream out; + + /** + * Constructs a <code>StreamPrintService</code> object. + * + * @param out the <code>OutputStream</code> to use + */ + protected StreamPrintService(OutputStream out) + { + this.out = out; + } + + /** + * Dispose this <code>StreamPrintService</code> object. + */ + public void dispose() + { + disposed = true; + } + + /** + * Returns the document format emited by this print service. + * + * @return the document format + */ + public abstract String getOutputFormat(); + + /** + * Returns the <code>OutputStream</code> of this object. + * + * @return the <code>OutputStream</code> + */ + public OutputStream getOutputStream() + { + return out; + } + + /** + * Determines if this <code>StreamPrintService</code> object is disposed. + * + * @return <code>true</code> if disposed already, + * otherwise <code>false</code> + */ + public boolean isDisposed() + { + return disposed; + } +}
\ No newline at end of file diff --git a/libjava/javax/print/URIException.java b/libjava/javax/print/URIException.java new file mode 100644 index 0000000..b29c883 --- /dev/null +++ b/libjava/javax/print/URIException.java @@ -0,0 +1,65 @@ +/* URIException.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + +package javax.print; + +import java.net.URI; + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public interface URIException +{ + int URIInaccessible = 1; + int URIOtherProblem = -1; + int URISchemeNotSupported = 2; + + /** + * Returns the reason for this exception. + * + * @return the reason + */ + int getReason(); + + /** + * Returns the unsupported <code>URI</code> for this exception. + * + * @return the unsupported <code>URI</code>. + */ + URI getUnsupportedURI(); +} diff --git a/libjava/javax/print/attribute/AttributeSetUtilities.java b/libjava/javax/print/attribute/AttributeSetUtilities.java index 65cf378..3c72480 100644 --- a/libjava/javax/print/attribute/AttributeSetUtilities.java +++ b/libjava/javax/print/attribute/AttributeSetUtilities.java @@ -1,5 +1,5 @@ /* AttributeSetUtilities.java -- - Copyright (C) 2003 Free Software Foundation, Inc. + Copyright (C) 2003, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -427,7 +427,7 @@ public final class AttributeSetUtilities * Verifies that the category of attribute is equals to category. * * @param category the category the atteribute should be - * @param attribtue the attribute to verify + * @param attribute the attribute to verify * * @exception IllegalArgumentException if the categories are not equal * @exception NullPointerException if category is null diff --git a/libjava/javax/print/attribute/HashAttributeSet.java b/libjava/javax/print/attribute/HashAttributeSet.java index af5b3d1..fc3c67a 100644 --- a/libjava/javax/print/attribute/HashAttributeSet.java +++ b/libjava/javax/print/attribute/HashAttributeSet.java @@ -1,5 +1,5 @@ /* HashAttributeSet.java -- - Copyright (C) 2003 Free Software Foundation, Inc. + Copyright (C) 2003, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -232,7 +232,7 @@ public class HashAttributeSet implements AttributeSet, Serializable * * @param category the category to test for * - * @result true if the category exists in this attribute set, false otherwise. + * @return true if the category exists in this attribute set, false otherwise. */ public boolean containsKey(Class category) { @@ -244,7 +244,7 @@ public class HashAttributeSet implements AttributeSet, Serializable * * @param attribute the attribute to test for * - * @result true if the attribute exists in this attribute set, + * @return true if the attribute exists in this attribute set, * false otherwise. */ public boolean containsValue(Attribute attribute) @@ -257,7 +257,7 @@ public class HashAttributeSet implements AttributeSet, Serializable * * @param obj the object to test * - * @returns true if both objects are equal, false otherwise. + * @return true if both objects are equal, false otherwise. */ public boolean equals(Object obj) { diff --git a/libjava/javax/print/attribute/IntegerSyntax.java b/libjava/javax/print/attribute/IntegerSyntax.java index 2b713bf..6e3c455 100644 --- a/libjava/javax/print/attribute/IntegerSyntax.java +++ b/libjava/javax/print/attribute/IntegerSyntax.java @@ -1,5 +1,5 @@ /* IntegerSyntax.java -- - Copyright (C) 2003 Free Software Foundation, Inc. + Copyright (C) 2003, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -90,7 +90,7 @@ public abstract class IntegerSyntax implements Cloneable, Serializable * * @param obj the object to test * - * @returns true if both objects are equal, false otherwise. + * @return true if both objects are equal, false otherwise. */ public boolean equals(Object obj) { diff --git a/libjava/javax/print/attribute/ResolutionSyntax.java b/libjava/javax/print/attribute/ResolutionSyntax.java index 4eba854..678b373 100644 --- a/libjava/javax/print/attribute/ResolutionSyntax.java +++ b/libjava/javax/print/attribute/ResolutionSyntax.java @@ -1,5 +1,5 @@ /* ResolutionSyntax.java -- - Copyright (C) 2003 Free Software Foundation, Inc. + Copyright (C) 2003, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -86,7 +86,7 @@ public abstract class ResolutionSyntax * * @param obj the object to test * - * @returns true if both objects are equal, false otherwise. + * @return true if both objects are equal, false otherwise. */ public boolean equals(Object obj) { @@ -111,7 +111,6 @@ public abstract class ResolutionSyntax if (units < 1) throw new IllegalArgumentException("units may not be less then 1"); - int rount = units / 2; return (crossFeedResolution + units) / units; } @@ -137,7 +136,6 @@ public abstract class ResolutionSyntax if (units < 1) throw new IllegalArgumentException("units may not be less then 1"); - int rount = units / 2; return (crossFeedResolution + units) / units; } diff --git a/libjava/javax/print/attribute/SetOfIntegerSyntax.java b/libjava/javax/print/attribute/SetOfIntegerSyntax.java index 7c02212..adea919 100644 --- a/libjava/javax/print/attribute/SetOfIntegerSyntax.java +++ b/libjava/javax/print/attribute/SetOfIntegerSyntax.java @@ -1,5 +1,5 @@ /* SetOfIntegerSyntax.java -- - Copyright (C) 2003 Free Software Foundation, Inc. + Copyright (C) 2003, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -199,7 +199,7 @@ public abstract class SetOfIntegerSyntax * * @param obj the object to test * - * @returns true if both objects are equal, false otherwise. + * @return true if both objects are equal, false otherwise. */ public boolean equals(Object obj) { diff --git a/libjava/javax/print/attribute/TextSyntax.java b/libjava/javax/print/attribute/TextSyntax.java index ebad88b..dda5cf5 100644 --- a/libjava/javax/print/attribute/TextSyntax.java +++ b/libjava/javax/print/attribute/TextSyntax.java @@ -121,6 +121,6 @@ public abstract class TextSyntax implements Cloneable, Serializable */ public String toString() { - return value; + return getValue(); } } diff --git a/libjava/javax/print/attribute/standard/ColorSupported.java b/libjava/javax/print/attribute/standard/ColorSupported.java new file mode 100644 index 0000000..2d732aa --- /dev/null +++ b/libjava/javax/print/attribute/standard/ColorSupported.java @@ -0,0 +1,84 @@ +/* ColorSupported.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.print.attribute.standard; + +import javax.print.attribute.EnumSyntax; +import javax.print.attribute.PrintServiceAttribute; + + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public final class ColorSupported extends EnumSyntax + implements PrintServiceAttribute +{ + private static final long serialVersionUID = -2700555589688535545L; + + public static final ColorSupported NOT_SUPPORTED = new ColorSupported(0); + public static final ColorSupported SUPPORTED = new ColorSupported(1); + + /** + * Constructs a <code>ColorSupported</code> object. + * + * @param value the value + */ + protected ColorSupported(int value) + { + super(value); + } + + /** + * Returns category of this class. + * + * @return the class <code>ColorSupported</code> itself + */ + public final Class getCategory() + { + return ColorSupported.class; + } + + /** + * Returns the name of this attribute. + * + * @return the name + */ + public final String getName() + { + return "color-supported"; + } +} diff --git a/libjava/javax/print/attribute/standard/Compression.java b/libjava/javax/print/attribute/standard/Compression.java new file mode 100644 index 0000000..a034b92 --- /dev/null +++ b/libjava/javax/print/attribute/standard/Compression.java @@ -0,0 +1,86 @@ +/* Compression.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.print.attribute.standard; + +import javax.print.attribute.DocAttribute; +import javax.print.attribute.EnumSyntax; + + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public class Compression extends EnumSyntax + implements DocAttribute +{ + private static final long serialVersionUID = -5716748913324997674L; + + public static final Compression NONE = new Compression(0); + public static final Compression DEFLATE = new Compression(1); + public static final Compression GZIP = new Compression(2); + public static final Compression COMPRESS = new Compression(3); + + /** + * Constructs a <code>Compression</code> object. + * + * @param value that value + */ + protected Compression(int value) + { + super(value); + } + + /** + * Returns category of this class. + * + * @return the class <code>Compression</code> itself + */ + public final Class getCategory() + { + return Compression.class; + } + + /** + * Returns the name of this attribute. + * + * @return the name + */ + public final String getName() + { + return "compression"; + } +} diff --git a/libjava/javax/print/attribute/standard/Copies.java b/libjava/javax/print/attribute/standard/Copies.java index 863c11a..329049d 100644 --- a/libjava/javax/print/attribute/standard/Copies.java +++ b/libjava/javax/print/attribute/standard/Copies.java @@ -69,7 +69,7 @@ public final class Copies extends IntegerSyntax * * @param obj the object to test * - * @returns true if both objects are equal, false otherwise. + * @return true if both objects are equal, false otherwise. */ public boolean equals(Object obj) { diff --git a/libjava/javax/print/attribute/standard/CopiesSupported.java b/libjava/javax/print/attribute/standard/CopiesSupported.java new file mode 100644 index 0000000..d44b385 --- /dev/null +++ b/libjava/javax/print/attribute/standard/CopiesSupported.java @@ -0,0 +1,87 @@ +/* CopiesSupported.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.print.attribute.standard; + +import javax.print.attribute.SetOfIntegerSyntax; +import javax.print.attribute.SupportedValuesAttribute; + + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public final class CopiesSupported extends SetOfIntegerSyntax + implements SupportedValuesAttribute +{ + private static final long serialVersionUID = 6927711687034846001L; + + /** + * Constructs a <code>CopiesSupported</code> object. + */ + public CopiesSupported(int member) + { + super(member); + } + + /** + * Constructs a <code>CopiesSupported</code> object. + */ + public CopiesSupported(int lowerBound, int upperBound) + { + super(lowerBound, upperBound); + } + + /** + * Returns category of this class. + * + * @return the class <code>CopiesSupported</code> itself + */ + public final Class getCategory() + { + return CopiesSupported.class; + } + + /** + * Returns the name of this attribute. + * + * @return the name + */ + public final String getName() + { + return "copies-supported"; + } +} diff --git a/libjava/javax/print/attribute/standard/DateTimeAtCompleted.java b/libjava/javax/print/attribute/standard/DateTimeAtCompleted.java index 68e09fd..a81b8f0 100644 --- a/libjava/javax/print/attribute/standard/DateTimeAtCompleted.java +++ b/libjava/javax/print/attribute/standard/DateTimeAtCompleted.java @@ -1,5 +1,5 @@ /* DateTimeAtCompleted.java -- - Copyright (C) 2003 Free Software Foundation, Inc. + Copyright (C) 2003, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -41,6 +41,10 @@ import java.util.Date; import javax.print.attribute.DateTimeSyntax; import javax.print.attribute.PrintJobAttribute; + +/** + * @author Michael Koch (konqueror@gmx.de) + */ public final class DateTimeAtCompleted extends DateTimeSyntax implements PrintJobAttribute { @@ -63,7 +67,7 @@ public final class DateTimeAtCompleted extends DateTimeSyntax * * @param obj the object to test * - * @returns true if both objects are equal, false otherwise. + * @return true if both objects are equal, false otherwise. */ public boolean equals(Object obj) { diff --git a/libjava/javax/print/attribute/standard/DateTimeAtCreation.java b/libjava/javax/print/attribute/standard/DateTimeAtCreation.java index 2a506d1..3e94c67 100644 --- a/libjava/javax/print/attribute/standard/DateTimeAtCreation.java +++ b/libjava/javax/print/attribute/standard/DateTimeAtCreation.java @@ -1,5 +1,5 @@ /* DateTimeAtCreation.java -- - Copyright (C) 2003 Free Software Foundation, Inc. + Copyright (C) 2003, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -41,6 +41,10 @@ import java.util.Date; import javax.print.attribute.DateTimeSyntax; import javax.print.attribute.PrintJobAttribute; + +/** + * @author Michael Koch (konqueror@gmx.de) + */ public final class DateTimeAtCreation extends DateTimeSyntax implements PrintJobAttribute { @@ -63,7 +67,7 @@ public final class DateTimeAtCreation extends DateTimeSyntax * * @param obj the object to test * - * @returns true if both objects are equal, false otherwise. + * @return true if both objects are equal, false otherwise. */ public boolean equals(Object obj) { diff --git a/libjava/javax/print/attribute/standard/DateTimeAtProcessing.java b/libjava/javax/print/attribute/standard/DateTimeAtProcessing.java index caee026..0cdeb93 100644 --- a/libjava/javax/print/attribute/standard/DateTimeAtProcessing.java +++ b/libjava/javax/print/attribute/standard/DateTimeAtProcessing.java @@ -1,5 +1,5 @@ /* DateTimeAtProcessing.java -- - Copyright (C) 2003 Free Software Foundation, Inc. + Copyright (C) 2003, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -41,6 +41,10 @@ import java.util.Date; import javax.print.attribute.DateTimeSyntax; import javax.print.attribute.PrintJobAttribute; + +/** + * @author Michael Koch (konqueror@gmx.de) + */ public final class DateTimeAtProcessing extends DateTimeSyntax implements PrintJobAttribute { @@ -63,7 +67,7 @@ public final class DateTimeAtProcessing extends DateTimeSyntax * * @param obj the object to test * - * @returns true if both objects are equal, false otherwise. + * @return true if both objects are equal, false otherwise. */ public boolean equals(Object obj) { diff --git a/libjava/javax/print/attribute/standard/DocumentName.java b/libjava/javax/print/attribute/standard/DocumentName.java index da6b214..7ca0402 100644 --- a/libjava/javax/print/attribute/standard/DocumentName.java +++ b/libjava/javax/print/attribute/standard/DocumentName.java @@ -41,6 +41,10 @@ import java.util.Locale; import javax.print.attribute.DocAttribute; import javax.print.attribute.TextSyntax; + +/** + * @author Michael Koch (konqueror@gmx.de) + */ public final class DocumentName extends TextSyntax implements DocAttribute { @@ -63,7 +67,7 @@ public final class DocumentName extends TextSyntax * * @param obj the object to test * - * @returns true if both objects are equal, false otherwise. + * @return true if both objects are equal, false otherwise. */ public boolean equals(Object obj) { diff --git a/libjava/javax/print/attribute/standard/Fidelity.java b/libjava/javax/print/attribute/standard/Fidelity.java new file mode 100644 index 0000000..b0aa0ee --- /dev/null +++ b/libjava/javax/print/attribute/standard/Fidelity.java @@ -0,0 +1,85 @@ +/* Fidelity.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.print.attribute.standard; + +import javax.print.attribute.EnumSyntax; +import javax.print.attribute.PrintJobAttribute; +import javax.print.attribute.PrintRequestAttribute; + + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public final class Fidelity extends EnumSyntax + implements PrintJobAttribute, PrintRequestAttribute +{ + private static final long serialVersionUID = 6320827847329172308L; + + public static final Fidelity FIDELITY_TRUE = new Fidelity(0); + public static final Fidelity FIDELITY_FALSE = new Fidelity(1); + + /** + * Constructs a <code>Fidelity</code> object. + * + * @param value the value + */ + protected Fidelity(int value) + { + super(value); + } + + /** + * Returns category of this class. + * + * @return the class <code>Fidelity</code> itself + */ + public final Class getCategory() + { + return Fidelity.class; + } + + /** + * Returns the name of this attribute. + * + * @return the name + */ + public final String getName() + { + return "fidelity"; + } +} diff --git a/libjava/javax/print/attribute/standard/Finishings.java b/libjava/javax/print/attribute/standard/Finishings.java new file mode 100644 index 0000000..1704fc5 --- /dev/null +++ b/libjava/javax/print/attribute/standard/Finishings.java @@ -0,0 +1,102 @@ +/* Finishings.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.print.attribute.standard; + +import javax.print.attribute.DocAttribute; +import javax.print.attribute.EnumSyntax; +import javax.print.attribute.PrintJobAttribute; +import javax.print.attribute.PrintRequestAttribute; + + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public class Finishings extends EnumSyntax + implements DocAttribute, PrintJobAttribute, PrintRequestAttribute +{ + private static final long serialVersionUID = -627840419548391754L; + + public static final Finishings NONE = new Finishings(0); + public static final Finishings STAPLE = new Finishings(1); + public static final Finishings COVER = new Finishings(2); + public static final Finishings BIND = new Finishings(3); + public static final Finishings SADDLE_STITCH = new Finishings(4); + public static final Finishings EDGE_STITCH = new Finishings(5); + public static final Finishings STAPLE_TOP_LEFT = new Finishings(6); + public static final Finishings STAPLE_BOTTOM_LEFT = new Finishings(7); + public static final Finishings STAPLE_TOP_RIGHT = new Finishings(8); + public static final Finishings STAPLE_BOTTOM_RIGHT = new Finishings(9); + public static final Finishings EDGE_STITCH_LEFT = new Finishings(10); + public static final Finishings EDGE_STITCH_TOP = new Finishings(11); + public static final Finishings EDGE_STITCH_RIGHT = new Finishings(12); + public static final Finishings EDGE_STITCH_BOTTOM = new Finishings(13); + public static final Finishings STAPLE_DUAL_LEFT = new Finishings(14); + public static final Finishings STAPLE_DUAL_TOP = new Finishings(15); + public static final Finishings STAPLE_DUAL_RIGHT = new Finishings(16); + public static final Finishings STAPLE_DUAL_BOTTOM = new Finishings(17); + + /** + * Constructs a <code>Finishings</code> object. + * + * @param value the value + */ + protected Finishings(int value) + { + super(value); + } + + /** + * Returns category of this class. + * + * @return the class <code>Finishings</code> itself + */ + public final Class getCategory() + { + return Finishings.class; + } + + /** + * Returns the name of this attribute. + * + * @return the name + */ + public final String getName() + { + return "finishings"; + } +} diff --git a/libjava/javax/print/attribute/standard/JobHoldUntil.java b/libjava/javax/print/attribute/standard/JobHoldUntil.java index 7370ba8..c285dc7 100644 --- a/libjava/javax/print/attribute/standard/JobHoldUntil.java +++ b/libjava/javax/print/attribute/standard/JobHoldUntil.java @@ -42,6 +42,9 @@ import javax.print.attribute.DateTimeSyntax; import javax.print.attribute.PrintJobAttribute; import javax.print.attribute.PrintRequestAttribute; +/** + * @author Michael Koch (konqueror@gmx.de) + */ public final class JobHoldUntil extends DateTimeSyntax implements PrintJobAttribute, PrintRequestAttribute { @@ -64,7 +67,7 @@ public final class JobHoldUntil extends DateTimeSyntax * * @param obj the object to test * - * @returns true if both objects are equal, false otherwise. + * @return true if both objects are equal, false otherwise. */ public boolean equals(Object obj) { diff --git a/libjava/javax/print/attribute/standard/JobImpressions.java b/libjava/javax/print/attribute/standard/JobImpressions.java index 3c99d4f..0a02be9 100644 --- a/libjava/javax/print/attribute/standard/JobImpressions.java +++ b/libjava/javax/print/attribute/standard/JobImpressions.java @@ -69,7 +69,7 @@ public final class JobImpressions extends IntegerSyntax * * @param obj the object to test * - * @returns true if both objects are equal, false otherwise. + * @return true if both objects are equal, false otherwise. */ public boolean equals(Object obj) { diff --git a/libjava/javax/print/attribute/standard/JobImpressionsCompleted.java b/libjava/javax/print/attribute/standard/JobImpressionsCompleted.java index da30186..a494a27 100644 --- a/libjava/javax/print/attribute/standard/JobImpressionsCompleted.java +++ b/libjava/javax/print/attribute/standard/JobImpressionsCompleted.java @@ -1,5 +1,5 @@ /* JobImpressionsCompleted.java -- - Copyright (C) 2003 Free Software Foundation, Inc. + Copyright (C) 2003, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -41,7 +41,7 @@ import javax.print.attribute.IntegerSyntax; import javax.print.attribute.PrintJobAttribute; /** - * @author Michael Koch + * @author Michael Koch (konqueror@gmx.de) */ public final class JobImpressionsCompleted extends IntegerSyntax implements PrintJobAttribute @@ -68,7 +68,7 @@ public final class JobImpressionsCompleted extends IntegerSyntax * * @param obj the object to test * - * @returns true if both objects are equal, false otherwise. + * @return true if both objects are equal, false otherwise. */ public boolean equals(Object obj) { diff --git a/libjava/javax/print/attribute/standard/JobImpressionsSupported.java b/libjava/javax/print/attribute/standard/JobImpressionsSupported.java new file mode 100644 index 0000000..6dce380 --- /dev/null +++ b/libjava/javax/print/attribute/standard/JobImpressionsSupported.java @@ -0,0 +1,79 @@ +/* JobImpressionsSupported.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.print.attribute.standard; + +import javax.print.attribute.SetOfIntegerSyntax; +import javax.print.attribute.SupportedValuesAttribute; + + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public final class JobImpressionsSupported extends SetOfIntegerSyntax + implements SupportedValuesAttribute +{ + private static final long serialVersionUID = -4887354803843173692L; + + /** + * Constructs a <code>JobImpressionsSupported</code> object. + */ + public JobImpressionsSupported(int lowerBound, int upperBound) + { + super(lowerBound, upperBound); + } + + /** + * Returns category of this class. + * + * @return the class <code>JobImpressionsSupported</code> itself + */ + public final Class getCategory() + { + return JobImpressionsSupported.class; + } + + /** + * Returns the name of this attribute. + * + * @return the name + */ + public final String getName() + { + return "job-impressions-supported"; + } +} diff --git a/libjava/javax/print/attribute/standard/JobKOctets.java b/libjava/javax/print/attribute/standard/JobKOctets.java index ff86181..fb6279f 100644 --- a/libjava/javax/print/attribute/standard/JobKOctets.java +++ b/libjava/javax/print/attribute/standard/JobKOctets.java @@ -69,7 +69,7 @@ public final class JobKOctets extends IntegerSyntax * * @param obj the object to test * - * @returns true if both objects are equal, false otherwise. + * @return true if both objects are equal, false otherwise. */ public boolean equals(Object obj) { diff --git a/libjava/javax/print/attribute/standard/JobKOctetsProcessed.java b/libjava/javax/print/attribute/standard/JobKOctetsProcessed.java index 42de240..90ed2de 100644 --- a/libjava/javax/print/attribute/standard/JobKOctetsProcessed.java +++ b/libjava/javax/print/attribute/standard/JobKOctetsProcessed.java @@ -68,7 +68,7 @@ public final class JobKOctetsProcessed extends IntegerSyntax * * @param obj the object to test * - * @returns true if both objects are equal, false otherwise. + * @return true if both objects are equal, false otherwise. */ public boolean equals(Object obj) { diff --git a/libjava/javax/print/attribute/standard/JobKOctetsSupported.java b/libjava/javax/print/attribute/standard/JobKOctetsSupported.java new file mode 100644 index 0000000..3a40dfd --- /dev/null +++ b/libjava/javax/print/attribute/standard/JobKOctetsSupported.java @@ -0,0 +1,79 @@ +/* JobKOctetsSupported.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.print.attribute.standard; + +import javax.print.attribute.SetOfIntegerSyntax; +import javax.print.attribute.SupportedValuesAttribute; + + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public final class JobKOctetsSupported extends SetOfIntegerSyntax + implements SupportedValuesAttribute +{ + private static final long serialVersionUID = -2867871140549897443L; + + /** + * Constructs a <code>JobKOctetsSupported</code> object. + */ + public JobKOctetsSupported(int lowerBound, int upperBound) + { + super(lowerBound, upperBound); + } + + /** + * Returns category of this class. + * + * @return the class <code>ColorSupported</code> itself + */ + public final Class getCategory() + { + return JobKOctetsSupported.class; + } + + /** + * Returns the name of this attribute. + * + * @return the name + */ + public final String getName() + { + return "job-k-octets-supported"; + } +} diff --git a/libjava/javax/print/attribute/standard/JobMediaSheets.java b/libjava/javax/print/attribute/standard/JobMediaSheets.java index ec90bc4..814fef6 100644 --- a/libjava/javax/print/attribute/standard/JobMediaSheets.java +++ b/libjava/javax/print/attribute/standard/JobMediaSheets.java @@ -69,7 +69,7 @@ public class JobMediaSheets extends IntegerSyntax * * @param obj the object to test * - * @returns true if both objects are equal, false otherwise. + * @return true if both objects are equal, false otherwise. */ public boolean equals(Object obj) { diff --git a/libjava/javax/print/attribute/standard/JobMediaSheetsCompleted.java b/libjava/javax/print/attribute/standard/JobMediaSheetsCompleted.java index 7812781..bc02b5f 100644 --- a/libjava/javax/print/attribute/standard/JobMediaSheetsCompleted.java +++ b/libjava/javax/print/attribute/standard/JobMediaSheetsCompleted.java @@ -68,7 +68,7 @@ public final class JobMediaSheetsCompleted extends IntegerSyntax * * @param obj the object to test * - * @returns true if both objects are equal, false otherwise. + * @return true if both objects are equal, false otherwise. */ public boolean equals(Object obj) { diff --git a/libjava/javax/print/attribute/standard/JobMediaSheetsSupported.java b/libjava/javax/print/attribute/standard/JobMediaSheetsSupported.java new file mode 100644 index 0000000..00f3b61 --- /dev/null +++ b/libjava/javax/print/attribute/standard/JobMediaSheetsSupported.java @@ -0,0 +1,79 @@ +/* JobMediaSheetsSupported.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.print.attribute.standard; + +import javax.print.attribute.SetOfIntegerSyntax; +import javax.print.attribute.SupportedValuesAttribute; + + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public final class JobMediaSheetsSupported extends SetOfIntegerSyntax + implements SupportedValuesAttribute +{ + private static final long serialVersionUID = 2953685470388672940L; + + /** + * Constructs a <code>JobMediaSheetsSupported</code> object. + */ + public JobMediaSheetsSupported(int lowerBound, int upperBound) + { + super(lowerBound, upperBound); + } + + /** + * Returns category of this class. + * + * @return the class <code>JobMediaSheetsSupported</code> itself + */ + public final Class getCategory() + { + return JobMediaSheetsSupported.class; + } + + /** + * Returns the name of this attribute. + * + * @return the name + */ + public final String getName() + { + return "job-media-sheets-supported"; + } +} diff --git a/libjava/javax/print/attribute/standard/JobMessageFromOperator.java b/libjava/javax/print/attribute/standard/JobMessageFromOperator.java index 0caa805..b99cce1 100644 --- a/libjava/javax/print/attribute/standard/JobMessageFromOperator.java +++ b/libjava/javax/print/attribute/standard/JobMessageFromOperator.java @@ -41,6 +41,10 @@ import java.util.Locale; import javax.print.attribute.PrintJobAttribute; import javax.print.attribute.TextSyntax; + +/** + * @author Michael Koch (konqueror@gmx.de) + */ public final class JobMessageFromOperator extends TextSyntax implements PrintJobAttribute { @@ -63,7 +67,7 @@ public final class JobMessageFromOperator extends TextSyntax * * @param obj the object to test * - * @returns true if both objects are equal, false otherwise. + * @return true if both objects are equal, false otherwise. */ public boolean equals(Object obj) { diff --git a/libjava/javax/print/attribute/standard/JobName.java b/libjava/javax/print/attribute/standard/JobName.java index c69434b..ba751b1 100644 --- a/libjava/javax/print/attribute/standard/JobName.java +++ b/libjava/javax/print/attribute/standard/JobName.java @@ -42,6 +42,10 @@ import javax.print.attribute.PrintJobAttribute; import javax.print.attribute.PrintRequestAttribute; import javax.print.attribute.TextSyntax; + +/** + * @author Michael Koch (konqueror@gmx.de) + */ public final class JobName extends TextSyntax implements PrintJobAttribute, PrintRequestAttribute { @@ -64,7 +68,7 @@ public final class JobName extends TextSyntax * * @param obj the object to test * - * @returns true if both objects are equal, false otherwise. + * @return true if both objects are equal, false otherwise. */ public boolean equals(Object obj) { diff --git a/libjava/javax/print/attribute/standard/JobOriginatingUserName.java b/libjava/javax/print/attribute/standard/JobOriginatingUserName.java index 925a5f4..e0f4045 100644 --- a/libjava/javax/print/attribute/standard/JobOriginatingUserName.java +++ b/libjava/javax/print/attribute/standard/JobOriginatingUserName.java @@ -41,6 +41,10 @@ import java.util.Locale; import javax.print.attribute.PrintJobAttribute; import javax.print.attribute.TextSyntax; + +/** + * @author Michael Koch (konqueror@gmx.de) + */ public final class JobOriginatingUserName extends TextSyntax implements PrintJobAttribute { @@ -63,7 +67,7 @@ public final class JobOriginatingUserName extends TextSyntax * * @param obj the object to test * - * @returns true if both objects are equal, false otherwise. + * @return true if both objects are equal, false otherwise. */ public boolean equals(Object obj) { diff --git a/libjava/javax/print/attribute/standard/JobPriority.java b/libjava/javax/print/attribute/standard/JobPriority.java index f540e78..5f539c9 100644 --- a/libjava/javax/print/attribute/standard/JobPriority.java +++ b/libjava/javax/print/attribute/standard/JobPriority.java @@ -1,5 +1,5 @@ /* JobPriority.java -- - Copyright (C) 2003 Free Software Foundation, Inc. + Copyright (C) 2003, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -41,6 +41,10 @@ import javax.print.attribute.IntegerSyntax; import javax.print.attribute.PrintJobAttribute; import javax.print.attribute.PrintRequestAttribute; + +/** + * @author Michael Koch (konqueror@gmx.de) + */ public final class JobPriority extends IntegerSyntax implements PrintJobAttribute, PrintRequestAttribute { @@ -66,7 +70,7 @@ public final class JobPriority extends IntegerSyntax * * @param obj the object to test * - * @returns true if both objects are equal, false otherwise. + * @return true if both objects are equal, false otherwise. */ public boolean equals(Object obj) { diff --git a/libjava/javax/print/attribute/standard/JobPrioritySupported.java b/libjava/javax/print/attribute/standard/JobPrioritySupported.java index a46c76b..1b08030 100644 --- a/libjava/javax/print/attribute/standard/JobPrioritySupported.java +++ b/libjava/javax/print/attribute/standard/JobPrioritySupported.java @@ -1,5 +1,5 @@ /* JobPrioritySupported.java -- - Copyright (C) 2003 Free Software Foundation, Inc. + Copyright (C) 2003, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -40,6 +40,10 @@ package javax.print.attribute.standard; import javax.print.attribute.IntegerSyntax; import javax.print.attribute.SupportedValuesAttribute; + +/** + * @author Michael Koch (konqueror@gmx.de) + */ public final class JobPrioritySupported extends IntegerSyntax implements SupportedValuesAttribute { @@ -65,7 +69,7 @@ public final class JobPrioritySupported extends IntegerSyntax * * @param obj the object to test * - * @returns true if both objects are equal, false otherwise. + * @return true if both objects are equal, false otherwise. */ public boolean equals(Object obj) { diff --git a/libjava/javax/print/attribute/standard/JobSheets.java b/libjava/javax/print/attribute/standard/JobSheets.java new file mode 100644 index 0000000..db47b7e --- /dev/null +++ b/libjava/javax/print/attribute/standard/JobSheets.java @@ -0,0 +1,83 @@ +/* JobSheets.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.print.attribute.standard; + +import javax.print.attribute.EnumSyntax; +import javax.print.attribute.PrintJobAttribute; +import javax.print.attribute.PrintRequestAttribute; + + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public class JobSheets extends EnumSyntax + implements PrintJobAttribute, PrintRequestAttribute +{ + private static final long serialVersionUID = -4735258056132519759L; + + public static final JobSheets NONE = new JobSheets(0); + public static final JobSheets STANDARD = new JobSheets(1); + + /** + * Constructs a <code>JobSheets</code> object. + */ + protected JobSheets(int value) + { + super(value); + } + + /** + * Returns category of this class. + * + * @return the class <code>JobSheets</code> itself + */ + public final Class getCategory() + { + return JobSheets.class; + } + + /** + * Returns the name of this attribute. + * + * @return the name + */ + public final String getName() + { + return "job-sheets"; + } +} diff --git a/libjava/javax/print/attribute/standard/JobState.java b/libjava/javax/print/attribute/standard/JobState.java new file mode 100644 index 0000000..f8eb15c --- /dev/null +++ b/libjava/javax/print/attribute/standard/JobState.java @@ -0,0 +1,88 @@ +/* JobState.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.print.attribute.standard; + +import javax.print.attribute.EnumSyntax; +import javax.print.attribute.PrintJobAttribute; + + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public class JobState extends EnumSyntax + implements PrintJobAttribute +{ + private static final long serialVersionUID = 400465010094018920L; + + 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); + + /** + * Constructs a <code>JobState</code> object. + */ + protected JobState(int value) + { + super(value); + } + + /** + * Returns category of this class. + * + * @return the class <code>JobState</code> itself + */ + public final Class getCategory() + { + return JobState.class; + } + + /** + * Returns the name of this attribute. + * + * @return the name + */ + public final String getName() + { + return "job-state"; + } +} diff --git a/libjava/javax/print/attribute/standard/JobStateReason.java b/libjava/javax/print/attribute/standard/JobStateReason.java new file mode 100644 index 0000000..aa2fd09 --- /dev/null +++ b/libjava/javax/print/attribute/standard/JobStateReason.java @@ -0,0 +1,81 @@ +/* JobStateReason.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.print.attribute.standard; + +import javax.print.attribute.Attribute; +import javax.print.attribute.EnumSyntax; + + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public class JobStateReason extends EnumSyntax + implements Attribute +{ + private static final long serialVersionUID = -8765894420449009168L; + + public static final JobStateReason ABORTED_BY_SYSTEM = new JobStateReason(1); + + /** + * Constructs a <code>JobStateReason</code> object. + */ + protected JobStateReason(int value) + { + super(value); + } + + /** + * Returns category of this class. + * + * @return the class <code>JobStateReason</code> itself + */ + public final Class getCategory() + { + return JobStateReason.class; + } + + /** + * Returns the name of this attribute. + * + * @return the name + */ + public final String getName() + { + return "job-state-reason"; + } +} diff --git a/libjava/javax/print/attribute/standard/JobStateReasons.java b/libjava/javax/print/attribute/standard/JobStateReasons.java new file mode 100644 index 0000000..fcfaff5 --- /dev/null +++ b/libjava/javax/print/attribute/standard/JobStateReasons.java @@ -0,0 +1,71 @@ +/* JobStateReasons.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.print.attribute.standard; + +import java.util.HashSet; +import javax.print.attribute.PrintJobAttribute; + + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public final class JobStateReasons extends HashSet + implements PrintJobAttribute +{ + private static final long serialVersionUID = 8849088261264331812L; + + /** + * Returns category of this class. + * + * @return the class <code>ColorSupported</code> itself + */ + public final Class getCategory() + { + return JobStateReasons.class; + } + + /** + * Returns the name of this attribute. + * + * @return the name + */ + public final String getName() + { + return "job-state-reasons"; + } +} diff --git a/libjava/javax/print/attribute/standard/Media.java b/libjava/javax/print/attribute/standard/Media.java new file mode 100644 index 0000000..c960457 --- /dev/null +++ b/libjava/javax/print/attribute/standard/Media.java @@ -0,0 +1,81 @@ +/* Media.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.print.attribute.standard; + +import javax.print.attribute.DocAttribute; +import javax.print.attribute.EnumSyntax; +import javax.print.attribute.PrintJobAttribute; +import javax.print.attribute.PrintRequestAttribute; + + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public abstract class Media extends EnumSyntax + implements DocAttribute, PrintRequestAttribute, PrintJobAttribute +{ + private static final long serialVersionUID = -2823970704630722439L; + + /** + * Constructs a <code>Media</code> object. + */ + protected Media(int value) + { + super(value); + } + + /** + * Returns category of this class. + * + * @return the class <code>Media</code> itself + */ + public final Class getCategory() + { + return Media.class; + } + + /** + * Returns the name of this attribute. + * + * @return the name + */ + public final String getName() + { + return "media"; + } +} diff --git a/libjava/javax/print/attribute/standard/MediaSizeName.java b/libjava/javax/print/attribute/standard/MediaSizeName.java new file mode 100644 index 0000000..1d74690 --- /dev/null +++ b/libjava/javax/print/attribute/standard/MediaSizeName.java @@ -0,0 +1,135 @@ +/* MediaSizeName.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.print.attribute.standard; + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public class MediaSizeName extends Media +{ + private static final long serialVersionUID = 2778798329756942747L; + + public static final MediaSizeName ISO_A0 = new MediaSizeName(0); + public static final MediaSizeName ISO_A1 = new MediaSizeName(1); + public static final MediaSizeName ISO_A2 = new MediaSizeName(2); + public static final MediaSizeName ISO_A3 = new MediaSizeName(3); + public static final MediaSizeName ISO_A4 = new MediaSizeName(4); + public static final MediaSizeName ISO_A5 = new MediaSizeName(5); + public static final MediaSizeName ISO_A6 = new MediaSizeName(6); + public static final MediaSizeName ISO_A7 = new MediaSizeName(7); + public static final MediaSizeName ISO_A8 = new MediaSizeName(8); + public static final MediaSizeName ISO_A9 = new MediaSizeName(9); + public static final MediaSizeName ISO_A10 = new MediaSizeName(10); + public static final MediaSizeName ISO_B0 = new MediaSizeName(11); + public static final MediaSizeName ISO_B1 = new MediaSizeName(12); + public static final MediaSizeName ISO_B2 = new MediaSizeName(13); + public static final MediaSizeName ISO_B3 = new MediaSizeName(14); + public static final MediaSizeName ISO_B4 = new MediaSizeName(15); + public static final MediaSizeName ISO_B5 = new MediaSizeName(16); + public static final MediaSizeName ISO_B6 = new MediaSizeName(17); + public static final MediaSizeName ISO_B7 = new MediaSizeName(18); + public static final MediaSizeName ISO_B8 = new MediaSizeName(19); + public static final MediaSizeName ISO_B9 = new MediaSizeName(20); + public static final MediaSizeName ISO_B10 = new MediaSizeName(21); + public static final MediaSizeName JIS_B0 = new MediaSizeName(22); + public static final MediaSizeName JIS_B1 = new MediaSizeName(23); + public static final MediaSizeName JIS_B2 = new MediaSizeName(24); + public static final MediaSizeName JIS_B3 = new MediaSizeName(25); + public static final MediaSizeName JIS_B4 = new MediaSizeName(26); + public static final MediaSizeName JIS_B5 = new MediaSizeName(27); + public static final MediaSizeName JIS_B6 = new MediaSizeName(28); + public static final MediaSizeName JIS_B7 = new MediaSizeName(29); + public static final MediaSizeName JIS_B8 = new MediaSizeName(30); + public static final MediaSizeName JIS_B9 = new MediaSizeName(31); + public static final MediaSizeName JIS_B10 = new MediaSizeName(32); + public static final MediaSizeName ISO_C0 = new MediaSizeName(33); + public static final MediaSizeName ISO_C1 = new MediaSizeName(34); + public static final MediaSizeName ISO_C2 = new MediaSizeName(35); + public static final MediaSizeName ISO_C3 = new MediaSizeName(36); + public static final MediaSizeName ISO_C4 = new MediaSizeName(37); + public static final MediaSizeName ISO_C5 = new MediaSizeName(38); + public static final MediaSizeName ISO_C6 = new MediaSizeName(39); + public static final MediaSizeName NA_LETTER = new MediaSizeName(40); + public static final MediaSizeName NA_LEGAL = new MediaSizeName(41); + public static final MediaSizeName EXECUTIVE = new MediaSizeName(42); + public static final MediaSizeName LEDGER = new MediaSizeName(43); + public static final MediaSizeName TABLOID = new MediaSizeName(44); + public static final MediaSizeName INVOICE = new MediaSizeName(45); + public static final MediaSizeName FOLIO = new MediaSizeName(46); + public static final MediaSizeName QUARTO = new MediaSizeName(47); + public static final MediaSizeName JAPANESE_POSTCARD = new MediaSizeName(48); + public static final MediaSizeName JAPANESE_DOUBLE_POSTCARD = + new MediaSizeName(49); + public static final MediaSizeName A = new MediaSizeName(50); + public static final MediaSizeName B = new MediaSizeName(51); + public static final MediaSizeName C = new MediaSizeName(52); + public static final MediaSizeName D = new MediaSizeName(53); + public static final MediaSizeName E = new MediaSizeName(54); + public static final MediaSizeName ISO_DESIGNATED_LONG = + new MediaSizeName(55); + public static final MediaSizeName ITALY_ENVELOPE = new MediaSizeName(56); + public static final MediaSizeName MONARCH_ENVELOPE = new MediaSizeName(57); + public static final MediaSizeName PERSONAL_ENVELOPE = new MediaSizeName(58); + public static final MediaSizeName NA_NUMBER_9_ENVELOPE = + new MediaSizeName(59); + public static final MediaSizeName NA_NUMBER_10_ENVELOPE = + new MediaSizeName(60); + public static final MediaSizeName NA_NUMBER_11_ENVELOPE = + new MediaSizeName(61); + public static final MediaSizeName NA_NUMBER_12_ENVELOPE = + new MediaSizeName(62); + public static final MediaSizeName NA_NUMBER_14_ENVELOPE = + new MediaSizeName(63); + public static final MediaSizeName NA_6X9_ENVELOPE = new MediaSizeName(64); + public static final MediaSizeName NA_7X9_ENVELOPE = new MediaSizeName(65); + public static final MediaSizeName NA_9X11_ENVELOPE = new MediaSizeName(66); + public static final MediaSizeName NA_9X12_ENVELOPE = new MediaSizeName(67); + public static final MediaSizeName NA_10X13_ENVELOPE = new MediaSizeName(68); + public static final MediaSizeName NA_10X14_ENVELOPE = new MediaSizeName(69); + public static final MediaSizeName NA_10X15_ENVELOPE = new MediaSizeName(70); + public static final MediaSizeName NA_5X7 = new MediaSizeName(71); + public static final MediaSizeName NA_8X10 = new MediaSizeName(72); + + /** + * Constructs a <code>MediaSizeName</code> object. + */ + protected MediaSizeName(int value) + { + super(value); + } +} diff --git a/libjava/javax/print/attribute/standard/MultipleDocumentHandling.java b/libjava/javax/print/attribute/standard/MultipleDocumentHandling.java new file mode 100644 index 0000000..a064b21 --- /dev/null +++ b/libjava/javax/print/attribute/standard/MultipleDocumentHandling.java @@ -0,0 +1,83 @@ +/* MultipleDocumentHandling.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.print.attribute.standard; + +import javax.print.attribute.EnumSyntax; +import javax.print.attribute.PrintJobAttribute; +import javax.print.attribute.PrintRequestAttribute; + + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public class MultipleDocumentHandling extends EnumSyntax + implements PrintJobAttribute, PrintRequestAttribute +{ + private static final long serialVersionUID = 8098326460746413466L; + + public static final MultipleDocumentHandling SEPARATE_DOCUMENTS_COLLATED_COPIES = + new MultipleDocumentHandling(2); + + /** + * Constructs a <code>MultipleDocumentHandling</code> object. + */ + protected MultipleDocumentHandling(int value) + { + super(value); + } + + /** + * Returns category of this class. + * + * @return the class <code>MultipleDocumentHandling</code> itself + */ + public final Class getCategory() + { + return MultipleDocumentHandling.class; + } + + /** + * Returns the name of this attribute. + * + * @return the name + */ + public final String getName() + { + return "multiple-document-handling"; + } +} diff --git a/libjava/javax/print/attribute/standard/NumberOfDocuments.java b/libjava/javax/print/attribute/standard/NumberOfDocuments.java index 98c2f5a..22b15ab 100644 --- a/libjava/javax/print/attribute/standard/NumberOfDocuments.java +++ b/libjava/javax/print/attribute/standard/NumberOfDocuments.java @@ -68,7 +68,7 @@ public final class NumberOfDocuments extends IntegerSyntax * * @param obj the object to test * - * @returns true if both objects are equal, false otherwise. + * @return true if both objects are equal, false otherwise. */ public boolean equals(Object obj) { diff --git a/libjava/javax/print/attribute/standard/NumberOfInterveningJobs.java b/libjava/javax/print/attribute/standard/NumberOfInterveningJobs.java index 865b774..b54089a 100644 --- a/libjava/javax/print/attribute/standard/NumberOfInterveningJobs.java +++ b/libjava/javax/print/attribute/standard/NumberOfInterveningJobs.java @@ -1,5 +1,5 @@ /* NumberOfInterveningJobs.java -- - Copyright (C) 2003 Free Software Foundation, Inc. + Copyright (C) 2003, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -49,7 +49,7 @@ public final class NumberOfInterveningJobs extends IntegerSyntax private static final long serialVersionUID = 2568141124844982746L; /** - * Creates a <code>QueuedJobCount</code> object. + * Creates a <code>NumberOfInterveningJobs</code> object. * * @param value the number of intervening jobs * @@ -68,7 +68,7 @@ public final class NumberOfInterveningJobs extends IntegerSyntax * * @param obj the object to test * - * @returns true if both objects are equal, false otherwise. + * @return true if both objects are equal, false otherwise. */ public boolean equals(Object obj) { diff --git a/libjava/javax/print/attribute/standard/NumberUp.java b/libjava/javax/print/attribute/standard/NumberUp.java index 351fcf7..681207b 100644 --- a/libjava/javax/print/attribute/standard/NumberUp.java +++ b/libjava/javax/print/attribute/standard/NumberUp.java @@ -68,7 +68,7 @@ public final class NumberUp extends IntegerSyntax * * @param obj the object to test * - * @returns true if both objects are equal, false otherwise. + * @return true if both objects are equal, false otherwise. */ public boolean equals(Object obj) { diff --git a/libjava/javax/print/attribute/standard/NumberUpSupported.java b/libjava/javax/print/attribute/standard/NumberUpSupported.java new file mode 100644 index 0000000..8418325 --- /dev/null +++ b/libjava/javax/print/attribute/standard/NumberUpSupported.java @@ -0,0 +1,95 @@ +/* NumberUpSupported.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.print.attribute.standard; + +import javax.print.attribute.SetOfIntegerSyntax; +import javax.print.attribute.SupportedValuesAttribute; + + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public final class NumberUpSupported extends SetOfIntegerSyntax + implements SupportedValuesAttribute +{ + private static final long serialVersionUID = -1041573395759141805L; + + /** + * Constructs a <code>NumberUp</code> object. + */ + public NumberUpSupported(int member) + { + super(member); + } + + /** + * Constructs a <code>NumberUp</code> object. + */ + public NumberUpSupported(int[][] members) + { + super(members); + } + + /** + * Constructs a <code>NumberUp</code> object. + */ + public NumberUpSupported(int lowerBound, int upperBound) + { + super(lowerBound, upperBound); + } + + /** + * Returns category of this class. + * + * @return the class <code>NumberUpSupported</code> itself + */ + public final Class getCategory() + { + return NumberUpSupported.class; + } + + /** + * Returns the name of this attribute. + * + * @return the name + */ + public final String getName() + { + return "number-up-supported"; + } +} diff --git a/libjava/javax/print/attribute/standard/OrientationRequested.java b/libjava/javax/print/attribute/standard/OrientationRequested.java new file mode 100644 index 0000000..76aef1d --- /dev/null +++ b/libjava/javax/print/attribute/standard/OrientationRequested.java @@ -0,0 +1,90 @@ +/* OrientationRequested.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.print.attribute.standard; + +import javax.print.attribute.DocAttribute; +import javax.print.attribute.EnumSyntax; +import javax.print.attribute.PrintJobAttribute; +import javax.print.attribute.PrintRequestAttribute; + + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public final class OrientationRequested extends EnumSyntax + implements DocAttribute, PrintRequestAttribute, PrintJobAttribute +{ + private static final long serialVersionUID = -4447437289862822276L; + + public static final OrientationRequested PORTRAIT = + new OrientationRequested(0); + public static final OrientationRequested LANDSCAPE = + new OrientationRequested(1); + public static final OrientationRequested REVERSE_LANDSCAPE = + new OrientationRequested(2); + public static final OrientationRequested REVERSE_PORTRAIT = + new OrientationRequested(3); + + /** + * Constructs a <code>OrientationRequested</code> object. + */ + protected OrientationRequested(int value) + { + super(value); + } + + /** + * Returns category of this class. + * + * @return the class <code>OrientationRequested</code> itself + */ + public final Class getCategory() + { + return OrientationRequested.class; + } + + /** + * Returns the name of this attribute. + * + * @return the name + */ + public final String getName() + { + return "orientation-requested"; + } +} diff --git a/libjava/javax/print/attribute/standard/OutputDeviceAssigned.java b/libjava/javax/print/attribute/standard/OutputDeviceAssigned.java index a26cb27..f41b366 100644 --- a/libjava/javax/print/attribute/standard/OutputDeviceAssigned.java +++ b/libjava/javax/print/attribute/standard/OutputDeviceAssigned.java @@ -41,6 +41,9 @@ import java.util.Locale; import javax.print.attribute.PrintJobAttribute; import javax.print.attribute.TextSyntax; +/** + * @author Michael Koch (konqueror@gmx.de) + */ public final class OutputDeviceAssigned extends TextSyntax implements PrintJobAttribute { @@ -63,7 +66,7 @@ public final class OutputDeviceAssigned extends TextSyntax * * @param obj the object to test * - * @returns true if both objects are equal, false otherwise. + * @return true if both objects are equal, false otherwise. */ public boolean equals(Object obj) { diff --git a/libjava/javax/print/attribute/standard/PDLOverrideSupported.java b/libjava/javax/print/attribute/standard/PDLOverrideSupported.java new file mode 100644 index 0000000..64bc058 --- /dev/null +++ b/libjava/javax/print/attribute/standard/PDLOverrideSupported.java @@ -0,0 +1,84 @@ +/* PDLOverrideSupported.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.print.attribute.standard; + +import javax.print.attribute.EnumSyntax; +import javax.print.attribute.PrintServiceAttribute; + + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public class PDLOverrideSupported extends EnumSyntax + implements PrintServiceAttribute +{ + private static final long serialVersionUID = -4393264467928463934L; + + public static final PDLOverrideSupported NOT_ATTEMPTED = + new PDLOverrideSupported(0); + public static final PDLOverrideSupported ATTEMPTED = + new PDLOverrideSupported(0); + + /** + * Constructs a <code>PDLOverrideSupported</code> object. + */ + protected PDLOverrideSupported(int value) + { + super(value); + } + + /** + * Returns category of this class. + * + * @return the class <code>PDLOverrideSupported</code> itself + */ + public final Class getCategory() + { + return PDLOverrideSupported.class; + } + + /** + * Returns the name of this attribute. + * + * @return the name + */ + public final String getName() + { + return "pdl-override-supported"; + } +} diff --git a/libjava/javax/print/attribute/standard/PageRanges.java b/libjava/javax/print/attribute/standard/PageRanges.java new file mode 100644 index 0000000..e981fe2 --- /dev/null +++ b/libjava/javax/print/attribute/standard/PageRanges.java @@ -0,0 +1,97 @@ +/* PageRanges.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + +package javax.print.attribute.standard; + +import javax.print.attribute.DocAttribute; +import javax.print.attribute.PrintJobAttribute; +import javax.print.attribute.PrintRequestAttribute; +import javax.print.attribute.SetOfIntegerSyntax; + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public final class PageRanges extends SetOfIntegerSyntax + implements DocAttribute, PrintRequestAttribute, PrintJobAttribute +{ + private static final long serialVersionUID = 8639895197656148392L; + + /** + * Constructs a <code>PageRanges</code> object. + */ + public PageRanges(int member) + { + super(member); + } + + /** + * Constructs a <code>PageRanges</code> object. + */ + public PageRanges(int[][] members) + { + super(members); + } + + /** + * Constructs a <code>PageRanges</code> object. + */ + public PageRanges(int lowerBound, int upperBound) + { + super(lowerBound, upperBound); + } + + /** + * Returns category of this class. + * + * @return the class <code>PageRanges</code> itself + */ + public final Class getCategory() + { + return PageRanges.class; + } + + /** + * Returns the name of this attribute. + * + * @return the name + */ + public final String getName() + { + return "page-ranges"; + } +} diff --git a/libjava/javax/print/attribute/standard/PagesPerMinute.java b/libjava/javax/print/attribute/standard/PagesPerMinute.java index 3a50493..9bb3b5f 100644 --- a/libjava/javax/print/attribute/standard/PagesPerMinute.java +++ b/libjava/javax/print/attribute/standard/PagesPerMinute.java @@ -68,7 +68,7 @@ public final class PagesPerMinute extends IntegerSyntax * * @param obj the object to test * - * @returns true if both objects are equal, false otherwise. + * @return true if both objects are equal, false otherwise. */ public boolean equals(Object obj) { diff --git a/libjava/javax/print/attribute/standard/PagesPerMinuteColor.java b/libjava/javax/print/attribute/standard/PagesPerMinuteColor.java index ea4a290..b85262a 100644 --- a/libjava/javax/print/attribute/standard/PagesPerMinuteColor.java +++ b/libjava/javax/print/attribute/standard/PagesPerMinuteColor.java @@ -68,7 +68,7 @@ public final class PagesPerMinuteColor extends IntegerSyntax * * @param obj the object to test * - * @returns true if both objects are equal, false otherwise. + * @return true if both objects are equal, false otherwise. */ public boolean equals(Object obj) { diff --git a/libjava/javax/print/attribute/standard/PresentationDirection.java b/libjava/javax/print/attribute/standard/PresentationDirection.java new file mode 100644 index 0000000..0a13288 --- /dev/null +++ b/libjava/javax/print/attribute/standard/PresentationDirection.java @@ -0,0 +1,97 @@ +/* PresentationDirection.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.print.attribute.standard; + +import javax.print.attribute.EnumSyntax; +import javax.print.attribute.PrintJobAttribute; +import javax.print.attribute.PrintRequestAttribute; + + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public final class PresentationDirection extends EnumSyntax + implements PrintRequestAttribute, PrintJobAttribute +{ + private static final long serialVersionUID = 8294728067230931780L; + + public static final PresentationDirection TOBOTTOM_TORIGHT = + new PresentationDirection(0); + public static final PresentationDirection TOBOTTOM_TOLEFT = + new PresentationDirection(1); + public static final PresentationDirection TOTOP_TORIGHT = + new PresentationDirection(2); + public static final PresentationDirection TOTOP_TOLEFT = + new PresentationDirection(3); + public static final PresentationDirection TORIGHT_TOBOTTOM = + new PresentationDirection(4); + public static final PresentationDirection TORIGHT_TOTOP = + new PresentationDirection(5); + public static final PresentationDirection TOLEFT_TOBOTTOM = + new PresentationDirection(6); + public static final PresentationDirection TOLEFT_TOTOP = + new PresentationDirection(7); + + /** + * Constructs a <code>PresentationDirection</code> object. + */ + private PresentationDirection(int value) + { + super(value); + } + + /** + * Returns category of this class. + * + * @return the class <code>PresentationDirection</code> itself + */ + public Class getCategory() + { + return PresentationDirection.class; + } + + /** + * Returns the name of this attribute. + * + * @return the name + */ + public String getName() + { + return "presentation-direction"; + } +} diff --git a/libjava/javax/print/attribute/standard/PrintQuality.java b/libjava/javax/print/attribute/standard/PrintQuality.java new file mode 100644 index 0000000..e253293 --- /dev/null +++ b/libjava/javax/print/attribute/standard/PrintQuality.java @@ -0,0 +1,85 @@ +/* PrintQuality.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.print.attribute.standard; + +import javax.print.attribute.DocAttribute; +import javax.print.attribute.EnumSyntax; +import javax.print.attribute.PrintJobAttribute; +import javax.print.attribute.PrintRequestAttribute; + + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public class PrintQuality extends EnumSyntax + implements DocAttribute, PrintJobAttribute, PrintRequestAttribute +{ + private static final long serialVersionUID = -3072341285225858365L; + + public static final PrintQuality DRAFT = new PrintQuality(0); + public static final PrintQuality NORMAL = new PrintQuality(1); + public static final PrintQuality HIGH = new PrintQuality(2); + + /** + * Constructs a <code>PrintQuality</code> object. + */ + protected PrintQuality(int value) + { + super(value); + } + + /** + * Returns category of this class. + * + * @return the class <code>PrintQuality</code> itself + */ + public final Class getCategory() + { + return PrintQuality.class; + } + + /** + * Returns name of this class. + * + * @return the string "print-quality" + */ + public final String getName() + { + return "print-quality"; + } +} diff --git a/libjava/javax/print/attribute/standard/PrinterInfo.java b/libjava/javax/print/attribute/standard/PrinterInfo.java index a4f77d2..c61d118 100644 --- a/libjava/javax/print/attribute/standard/PrinterInfo.java +++ b/libjava/javax/print/attribute/standard/PrinterInfo.java @@ -41,6 +41,10 @@ import java.util.Locale; import javax.print.attribute.PrintServiceAttribute; import javax.print.attribute.TextSyntax; + +/** + * @author Michael Koch (konqueror@gmx.de) + */ public final class PrinterInfo extends TextSyntax implements PrintServiceAttribute { @@ -50,6 +54,7 @@ public final class PrinterInfo extends TextSyntax * Creates a <code>PrinterInfo</code> object. * * @param printerInfo the printer info + * @param locale the locale of the info, null means default locale * * @exception NullPointerException if printerInfo is null */ @@ -63,7 +68,7 @@ public final class PrinterInfo extends TextSyntax * * @param obj the object to test * - * @returns true if both objects are equal, false otherwise. + * @return true if both objects are equal, false otherwise. */ public boolean equals(Object obj) { @@ -78,7 +83,7 @@ public final class PrinterInfo extends TextSyntax * * @return the class <code>PrinterInfo</code> itself */ - public final Class getCategory() + public Class getCategory() { return PrinterInfo.class; } @@ -88,7 +93,7 @@ public final class PrinterInfo extends TextSyntax * * @return the string "printer-info" */ - public final String getName() + public String getName() { return "printer-info"; } diff --git a/libjava/javax/print/attribute/standard/PrinterIsAcceptingJobs.java b/libjava/javax/print/attribute/standard/PrinterIsAcceptingJobs.java new file mode 100644 index 0000000..eafc643 --- /dev/null +++ b/libjava/javax/print/attribute/standard/PrinterIsAcceptingJobs.java @@ -0,0 +1,84 @@ +/* PrinterIsAcceptingJobs.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.print.attribute.standard; + +import javax.print.attribute.EnumSyntax; +import javax.print.attribute.PrintServiceAttribute; + + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public class PrinterIsAcceptingJobs extends EnumSyntax + implements PrintServiceAttribute +{ + private static final long serialVersionUID = -5052010680537678061L; + + public static final PrinterIsAcceptingJobs NOT_ACCEPTING_JOBS = + new PrinterIsAcceptingJobs(0); + public static final PrinterIsAcceptingJobs ACCEPTING_JOBS = + new PrinterIsAcceptingJobs(1); + + /** + * Constructs a <code>PrinterIsAcceptingJobs</code> object. + */ + protected PrinterIsAcceptingJobs(int value) + { + super(value); + } + + /** + * Returns category of this class. + * + * @return the class <code>PrinterIsAcceptingJobs</code> itself + */ + public final Class getCategory() + { + return PrinterIsAcceptingJobs.class; + } + + /** + * Returns the name of this attribute. + * + * @return the name + */ + public final String getName() + { + return "printer-is-accepting-jobs"; + } +} diff --git a/libjava/javax/print/attribute/standard/PrinterLocation.java b/libjava/javax/print/attribute/standard/PrinterLocation.java index d405d25..4f6976b 100644 --- a/libjava/javax/print/attribute/standard/PrinterLocation.java +++ b/libjava/javax/print/attribute/standard/PrinterLocation.java @@ -41,6 +41,9 @@ import java.util.Locale; import javax.print.attribute.PrintServiceAttribute; import javax.print.attribute.TextSyntax; +/** + * @author Michael Koch (konqueror@gmx.de) + */ public final class PrinterLocation extends TextSyntax implements PrintServiceAttribute { @@ -50,6 +53,7 @@ public final class PrinterLocation extends TextSyntax * Creates a <code>PrinterLocation</code> object. * * @param printerLocation the printer location + * @param locale the locale of the location, null means default locale * * @exception NullPointerException if printerLocation is null */ @@ -63,7 +67,7 @@ public final class PrinterLocation extends TextSyntax * * @param obj the object to test * - * @returns true if both objects are equal, false otherwise. + * @return true if both objects are equal, false otherwise. */ public boolean equals(Object obj) { @@ -78,7 +82,7 @@ public final class PrinterLocation extends TextSyntax * * @return the class <code>PrinterLocation</code> itself */ - public final Class getCategory() + public Class getCategory() { return PrinterLocation.class; } @@ -88,7 +92,7 @@ public final class PrinterLocation extends TextSyntax * * @return the string "printer-location" */ - public final String getName() + public String getName() { return "printer-location"; } diff --git a/libjava/javax/print/attribute/standard/PrinterMakeAndModel.java b/libjava/javax/print/attribute/standard/PrinterMakeAndModel.java index 2609750..8c8eea8 100644 --- a/libjava/javax/print/attribute/standard/PrinterMakeAndModel.java +++ b/libjava/javax/print/attribute/standard/PrinterMakeAndModel.java @@ -41,6 +41,9 @@ import java.util.Locale; import javax.print.attribute.PrintServiceAttribute; import javax.print.attribute.TextSyntax; +/** + * @author Michael Koch (konqueror@gmx.de) + */ public final class PrinterMakeAndModel extends TextSyntax implements PrintServiceAttribute { @@ -50,6 +53,7 @@ public final class PrinterMakeAndModel extends TextSyntax * Creates a <code>PrinterMakeAndModel</code> object. * * @param makeAndModel the make and model string + * @param locale the locale of the make and model, null means default locale * * @exception NullPointerException if makeAndModel is null */ @@ -63,7 +67,7 @@ public final class PrinterMakeAndModel extends TextSyntax * * @param obj the object to test * - * @returns true if both objects are equal, false otherwise. + * @return true if both objects are equal, false otherwise. */ public boolean equals(Object obj) { @@ -78,7 +82,7 @@ public final class PrinterMakeAndModel extends TextSyntax * * @return the class <code>PrinterMakeAndModel</code> itself */ - public final Class getCategory() + public Class getCategory() { return PrinterMakeAndModel.class; } @@ -88,7 +92,7 @@ public final class PrinterMakeAndModel extends TextSyntax * * @return the string "printer-make-and-model" */ - public final String getName() + public String getName() { return "printer-make-and-model"; } diff --git a/libjava/javax/print/attribute/standard/PrinterMessageFromOperator.java b/libjava/javax/print/attribute/standard/PrinterMessageFromOperator.java index aa1c022..92599a8 100644 --- a/libjava/javax/print/attribute/standard/PrinterMessageFromOperator.java +++ b/libjava/javax/print/attribute/standard/PrinterMessageFromOperator.java @@ -41,6 +41,10 @@ import java.util.Locale; import javax.print.attribute.PrintServiceAttribute; import javax.print.attribute.TextSyntax; + +/** + * @author Michael Koch (konqueror@gmx.de) + */ public final class PrinterMessageFromOperator extends TextSyntax implements PrintServiceAttribute { @@ -50,6 +54,7 @@ public final class PrinterMessageFromOperator extends TextSyntax * Creates a <code>PrinterMessageFromOperator</code> object. * * @param message the message + * @param locale the locale of the message, null means default locale * * @exception NullPointerException if message is null */ @@ -63,7 +68,7 @@ public final class PrinterMessageFromOperator extends TextSyntax * * @param obj the object to test * - * @returns true if both objects are equal, false otherwise. + * @return true if both objects are equal, false otherwise. */ public boolean equals(Object obj) { @@ -78,7 +83,7 @@ public final class PrinterMessageFromOperator extends TextSyntax * * @return the class <code>PrinterMessageFromOperator</code> itself */ - public final Class getCategory() + public Class getCategory() { return PrinterMessageFromOperator.class; } @@ -88,7 +93,7 @@ public final class PrinterMessageFromOperator extends TextSyntax * * @return the string "printer-message-from-operator" */ - public final String getName() + public String getName() { return "printer-message-from-operator"; } diff --git a/libjava/javax/print/attribute/standard/PrinterMoreInfo.java b/libjava/javax/print/attribute/standard/PrinterMoreInfo.java new file mode 100644 index 0000000..06b1287 --- /dev/null +++ b/libjava/javax/print/attribute/standard/PrinterMoreInfo.java @@ -0,0 +1,80 @@ +/* PrinterMoreInfo.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.print.attribute.standard; + +import java.net.URI; +import javax.print.attribute.PrintServiceAttribute; +import javax.print.attribute.URISyntax; + + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public final class PrinterMoreInfo extends URISyntax + implements PrintServiceAttribute +{ + private static final long serialVersionUID = 4555850007675338574L; + + /** + * Constructs a <code>PrinterMoreInfo</code> object. + */ + public PrinterMoreInfo(URI uri) + { + super(uri); + } + + /** + * Returns category of this class. + * + * @return the class <code>PrinterMoreInfo</code> itself + */ + public Class getCategory() + { + return PrinterMoreInfo.class; + } + + /** + * Returns the name of this attribute. + * + * @return the name + */ + public String getName() + { + return "printer-more-info"; + } +} diff --git a/libjava/javax/print/attribute/standard/PrinterMoreInfoManufacturer.java b/libjava/javax/print/attribute/standard/PrinterMoreInfoManufacturer.java new file mode 100644 index 0000000..1a65087 --- /dev/null +++ b/libjava/javax/print/attribute/standard/PrinterMoreInfoManufacturer.java @@ -0,0 +1,80 @@ +/* PrinterMoreInfoManufacturer.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.print.attribute.standard; + +import java.net.URI; +import javax.print.attribute.PrintServiceAttribute; +import javax.print.attribute.URISyntax; + + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public final class PrinterMoreInfoManufacturer extends URISyntax + implements PrintServiceAttribute +{ + private static final long serialVersionUID = 3323271346485076608L; + + /** + * Constructs a <code>PrinterMoreInfoManufacturer</code> object. + */ + public PrinterMoreInfoManufacturer(URI uri) + { + super(uri); + } + + /** + * Returns category of this class. + * + * @return the class <code>PrinterMoreInfoManufacturer</code> itself + */ + public Class getCategory() + { + return PrinterMoreInfoManufacturer.class; + } + + /** + * Returns the name of this attribute. + * + * @return the name + */ + public String getName() + { + return "printer-more-info-manufacturer"; + } +} diff --git a/libjava/javax/print/attribute/standard/PrinterName.java b/libjava/javax/print/attribute/standard/PrinterName.java index 0c55e5f..c502fbe 100644 --- a/libjava/javax/print/attribute/standard/PrinterName.java +++ b/libjava/javax/print/attribute/standard/PrinterName.java @@ -41,6 +41,10 @@ import java.util.Locale; import javax.print.attribute.PrintServiceAttribute; import javax.print.attribute.TextSyntax; + +/** + * @author Michael Koch (konqueror@gmx.de) + */ public final class PrinterName extends TextSyntax implements PrintServiceAttribute { @@ -50,6 +54,7 @@ public final class PrinterName extends TextSyntax * Creates a <code>PrinterName</code> object. * * @param printerName the printer name + * @param locale the locale of the name, null means default locale * * @exception NullPointerException if printerName is null */ @@ -63,7 +68,7 @@ public final class PrinterName extends TextSyntax * * @param obj the object to test * - * @returns true if both objects are equal, false otherwise. + * @return true if both objects are equal, false otherwise. */ public boolean equals(Object obj) { @@ -78,7 +83,7 @@ public final class PrinterName extends TextSyntax * * @return the class <code>PrinterName</code> itself */ - public final Class getCategory() + public Class getCategory() { return PrinterName.class; } @@ -88,7 +93,7 @@ public final class PrinterName extends TextSyntax * * @return the string "printer-name" */ - public final String getName() + public String getName() { return "printer-name"; } diff --git a/libjava/javax/print/attribute/standard/PrinterResolution.java b/libjava/javax/print/attribute/standard/PrinterResolution.java new file mode 100644 index 0000000..10a20d9 --- /dev/null +++ b/libjava/javax/print/attribute/standard/PrinterResolution.java @@ -0,0 +1,82 @@ +/* PrinterMoreInfoManufacturer.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.print.attribute.standard; + +import javax.print.attribute.DocAttribute; +import javax.print.attribute.PrintJobAttribute; +import javax.print.attribute.PrintRequestAttribute; +import javax.print.attribute.ResolutionSyntax; + + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public final class PrinterResolution extends ResolutionSyntax + implements DocAttribute, PrintJobAttribute, PrintRequestAttribute +{ + private static final long serialVersionUID = 13090306561090558L; + + /** + * Constructs a <code>PrinterResolution</code> object. + */ + public PrinterResolution(int crossFeedResolution, int feedResolution, + int units) + { + super(crossFeedResolution, feedResolution, units); + } + + /** + * Returns category of this class. + * + * @return the class <code>PrinterResolution</code> itself + */ + public Class getCategory() + { + return PrinterResolution.class; + } + + /** + * Returns the name of this attribute. + * + * @return the name + */ + public String getName() + { + return "printer-resolution"; + } +} diff --git a/libjava/javax/print/attribute/standard/PrinterState.java b/libjava/javax/print/attribute/standard/PrinterState.java new file mode 100644 index 0000000..3d3e7be --- /dev/null +++ b/libjava/javax/print/attribute/standard/PrinterState.java @@ -0,0 +1,84 @@ +/* PrinterState.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.print.attribute.standard; + +import javax.print.attribute.EnumSyntax; +import javax.print.attribute.PrintServiceAttribute; + + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public final class PrinterState extends EnumSyntax + implements PrintServiceAttribute +{ + private static final long serialVersionUID = -649578618346507718L; + + 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); + + /** + * Constructs a <code>PrinterState</code> object. + */ + protected PrinterState(int value) + { + super(value); + } + + /** + * Returns category of this class. + * + * @return the class <code>PrinterState</code> itself + */ + public Class getCategory() + { + return PrinterState.class; + } + + /** + * Returns the name of this attribute. + * + * @return the name + */ + public String getName() + { + return "printer-state"; + } +} diff --git a/libjava/javax/print/attribute/standard/PrinterStateReason.java b/libjava/javax/print/attribute/standard/PrinterStateReason.java new file mode 100644 index 0000000..f144f73 --- /dev/null +++ b/libjava/javax/print/attribute/standard/PrinterStateReason.java @@ -0,0 +1,140 @@ +/* PrinterStateReason.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.print.attribute.standard; + +import javax.print.attribute.Attribute; +import javax.print.attribute.EnumSyntax; + + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public class PrinterStateReason extends EnumSyntax + implements Attribute +{ + private static final long serialVersionUID = -1623720656201472593L; + + public static final PrinterStateReason OTHER = new PrinterStateReason(0); + public static final PrinterStateReason MEDIA_NEEDED = + new PrinterStateReason(1); + public static final PrinterStateReason MEDIA_JAM = new PrinterStateReason(2); + public static final PrinterStateReason MOVING_TO_PAUSED = + new PrinterStateReason(3); + public static final PrinterStateReason PAUSED = new PrinterStateReason(4); + public static final PrinterStateReason SHUTDOWN = new PrinterStateReason(5); + public static final PrinterStateReason CONNECTING_TO_DEVICE = + new PrinterStateReason(6); + public static final PrinterStateReason TIMED_OUT = new PrinterStateReason(7); + public static final PrinterStateReason STOPPING = new PrinterStateReason(8); + public static final PrinterStateReason STOPPED_PARTLY = + new PrinterStateReason(9); + public static final PrinterStateReason TONER_LOW = + new PrinterStateReason(10); + public static final PrinterStateReason TONER_EMPTY = + new PrinterStateReason(11); + public static final PrinterStateReason SPOOL_AREA_FULL = + new PrinterStateReason(12); + public static final PrinterStateReason COVER_OPEN = + new PrinterStateReason(13); + public static final PrinterStateReason INTERLOCK_OPEN = + new PrinterStateReason(14); + public static final PrinterStateReason DOOR_OPEN = + new PrinterStateReason(15); + public static final PrinterStateReason INPUT_TRAY_MISSING = + new PrinterStateReason(16); + public static final PrinterStateReason MEDIA_LOW = + new PrinterStateReason(17); + public static final PrinterStateReason MEDIA_EMPTY = + new PrinterStateReason(18); + public static final PrinterStateReason OUTPUT_TRAY_MISSING = + new PrinterStateReason(19); + public static final PrinterStateReason OUTPUT_AREA_ALMOST_FULL = + new PrinterStateReason(20); + public static final PrinterStateReason OUTPUT_AREA_FULL = + new PrinterStateReason(21); + public static final PrinterStateReason MARKER_SUPPLY_LOW = + new PrinterStateReason(22); + public static final PrinterStateReason MARKER_SUPPLY_EMPTY = + new PrinterStateReason(23); + public static final PrinterStateReason MARKER_WASTE_ALMOST_FULL = + new PrinterStateReason(24); + public static final PrinterStateReason MARKER_WASTE_FULL = + new PrinterStateReason(25); + public static final PrinterStateReason FUSER_OVER_TEMP = + new PrinterStateReason(26); + public static final PrinterStateReason FUSER_UNDER_TEMP = + new PrinterStateReason(27); + public static final PrinterStateReason OPC_NEAR_EOL = + new PrinterStateReason(28); + public static final PrinterStateReason OPC_LIFE_OVER = + new PrinterStateReason(29); + public static final PrinterStateReason DEVELOPER_LOW = + new PrinterStateReason(30); + public static final PrinterStateReason DEVELOPER_EMPTY = + new PrinterStateReason(31); + public static final PrinterStateReason INTERPRETER_RESOURCE_UNAVAILABLE = + new PrinterStateReason(32); + + /** + * Constructs a <code>PrinterStateReason</code> object. + */ + protected PrinterStateReason(int value) + { + super(value); + } + + /** + * Returns category of this class. + * + * @return the class <code>PrintStateReason</code> itself + */ + public final Class getCategory() + { + return PrinterStateReason.class; + } + + /** + * Returns name of this class. + * + * @return the string "printer-state-reason" + */ + public final String getName() + { + return "printer-state-reason"; + } +} diff --git a/libjava/javax/print/attribute/standard/PrinterStateReasons.java b/libjava/javax/print/attribute/standard/PrinterStateReasons.java new file mode 100644 index 0000000..88124b8 --- /dev/null +++ b/libjava/javax/print/attribute/standard/PrinterStateReasons.java @@ -0,0 +1,71 @@ +/* PrinterStateReasons.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.print.attribute.standard; + +import java.util.HashMap; +import javax.print.attribute.PrintServiceAttribute; + + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public final class PrinterStateReasons extends HashMap + implements PrintServiceAttribute +{ + private static final long serialVersionUID = -3731791085163619457L; + + /** + * Returns category of this class. + * + * @return the class <code>PrintStateReasons</code> itself + */ + public Class getCategory() + { + return PrinterStateReasons.class; + } + + /** + * Returns name of this class. + * + * @return the string "printer-state-reasons" + */ + public String getName() + { + return "printer-state-reasons"; + } +} diff --git a/libjava/javax/print/attribute/standard/PrinterURI.java b/libjava/javax/print/attribute/standard/PrinterURI.java new file mode 100644 index 0000000..ff55123 --- /dev/null +++ b/libjava/javax/print/attribute/standard/PrinterURI.java @@ -0,0 +1,80 @@ +/* PrinterURI.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.print.attribute.standard; + +import java.net.URI; +import javax.print.attribute.PrintServiceAttribute; +import javax.print.attribute.URISyntax; + + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public final class PrinterURI extends URISyntax + implements PrintServiceAttribute +{ + private static final long serialVersionUID = 7923912792485606497L; + + /** + * Constructs a <code>PrinterURI</code> object. + */ + public PrinterURI(URI uri) + { + super(uri); + } + + /** + * Returns category of this class. + * + * @return the class <code>PrinterURI</code> itself + */ + public Class getCategory() + { + return PrinterURI.class; + } + + /** + * Returns name of this class. + * + * @return the string "printer-uri" + */ + public String getName() + { + return "printer-uri"; + } +} diff --git a/libjava/javax/print/attribute/standard/QueuedJobCount.java b/libjava/javax/print/attribute/standard/QueuedJobCount.java index 1b03151..3a0fd87 100644 --- a/libjava/javax/print/attribute/standard/QueuedJobCount.java +++ b/libjava/javax/print/attribute/standard/QueuedJobCount.java @@ -68,7 +68,7 @@ public final class QueuedJobCount extends IntegerSyntax * * @param obj the object to test * - * @returns true if both objects are equal, false otherwise. + * @return true if both objects are equal, false otherwise. */ public boolean equals(Object obj) { @@ -83,7 +83,7 @@ public final class QueuedJobCount extends IntegerSyntax * * @return the class <code>QueuedJobCount</code> itself */ - public final Class getCategory() + public Class getCategory() { return QueuedJobCount.class; } @@ -93,7 +93,7 @@ public final class QueuedJobCount extends IntegerSyntax * * @return the string "queued-job-count" */ - public final String getName() + public String getName() { return "queued-job-count"; } diff --git a/libjava/javax/print/attribute/standard/ReferenceUriSchemesSupported.java b/libjava/javax/print/attribute/standard/ReferenceUriSchemesSupported.java new file mode 100644 index 0000000..0b10cdd --- /dev/null +++ b/libjava/javax/print/attribute/standard/ReferenceUriSchemesSupported.java @@ -0,0 +1,96 @@ +/* ReferenceUriSchemesSupported.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.print.attribute.standard; + +import javax.print.attribute.Attribute; +import javax.print.attribute.EnumSyntax; + + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public class ReferenceUriSchemesSupported extends EnumSyntax + implements Attribute +{ + private static final long serialVersionUID = -8989076942813442805L; + + public static final ReferenceUriSchemesSupported FTP = + new ReferenceUriSchemesSupported(0); + public static final ReferenceUriSchemesSupported HTTP = + new ReferenceUriSchemesSupported(1); + public static final ReferenceUriSchemesSupported HTTPS = + new ReferenceUriSchemesSupported(2); + public static final ReferenceUriSchemesSupported GOPHER = + new ReferenceUriSchemesSupported(3); + public static final ReferenceUriSchemesSupported NEWS = + new ReferenceUriSchemesSupported(4); + public static final ReferenceUriSchemesSupported NNTP = + new ReferenceUriSchemesSupported(5); + public static final ReferenceUriSchemesSupported WAIS = + new ReferenceUriSchemesSupported(6); + public static final ReferenceUriSchemesSupported FILE = + new ReferenceUriSchemesSupported(7); + + /** + * Constructs a <code>ReferenceUriSchemeSupported</code> object. + */ + protected ReferenceUriSchemesSupported(int value) + { + super(value); + } + + /** + * Returns category of this class. + * + * @return the class <code>ReferenceUriSchemesSupported</code> itself + */ + public final Class getCategory() + { + return ReferenceUriSchemesSupported.class; + } + + /** + * Returns name of this class. + * + * @return the string "reference-uri-schemes-supported" + */ + public final String getName() + { + return "reference-uri-schemes-supported"; + } +} diff --git a/libjava/javax/print/attribute/standard/RequestingUserName.java b/libjava/javax/print/attribute/standard/RequestingUserName.java index f71028b..cc0bee8 100644 --- a/libjava/javax/print/attribute/standard/RequestingUserName.java +++ b/libjava/javax/print/attribute/standard/RequestingUserName.java @@ -41,6 +41,10 @@ import java.util.Locale; import javax.print.attribute.PrintRequestAttribute; import javax.print.attribute.TextSyntax; + +/** + * @author Michael Koch (konqueror@gmx.de) + */ public final class RequestingUserName extends TextSyntax implements PrintRequestAttribute { @@ -50,6 +54,7 @@ public final class RequestingUserName extends TextSyntax * Creates a <code>RequestingUserName</code> object. * * @param userName the job name + * @param locale the locale of the user, null means default locale * * @exception NullPointerException if userName is null */ @@ -63,7 +68,7 @@ public final class RequestingUserName extends TextSyntax * * @param obj the object to test * - * @returns true if both objects are equal, false otherwise. + * @return true if both objects are equal, false otherwise. */ public boolean equals(Object obj) { @@ -74,21 +79,21 @@ public final class RequestingUserName extends TextSyntax } /** - * Returns category of this class. + * Returns category of this attribute. * * @return the class <code>RequestingUserName</code> itself */ - public final Class getCategory() + public Class getCategory() { return RequestingUserName.class; } /** - * Returns name of this class. + * Returns name of this attribute. * * @return the string "requesting-user-name" */ - public final String getName() + public String getName() { return "requesting-user-name"; } diff --git a/libjava/javax/print/attribute/standard/Severity.java b/libjava/javax/print/attribute/standard/Severity.java new file mode 100644 index 0000000..9949773 --- /dev/null +++ b/libjava/javax/print/attribute/standard/Severity.java @@ -0,0 +1,83 @@ +/* Severity.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.print.attribute.standard; + +import javax.print.attribute.Attribute; +import javax.print.attribute.EnumSyntax; + + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public final class Severity extends EnumSyntax + implements Attribute +{ + private static final long serialVersionUID = 8781881462717925380L; + + public static final Severity REPORT = new Severity(0); + public static final Severity WARNING = new Severity(1); + public static final Severity ERROR = new Severity(2); + + /** + * Constructs a <code>Severity</code> object. + */ + protected Severity(int value) + { + super(value); + } + + /** + * Returns category of this class. + * + * @return the class <code>Severity</code> itself + */ + public Class getCategory() + { + return Severity.class; + } + + /** + * Returns name of this class. + * + * @return the string "severity" + */ + public String getName() + { + return "severity"; + } +} diff --git a/libjava/javax/print/attribute/standard/SheetCollate.java b/libjava/javax/print/attribute/standard/SheetCollate.java new file mode 100644 index 0000000..1f14cdb --- /dev/null +++ b/libjava/javax/print/attribute/standard/SheetCollate.java @@ -0,0 +1,81 @@ +/* SheetCollate.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.print.attribute.standard; + +import javax.print.attribute.DocAttribute; +import javax.print.attribute.EnumSyntax; +import javax.print.attribute.PrintJobAttribute; +import javax.print.attribute.PrintRequestAttribute; + + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public final class SheetCollate extends EnumSyntax + implements DocAttribute, PrintRequestAttribute, PrintJobAttribute +{ + private static final long serialVersionUID = 7080587914259873003L; + + public static final SheetCollate UNCOLLATED = new SheetCollate(0); + public static final SheetCollate COLLATED = new SheetCollate(1); + + protected SheetCollate(int value) + { + super(value); + } + + /** + * Returns category of this class. + * + * @return the class <code>SheetCollate</code> itself + */ + public Class getCategory() + { + return SheetCollate.class; + } + + /** + * Returns name of this class. + * + * @return the string "sheet-collate" + */ + public String getName() + { + return "sheet-collate"; + } +} diff --git a/libjava/javax/print/attribute/standard/Sides.java b/libjava/javax/print/attribute/standard/Sides.java new file mode 100644 index 0000000..6543f5d --- /dev/null +++ b/libjava/javax/print/attribute/standard/Sides.java @@ -0,0 +1,89 @@ +/* Sides.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.print.attribute.standard; + +import javax.print.attribute.DocAttribute; +import javax.print.attribute.EnumSyntax; +import javax.print.attribute.PrintJobAttribute; +import javax.print.attribute.PrintRequestAttribute; + + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public final class Sides extends EnumSyntax + implements DocAttribute, PrintRequestAttribute, PrintJobAttribute +{ + private static final long serialVersionUID = -6890309414893262822L; + + public static final Sides ONE_SIDED = new Sides(0); + public static final Sides TWO_SIDED_LONG_EDGE = new Sides(1); + 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); + + /** + * Creates a <code>Sides</code> object. + * + * @param value the number of sides + */ + protected Sides(int value) + { + super(value); + } + + /** + * Returns category of this class. + * + * @return the class <code>Sides</code> itself + */ + public Class getCategory() + { + return Sides.class; + } + + /** + * Returns the name of this attribute. + * + * @return the name + */ + public String getName() + { + return "sides"; + } +} diff --git a/libjava/javax/print/event/PrintEvent.java b/libjava/javax/print/event/PrintEvent.java new file mode 100644 index 0000000..3fff4e5 --- /dev/null +++ b/libjava/javax/print/event/PrintEvent.java @@ -0,0 +1,67 @@ +/* PrintEvent.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.print.event; + +import java.util.EventObject; + + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public class PrintEvent extends EventObject +{ + /** + * Constructs a <code>PrintEvent</code> object. + * + * @param source the source of this event + */ + public PrintEvent(Object source) + { + super(source); + } + + /** + * Returns a string representation of this object. + * + * @return the string representation + */ + public String toString() + { + return "PrintEvent on " + getSource().toString(); + } +} diff --git a/libjava/javax/print/event/PrintJobAdapter.java b/libjava/javax/print/event/PrintJobAdapter.java new file mode 100644 index 0000000..603b175 --- /dev/null +++ b/libjava/javax/print/event/PrintJobAdapter.java @@ -0,0 +1,117 @@ +/* PrintJobAdapter.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.print.event; + + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public abstract class PrintJobAdapter + implements PrintJobListener +{ + /** + * Constructs a <code>PrintJobAdapter</code> object. + */ + public PrintJobAdapter() + { + // Do nothing here. + } + + /** + * Called to notify the client that all data has bin successfully transferred + * to the print service. + * + * <p>The default implementation does nothing</p> + */ + public void printDataTransferCompleted(PrintJobEvent event) + { + // Do nothing here. + } + + /** + * Called to notify the client that a print job was canceled. + * + * <p>The default implementation does nothing</p> + */ + public void printJobCanceled(PrintJobEvent event) + { + // Do nothing here. + } + + /** + * Called to notify the client that a print job was successfully completed. + * + * <p>The default implementation does nothing</p> + */ + public void printJobCompleted(PrintJobEvent event) + { + // Do nothing here. + } + + /** + * Called to notify the client that a print job failed to complete + * successfully. + * + * <p>The default implementation does nothing</p> + */ + public void printJobFailed(PrintJobEvent event) + { + // Do nothing here. + } + + /** + * Called to notify the client that no more job events will be send. + * + * <p>The default implementation does nothing</p> + */ + public void printJobNoMoreEvents(PrintJobEvent event) + { + // Do nothing here. + } + + /** + * Called to notify the client that a problem occured during printing + * but the user may be able to fix it. + * + * <p>The default implementation does nothing</p> + */ + public void printJobRequiresAttention(PrintJobEvent event) + { + // Do nothing here. + } +} diff --git a/libjava/javax/print/event/PrintJobAttributeEvent.java b/libjava/javax/print/event/PrintJobAttributeEvent.java new file mode 100644 index 0000000..246c691 --- /dev/null +++ b/libjava/javax/print/event/PrintJobAttributeEvent.java @@ -0,0 +1,85 @@ +/* PrintJobAttributeEvent.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.print.event; + +import javax.print.DocPrintJob; +import javax.print.attribute.PrintJobAttributeSet; + + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public class PrintJobAttributeEvent extends PrintEvent +{ + private static final long serialVersionUID = -6534469883874742101L; + + private PrintJobAttributeSet attributes; + + /** + * Constructs a <code>PrintJobAttributeEvent</code> object. + * + * @param source the source of this event + * @param attributes the attribute changes being reported + */ + public PrintJobAttributeEvent(DocPrintJob source, + PrintJobAttributeSet attributes) + { + super(source); + this.attributes = attributes; + } + + /** + * Returns the print job generating this event. + * + * @return the print job + */ + public DocPrintJob getPrintJob() + { + return (DocPrintJob) getSource(); + } + + /** + * Returns the attributes that changed and their new values. + * + * @return the changes attributes + */ + public PrintJobAttributeSet getAttributes() + { + return attributes; + } +} diff --git a/libjava/javax/print/event/PrintJobAttributeListener.java b/libjava/javax/print/event/PrintJobAttributeListener.java new file mode 100644 index 0000000..7dfcc5d --- /dev/null +++ b/libjava/javax/print/event/PrintJobAttributeListener.java @@ -0,0 +1,52 @@ +/* PrintJobAttributeListener.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.print.event; + + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public interface PrintJobAttributeListener +{ + /** + * Notifies the listener of an attribute change. + * + * @param event the event + */ + void attributeUpdate(PrintJobAttributeEvent event); +} diff --git a/libjava/javax/print/event/PrintJobEvent.java b/libjava/javax/print/event/PrintJobEvent.java new file mode 100644 index 0000000..467bfa0 --- /dev/null +++ b/libjava/javax/print/event/PrintJobEvent.java @@ -0,0 +1,90 @@ +/* PrintEvent.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.print.event; + +import javax.print.DocPrintJob; + + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public class PrintJobEvent extends PrintEvent +{ + private static final long serialVersionUID = -1711656903622072997L; + + public static final int DATA_TRANSFER_COMPLETE = 106; + public static final int JOB_CANCELED = 101; + public static final int JOB_COMPLETE = 102; + public static final int JOB_FAILED = 103; + public static final int NO_MORE_EVENTS = 105; + public static final int REQUIRES_ATTENTION = 104; + + private int reason; + + /** + * Constructs a <code>PrintJobEvent</code> object. + * + * @param source the source generating this event + * @param reason the reason for this event + */ + public PrintJobEvent(DocPrintJob source, int reason) + { + super(source); + this.reason = reason; + } + + /** + * Returns the reason for this event. + * + * @return the reason + */ + public int getPrintEventType() + { + return reason; + } + + /** + * Returns the print job that generated this event. + * + * @return the print job + */ + public DocPrintJob getPrintJob() + { + return (DocPrintJob) getSource(); + } +} diff --git a/libjava/javax/print/event/PrintJobListener.java b/libjava/javax/print/event/PrintJobListener.java new file mode 100644 index 0000000..1aad068 --- /dev/null +++ b/libjava/javax/print/event/PrintJobListener.java @@ -0,0 +1,87 @@ +/* PrintJobListener.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.print.event; + + +/** + * @author Michael Koch (konqueror@gmx.de) */ +public interface PrintJobListener +{ + /** + * Notifies the listener that all data has been successfully transferred + * to the print service. + * + * @param event the event + */ + void printDataTransferCompleted(PrintJobEvent event); + + /** + * Notifies the listener that a print job got canceled. + * + * @param event the event + */ + void printJobCanceled(PrintJobEvent event); + + /** + * Notifies the listener that a print job has completed. + * + * @param event the event + */ + void printJobCompleted(PrintJobEvent event); + + /** + * Notifies the listener that a print job has failed to complete. + * + * @param event the event. + */ + void printJobFailed(PrintJobEvent event); + + /** + * Notifies the listener that no more events will be delivered. + * + * @param event the event + */ + void printJobNoMoreEvents(PrintJobEvent event); + + /** + * Notifies the listener that an error occured and the user might be able to fix it. + * + * @param event the event + */ + void printJobRequiresAttention(PrintJobEvent event); +} diff --git a/libjava/javax/print/event/PrintServiceAttributeEvent.java b/libjava/javax/print/event/PrintServiceAttributeEvent.java new file mode 100644 index 0000000..a9162c8 --- /dev/null +++ b/libjava/javax/print/event/PrintServiceAttributeEvent.java @@ -0,0 +1,83 @@ +/* PrintServiceAttributeEvent.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.print.event; + +import javax.print.PrintService; +import javax.print.attribute.PrintServiceAttributeSet; + + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public class PrintServiceAttributeEvent extends PrintEvent +{ + private PrintServiceAttributeSet attributes; + + /** + * Constructs a <code>PrintServiceAttributeEvent</code> object. + * + * @param source the source of this event + * @param attributes the attribute changes being reported + */ + public PrintServiceAttributeEvent(PrintService source, + PrintServiceAttributeSet attributes) + { + super(source); + this.attributes = attributes; + } + + /** + * Returns the print service that generated this event. + * + * @return the print service + */ + public PrintService getPrintService() + { + return (PrintService) getSource(); + } + + /** + * Returns the changed attributes this event reports. + * + * @return the changed attributes + */ + public PrintServiceAttributeSet getAttributes() + { + return attributes; + } +} diff --git a/libjava/javax/print/event/PrintServiceAttributeListener.java b/libjava/javax/print/event/PrintServiceAttributeListener.java new file mode 100644 index 0000000..d066019 --- /dev/null +++ b/libjava/javax/print/event/PrintServiceAttributeListener.java @@ -0,0 +1,52 @@ +/* PrintServiceAttributeListener.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.print.event; + + +/** + * @author Michael Koch (konqueror@gmx.de) + */ +public interface PrintServiceAttributeListener +{ + /** + * Notifies the listener that some attributes have changed. + * + * @param event the event + */ + void attributeUpdate(PrintServiceAttributeEvent event); +} |