[Patch] java.awt.print.PrinterJob

Michael Koch konqueror@gmx.de
Tue Apr 19 04:44:00 GMT 2005


Hi list,


I just merged the attached patch from GNU classpath to HEAD to
implement two more methods in java.awt.print.PrinterJob.


Michael


2005-04-19  Michael Koch  <konqueror@gmx.de>

	* java/awt/print/PrinterJob.java
	(pageDialog): New method.
	(printDialog): Implemented.

-------------- next part --------------
Index: java/awt/print/PrinterJob.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/print/PrinterJob.java,v
retrieving revision 1.5
diff -u -r1.5 PrinterJob.java
--- java/awt/print/PrinterJob.java	16 Feb 2005 20:02:13 -0000	1.5
+++ java/awt/print/PrinterJob.java	19 Apr 2005 04:42:15 -0000
@@ -152,6 +152,16 @@
     throws HeadlessException;
 
   /**
+   * @since 1.4
+   */
+  public PageFormat pageDialog(PrintRequestAttributeSet attributes)
+    throws HeadlessException
+  {
+    // FIXME: Implement this for real.
+    return pageDialog((PageFormat) null);
+  }
+  
+  /**
    * Prints the pages.
    */
   public abstract void print () throws PrinterException;
@@ -179,8 +189,12 @@
    * @return <code>false</code> if the user cancels the dialog box,
    * <code>true</code> otherwise.
    */
-  public abstract boolean printDialog(PrintRequestAttributeSet attributes)
-    throws HeadlessException;
+  public boolean printDialog(PrintRequestAttributeSet attributes)
+    throws HeadlessException
+  {
+    // FIXME: Implement this for real.
+    return printDialog();
+  }
 
   /**
    * This sets the pages that are to be printed.


More information about the Java-patches mailing list