pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From le...@apache.org
Subject svn commit: r1601693 - /pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFReader.java
Date Tue, 10 Jun 2014 17:23:59 GMT
Author: lehmi
Date: Tue Jun 10 17:23:58 2014
New Revision: 1601693

URL: http://svn.apache.org/r1601693
Log:
PDFBOX-2129: added the PDFBox version to the title.

Modified:
    pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFReader.java

Modified: pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFReader.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFReader.java?rev=1601693&r1=1601692&r2=1601693&view=diff
==============================================================================
--- pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFReader.java (original)
+++ pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFReader.java Tue Jun 10 17:23:58
2014
@@ -73,6 +73,8 @@ public class PDFReader extends JFrame
     private static final String NONSEQ = "-nonSeq";
     private static boolean useNonSeqParser = false;
 
+    private static final String VERSION = Version.getVersion();
+    private static final String BASETITLE = "PDFBox " + VERSION; 
     /**
      * Constructor.
      */
@@ -94,7 +96,7 @@ public class PDFReader extends JFrame
         nextPageItem = new JMenuItem();
         previousPageItem = new JMenuItem();
 
-        setTitle("PDFBox - PDF Reader");
+        setTitle(BASETITLE);
         addWindowListener(new java.awt.event.WindowAdapter()
         {
             @Override
@@ -213,7 +215,7 @@ public class PDFReader extends JFrame
 
     private void updateTitle()
     {
-        setTitle("PDFBox - " + currentFilename + " (" + (currentPage + 1) + "/" + numberOfPages
+ ")");
+        setTitle(BASETITLE + ": " + currentFilename + " (" + (currentPage + 1) + "/" + numberOfPages
+ ")");
     }
 
     private void nextPage()
@@ -407,7 +409,7 @@ public class PDFReader extends JFrame
 
     private static void usage()
     {
-        System.err.println("usage: java -jar pdfbox-app-x.y.z.jar PDFReader [OPTIONS] <input-file>\n"
+        System.err.println("usage: java -jar pdfbox-app-" + VERSION + ".jar PDFReader [OPTIONS]
<input-file>\n"
                 + "  -password <password>      Password to decrypt the document\n"
                 + "  -nonSeq                   Enables the new non-sequential parser\n"
                 + "  <input-file>              The PDF document to be loaded\n");



Mime
View raw message