diff --git a/build/built-jar.properties b/build/built-jar.properties index 4e7e022..40ff0fc 100644 --- a/build/built-jar.properties +++ b/build/built-jar.properties @@ -1,4 +1,4 @@ -#Sun, 24 Aug 2014 22:06:09 -0400 +#Mon, 25 Aug 2014 00:47:39 -0400 -C\:\\Users\\Paul\\Documents\\NetBeansProjects\\PDFMerge= +C\:\\Users\\Paul\\Documents\\GitHub\\PDFMerge= diff --git a/build/classes/.netbeans_automatic_build b/build/classes/.netbeans_automatic_build deleted file mode 100644 index e69de29..0000000 diff --git a/build/classes/.netbeans_update_resources b/build/classes/.netbeans_update_resources deleted file mode 100644 index e69de29..0000000 diff --git a/build/classes/pdfmerge/MainFrame$1.class b/build/classes/pdfmerge/MainFrame$1.class index 0054768..a86a75d 100644 Binary files a/build/classes/pdfmerge/MainFrame$1.class and b/build/classes/pdfmerge/MainFrame$1.class differ diff --git a/build/classes/pdfmerge/MainFrame$2.class b/build/classes/pdfmerge/MainFrame$2.class index f2f634f..ea70413 100644 Binary files a/build/classes/pdfmerge/MainFrame$2.class and b/build/classes/pdfmerge/MainFrame$2.class differ diff --git a/build/classes/pdfmerge/MainFrame$3.class b/build/classes/pdfmerge/MainFrame$3.class index f9a1755..55f8c9e 100644 Binary files a/build/classes/pdfmerge/MainFrame$3.class and b/build/classes/pdfmerge/MainFrame$3.class differ diff --git a/build/classes/pdfmerge/MainFrame$4.class b/build/classes/pdfmerge/MainFrame$4.class index fc7918c..52fce6f 100644 Binary files a/build/classes/pdfmerge/MainFrame$4.class and b/build/classes/pdfmerge/MainFrame$4.class differ diff --git a/build/classes/pdfmerge/MainFrame$5.class b/build/classes/pdfmerge/MainFrame$5.class index 347f1c0..5fd03c6 100644 Binary files a/build/classes/pdfmerge/MainFrame$5.class and b/build/classes/pdfmerge/MainFrame$5.class differ diff --git a/build/classes/pdfmerge/MainFrame$6.class b/build/classes/pdfmerge/MainFrame$6.class index 5dfba8d..73f6779 100644 Binary files a/build/classes/pdfmerge/MainFrame$6.class and b/build/classes/pdfmerge/MainFrame$6.class differ diff --git a/build/classes/pdfmerge/MainFrame.class b/build/classes/pdfmerge/MainFrame.class index d0271de..fb1578f 100644 Binary files a/build/classes/pdfmerge/MainFrame.class and b/build/classes/pdfmerge/MainFrame.class differ diff --git a/build/classes/pdfmerge/MainFrame.form b/build/classes/pdfmerge/MainFrame.form deleted file mode 100644 index ab71c1c..0000000 --- a/build/classes/pdfmerge/MainFrame.form +++ /dev/null @@ -1,197 +0,0 @@ - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/dist/PDFMerge.jar b/dist/PDFMerge.jar index 9903c96..513371a 100644 Binary files a/dist/PDFMerge.jar and b/dist/PDFMerge.jar differ diff --git a/dist/README.TXT b/dist/README.TXT index 9190a6c..9dfa718 100644 --- a/dist/README.TXT +++ b/dist/README.TXT @@ -1 +1,32 @@ -This is a basic PDF Merging software with GUI. Double click to go! \ No newline at end of file +======================== +BUILD OUTPUT DESCRIPTION +======================== + +When you build an Java application project that has a main class, the IDE +automatically copies all of the JAR +files on the projects classpath to your projects dist/lib folder. The IDE +also adds each of the JAR files to the Class-Path element in the application +JAR files manifest file (MANIFEST.MF). + +To run the project from the command line, go to the dist folder and +type the following: + +java -jar "PDFMerge.jar" + +To distribute this project, zip up the dist folder (including the lib folder) +and distribute the ZIP file. + +Notes: + +* If two JAR files on the project classpath have the same name, only the first +JAR file is copied to the lib folder. +* Only JAR files are copied to the lib folder. +If the classpath contains other types of files or folders, these files (folders) +are not copied. +* If a library on the projects classpath also has a Class-Path element +specified in the manifest,the content of the Class-Path element has to be on +the projects runtime path. +* To set a main class in a standard Java project, right-click the project node +in the Projects window and choose Properties. Then click Run and enter the +class name in the Main Class field. Alternatively, you can manually type the +class name in the manifest Main-Class element. diff --git a/src/pdfmerge/MainFrame.form b/src/pdfmerge/MainFrame.form index ab71c1c..288c0fa 100644 --- a/src/pdfmerge/MainFrame.form +++ b/src/pdfmerge/MainFrame.form @@ -192,6 +192,9 @@ + + + diff --git a/src/pdfmerge/MainFrame.java b/src/pdfmerge/MainFrame.java index c8ac20c..40a782f 100644 --- a/src/pdfmerge/MainFrame.java +++ b/src/pdfmerge/MainFrame.java @@ -6,19 +6,12 @@ package pdfmerge; import java.awt.Desktop; -import java.awt.datatransfer.DataFlavor; -import java.awt.datatransfer.Transferable; -import java.io.*; import java.io.File; import java.io.IOException; -import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; import javax.swing.DefaultListModel; -import javax.swing.JComponent; import javax.swing.JFileChooser; -import javax.swing.JList; -import javax.swing.TransferHandler; import javax.swing.filechooser.FileNameExtensionFilter; import org.apache.pdfbox.exceptions.COSVisitorException; import org.apache.pdfbox.util.PDFMergerUtility; @@ -118,6 +111,11 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { bMoveDown.setText("Move Down"); bMoveDown.setEnabled(false); + bMoveDown.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + bMoveDownActionPerformed(evt); + } + }); menu_Close.setText("File"); @@ -203,13 +201,13 @@ private void bMergeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST: } fc.setSelectedFile(new File("MyMerge.pdf")); - boolean bMerge = false; + boolean isMerged = false; if (fc.showSaveDialog(this) == JFileChooser.APPROVE_OPTION) { File fOut = fc.getSelectedFile(); if (fOut.getName().endsWith(".pdf")) { - bMerge = mergePDFs(fOut.getPath()); + isMerged = mergePDFs(fOut.getPath()); } else { - bMerge = mergePDFs(fOut.getPath() + ".pdf"); + isMerged = mergePDFs(fOut.getPath() + ".pdf"); } lStatus.setText("Done!"); try { @@ -257,10 +255,10 @@ private void bRemovePdfActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FI private void bMoveUpActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bMoveUpActionPerformed // TODO add your handling code here: - if(pdfList.getSelectedIndex() >= 0) - { - - } + int nIndex = pdfList.getSelectedIndex(); + pdfModel.add(nIndex-1, pdfModel.get(nIndex)); + pdfModel.remove(nIndex+1); + pdfList.setSelectedIndex(nIndex-1); }//GEN-LAST:event_bMoveUpActionPerformed private void pdfListValueChanged(javax.swing.event.ListSelectionEvent evt) {//GEN-FIRST:event_pdfListValueChanged @@ -284,6 +282,14 @@ private void pdfListValueChanged(javax.swing.event.ListSelectionEvent evt) {//GE bRemovePdf.setEnabled(false); }//GEN-LAST:event_pdfListValueChanged + private void bMoveDownActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bMoveDownActionPerformed + // TODO add your handling code here: + int nIndex = pdfList.getSelectedIndex(); + pdfModel.add(nIndex+2, pdfModel.get(nIndex)); + pdfModel.remove(nIndex); + pdfList.setSelectedIndex(nIndex+1); + }//GEN-LAST:event_bMoveDownActionPerformed + /** * @param args the command line arguments */