pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From le...@apache.org
Subject svn commit: r1601698 - /pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/PDFReader.java
Date Tue, 10 Jun 2014 17:31:16 GMT
Author: lehmi
Date: Tue Jun 10 17:31:15 2014
New Revision: 1601698

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

Modified:
    pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/PDFReader.java

Modified: pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/PDFReader.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/PDFReader.java?rev=1601698&r1=1601697&r2=1601698&view=diff
==============================================================================
--- pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/PDFReader.java (original)
+++ pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/PDFReader.java Tue Jun 10 17:31:15
2014
@@ -42,7 +42,7 @@ import java.util.List;
  * funtionality.
  *
  * @author <a href="ben@benlitchfield.com">Ben Litchfield</a>
- * @version $Revision: 1.5 $
+ * 
  */
 public class PDFReader extends javax.swing.JFrame
 {
@@ -70,6 +70,9 @@ public class PDFReader extends javax.swi
     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.
      */
@@ -97,7 +100,7 @@ public class PDFReader extends javax.swi
         previousPageItem = new javax.swing.JMenuItem();
 
 
-        setTitle("PDFBox - PDF Reader");
+        setTitle(BASETITLE);
         addWindowListener(new java.awt.event.WindowAdapter()
         {
             @Override
@@ -215,7 +218,7 @@ public class PDFReader extends javax.swi
 
     private void updateTitle() 
     {
-        setTitle( "PDFBox - " + currentFilename + " ("+(currentPage+1)+"/"+numberOfPages+")");
+        setTitle(BASETITLE + ": " + currentFilename + " (" + (currentPage + 1) + "/" + numberOfPages
+ ")");
     }
     
     private void nextPage()
@@ -422,8 +425,7 @@ public class PDFReader extends javax.swi
      */
     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