summaryrefslogtreecommitdiffstats
path: root/libjava/classpath/javax/print/event
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/classpath/javax/print/event')
-rw-r--r--libjava/classpath/javax/print/event/PrintEvent.java6
-rw-r--r--libjava/classpath/javax/print/event/PrintJobAdapter.java34
-rw-r--r--libjava/classpath/javax/print/event/PrintJobAttributeEvent.java10
-rw-r--r--libjava/classpath/javax/print/event/PrintJobAttributeListener.java6
-rw-r--r--libjava/classpath/javax/print/event/PrintJobEvent.java27
-rw-r--r--libjava/classpath/javax/print/event/PrintJobListener.java15
-rw-r--r--libjava/classpath/javax/print/event/PrintServiceAttributeEvent.java10
-rw-r--r--libjava/classpath/javax/print/event/PrintServiceAttributeListener.java6
-rw-r--r--libjava/classpath/javax/print/event/package.html8
9 files changed, 91 insertions, 31 deletions
diff --git a/libjava/classpath/javax/print/event/PrintEvent.java b/libjava/classpath/javax/print/event/PrintEvent.java
index cbf93852cc5..d44c2066818 100644
--- a/libjava/classpath/javax/print/event/PrintEvent.java
+++ b/libjava/classpath/javax/print/event/PrintEvent.java
@@ -1,5 +1,5 @@
/* PrintEvent.java --
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -41,6 +41,8 @@ import java.util.EventObject;
/**
+ * Superclass of all events in the Java Print Service API.
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public class PrintEvent extends EventObject
@@ -58,7 +60,7 @@ public class PrintEvent extends EventObject
/**
* Returns a string representation of this object.
*
- * @return the string representation
+ * @return The string representation
*/
public String toString()
{
diff --git a/libjava/classpath/javax/print/event/PrintJobAdapter.java b/libjava/classpath/javax/print/event/PrintJobAdapter.java
index 3615108f93a..9229d195fe4 100644
--- a/libjava/classpath/javax/print/event/PrintJobAdapter.java
+++ b/libjava/classpath/javax/print/event/PrintJobAdapter.java
@@ -1,5 +1,5 @@
/* PrintJobAdapter.java --
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -39,6 +39,11 @@ package javax.print.event;
/**
+ * Adapter class for implementing {@link javax.print.event.PrintJobListener}
+ * classes. The methods in this class do nothing by default. Subclasses may
+ * only implement the methods for the {@link javax.print.event.PrintJobEvent}s
+ * they are interested in.
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public abstract class PrintJobAdapter
@@ -53,10 +58,11 @@ public abstract class PrintJobAdapter
}
/**
- * Called to notify the client that all data has bin successfully transferred
+ * Called to notify the client that all data has been successfully transferred
* to the print service.
+ * <p>The default implementation does nothing.</p>
*
- * <p>The default implementation does nothing</p>
+ * @param event the event.
*/
public void printDataTransferCompleted(PrintJobEvent event)
{
@@ -64,9 +70,10 @@ public abstract class PrintJobAdapter
}
/**
- * Called to notify the client that a print job was canceled.
+ * Called to notify the client that a print job was canceled.
+ * <p>The default implementation does nothing.</p>
*
- * <p>The default implementation does nothing</p>
+ * @param event the event.
*/
public void printJobCanceled(PrintJobEvent event)
{
@@ -75,8 +82,9 @@ public abstract class PrintJobAdapter
/**
* Called to notify the client that a print job was successfully completed.
+ * <p>The default implementation does nothing.</p>
*
- * <p>The default implementation does nothing</p>
+ * @param event the event.
*/
public void printJobCompleted(PrintJobEvent event)
{
@@ -86,8 +94,9 @@ public abstract class PrintJobAdapter
/**
* Called to notify the client that a print job failed to complete
* successfully.
+ * <p>The default implementation does nothing.</p>
*
- * <p>The default implementation does nothing</p>
+ * @param event the event.
*/
public void printJobFailed(PrintJobEvent event)
{
@@ -96,8 +105,9 @@ public abstract class PrintJobAdapter
/**
* Called to notify the client that no more job events will be send.
+ * <p>The default implementation does nothing.</p>
*
- * <p>The default implementation does nothing</p>
+ * @param event the event.
*/
public void printJobNoMoreEvents(PrintJobEvent event)
{
@@ -105,10 +115,12 @@ public abstract class PrintJobAdapter
}
/**
- * Called to notify the client that a problem occured during printing
- * but the user may be able to fix it.
+ * Called to notify the client that a problem occured during printing.
+ * This event signals problems a user might be able to fix
+ * (e.g. out of paper or paper jam).
+ * <p>The default implementation does nothing.</p>
*
- * <p>The default implementation does nothing</p>
+ * @param event the event.
*/
public void printJobRequiresAttention(PrintJobEvent event)
{
diff --git a/libjava/classpath/javax/print/event/PrintJobAttributeEvent.java b/libjava/classpath/javax/print/event/PrintJobAttributeEvent.java
index 0914aea9f4b..d401ab15152 100644
--- a/libjava/classpath/javax/print/event/PrintJobAttributeEvent.java
+++ b/libjava/classpath/javax/print/event/PrintJobAttributeEvent.java
@@ -1,5 +1,5 @@
/* PrintJobAttributeEvent.java --
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -42,6 +42,10 @@ import javax.print.attribute.PrintJobAttributeSet;
/**
+ * <code>PrintJobAttributeEvent</code>s are generated by a
+ * <code>PrintService</code> to inform registered listeners that attributes
+ * associated with a {@link javax.print.DocPrintJob} instance have changed.
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public class PrintJobAttributeEvent extends PrintEvent
@@ -66,7 +70,7 @@ public class PrintJobAttributeEvent extends PrintEvent
/**
* Returns the print job generating this event.
*
- * @return the print job
+ * @return The print job.
*/
public DocPrintJob getPrintJob()
{
@@ -76,7 +80,7 @@ public class PrintJobAttributeEvent extends PrintEvent
/**
* Returns the attributes that changed and their new values.
*
- * @return the changes attributes
+ * @return The changed attributes.
*/
public PrintJobAttributeSet getAttributes()
{
diff --git a/libjava/classpath/javax/print/event/PrintJobAttributeListener.java b/libjava/classpath/javax/print/event/PrintJobAttributeListener.java
index ee816d22a1c..9f96d267e9c 100644
--- a/libjava/classpath/javax/print/event/PrintJobAttributeListener.java
+++ b/libjava/classpath/javax/print/event/PrintJobAttributeListener.java
@@ -1,5 +1,5 @@
/* PrintJobAttributeListener.java --
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -39,6 +39,10 @@ package javax.print.event;
/**
+ * Listener interface to receive attribute changes from a print job.
+ * Implementations of this interface can be registered with a
+ * {@link javax.print.DocPrintJob} instance.
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public interface PrintJobAttributeListener
diff --git a/libjava/classpath/javax/print/event/PrintJobEvent.java b/libjava/classpath/javax/print/event/PrintJobEvent.java
index c4b7cd6f942..cc15f97535b 100644
--- a/libjava/classpath/javax/print/event/PrintJobEvent.java
+++ b/libjava/classpath/javax/print/event/PrintJobEvent.java
@@ -1,5 +1,5 @@
/* PrintEvent.java --
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -41,19 +41,38 @@ import javax.print.DocPrintJob;
/**
+ * <code>PrintJobEvent</code>s are generated by a print job during
+ * print job processing to inform registered listeners about the state
+ * of processing.
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public class PrintJobEvent extends PrintEvent
{
private static final long serialVersionUID = -1711656903622072997L;
-
+
+ /** Indicates that the data transfer to the print service has completed. */
public static final int DATA_TRANSFER_COMPLETE = 106;
+
+ /** Indicates that the print job was canceled. */
public static final int JOB_CANCELED = 101;
+
+ /** Indicates that the print job was completed (=printed). */
public static final int JOB_COMPLETE = 102;
+
+ /** Indicates that the print job failed to complete. */
public static final int JOB_FAILED = 103;
+
+ /** Indicates that no more job events will be send.*/
public static final int NO_MORE_EVENTS = 105;
+
+ /**
+ * Indicates a situation where human intervention might be needed.
+ * E.g. the printer run out of paper or a paper jam occured.
+ */
public static final int REQUIRES_ATTENTION = 104;
+ /** The reason (one of the defined constants). */
private int reason;
/**
@@ -71,7 +90,7 @@ public class PrintJobEvent extends PrintEvent
/**
* Returns the reason for this event.
*
- * @return the reason
+ * @return The reason.
*/
public int getPrintEventType()
{
@@ -81,7 +100,7 @@ public class PrintJobEvent extends PrintEvent
/**
* Returns the print job that generated this event.
*
- * @return the print job
+ * @return The print job.
*/
public DocPrintJob getPrintJob()
{
diff --git a/libjava/classpath/javax/print/event/PrintJobListener.java b/libjava/classpath/javax/print/event/PrintJobListener.java
index d1dcf42be71..96c6d411d54 100644
--- a/libjava/classpath/javax/print/event/PrintJobListener.java
+++ b/libjava/classpath/javax/print/event/PrintJobListener.java
@@ -1,5 +1,5 @@
/* PrintJobListener.java --
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -39,7 +39,14 @@ package javax.print.event;
/**
- * @author Michael Koch (konqueror@gmx.de) */
+ * Listener interface to receive processing events from a print job.
+ * Implementations of this interface can be registered with a
+ * {@link javax.print.DocPrintJob} instance.
+ *
+ * @see javax.print.event.PrintJobAdapter
+ *
+ * @author Michael Koch (konqueror@gmx.de)
+ */
public interface PrintJobListener
{
/**
@@ -79,7 +86,9 @@ public interface PrintJobListener
void printJobNoMoreEvents(PrintJobEvent event);
/**
- * Notifies the listener that an error occured and the user might be able to fix it.
+ * Notifies the listener that a problem occured during printing.
+ * This event signals problems a user might be able to fix
+ * (e.g. out of paper or paper jam).
*
* @param event the event
*/
diff --git a/libjava/classpath/javax/print/event/PrintServiceAttributeEvent.java b/libjava/classpath/javax/print/event/PrintServiceAttributeEvent.java
index d3981747fa8..a41e213ff7b 100644
--- a/libjava/classpath/javax/print/event/PrintServiceAttributeEvent.java
+++ b/libjava/classpath/javax/print/event/PrintServiceAttributeEvent.java
@@ -1,5 +1,5 @@
/* PrintServiceAttributeEvent.java --
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -42,6 +42,10 @@ import javax.print.attribute.PrintServiceAttributeSet;
/**
+ * <code>PrintServiceAttributeEvent</code>s are generated by a
+ * <code>PrintService</code> to inform registered listeners that
+ * its associated attributes have changed.
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public class PrintServiceAttributeEvent extends PrintEvent
@@ -64,7 +68,7 @@ public class PrintServiceAttributeEvent extends PrintEvent
/**
* Returns the print service that generated this event.
*
- * @return the print service
+ * @return The print service.
*/
public PrintService getPrintService()
{
@@ -74,7 +78,7 @@ public class PrintServiceAttributeEvent extends PrintEvent
/**
* Returns the changed attributes this event reports.
*
- * @return the changed attributes
+ * @return The changed attributes.
*/
public PrintServiceAttributeSet getAttributes()
{
diff --git a/libjava/classpath/javax/print/event/PrintServiceAttributeListener.java b/libjava/classpath/javax/print/event/PrintServiceAttributeListener.java
index e43d9ad65ee..b46bf3b69d7 100644
--- a/libjava/classpath/javax/print/event/PrintServiceAttributeListener.java
+++ b/libjava/classpath/javax/print/event/PrintServiceAttributeListener.java
@@ -1,5 +1,5 @@
/* PrintServiceAttributeListener.java --
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -39,6 +39,10 @@ package javax.print.event;
/**
+ * Listener interface to receive attribute changes from a print service.
+ * Implementations of this interface can be registered with a
+ * {@link javax.print.PrintService} instance.
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public interface PrintServiceAttributeListener
diff --git a/libjava/classpath/javax/print/event/package.html b/libjava/classpath/javax/print/event/package.html
index 52a298a68da..f811013d10d 100644
--- a/libjava/classpath/javax/print/event/package.html
+++ b/libjava/classpath/javax/print/event/package.html
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!-- package.html - describes classes in javax.print.event package.
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -40,7 +40,9 @@ exception statement from your version. -->
<head><title>GNU Classpath - javax.print.event</title></head>
<body>
-<p></p>
-
+<p>Provides events and listeners to be used with the Java Print Service API.</p>
+<p>
+<b>Since:</b> 1.4
+</p>
</body>
</html>
OpenPOWER on IntegriCloud