pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1829460 - /pdfbox/trunk/debugger/src/main/java/org/apache/pdfbox/debugger/PDFDebugger.java
Date Wed, 18 Apr 2018 17:24:43 GMT
Author: tilman
Date: Wed Apr 18 17:24:43 2018
New Revision: 1829460

URL: http://svn.apache.org/viewvc?rev=1829460&view=rev
Log:
PDFBOX-2941: show wait cursor when printing

Modified:
    pdfbox/trunk/debugger/src/main/java/org/apache/pdfbox/debugger/PDFDebugger.java

Modified: pdfbox/trunk/debugger/src/main/java/org/apache/pdfbox/debugger/PDFDebugger.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/debugger/src/main/java/org/apache/pdfbox/debugger/PDFDebugger.java?rev=1829460&r1=1829459&r2=1829460&view=diff
==============================================================================
--- pdfbox/trunk/debugger/src/main/java/org/apache/pdfbox/debugger/PDFDebugger.java (original)
+++ pdfbox/trunk/debugger/src/main/java/org/apache/pdfbox/debugger/PDFDebugger.java Wed Apr
18 17:24:43 2018
@@ -18,6 +18,7 @@ package org.apache.pdfbox.debugger;
 
 import java.awt.BorderLayout;
 import java.awt.Component;
+import java.awt.Cursor;
 import java.awt.Dimension;
 import java.awt.FileDialog;
 import java.awt.Toolkit;
@@ -1224,7 +1225,15 @@ public class PDFDebugger extends JFrame
             }
             if (job.printDialog(pras))
             {
-                job.print(pras);
+                setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
+                try
+                {
+                    job.print(pras);
+                }
+                finally
+                {
+                    setCursor(Cursor.getDefaultCursor());
+                }
             }
         }
         catch (PrinterException e)



Mime
View raw message