diff --git a/README.md b/README.md index 390f4a21..a44ebef1 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Building the extension from scratch ----------------------------------- ### Requirements -* Java Development Kit, version 1.6 +* Java SE Development Kit, version 6 * Apache Ant™, tested with version 1.8.2 * Moneydance®, tested with version 2010r3 diff --git a/src/com/moneydance/modules/features/importlist/View.java b/src/com/moneydance/modules/features/importlist/View.java index 7fa39596..c6a1fc25 100644 --- a/src/com/moneydance/modules/features/importlist/View.java +++ b/src/com/moneydance/modules/features/importlist/View.java @@ -3,6 +3,7 @@ import java.awt.Color; import java.awt.Dimension; import java.io.File; +import java.text.DateFormat; import java.util.Date; import javax.swing.JComponent; @@ -90,17 +91,19 @@ public final String getID() { public final void refresh() { - this.jScrollPane.invalidate(); - Preferences preferences = this.main.getPreferences(); + Color backgroundColor = preferences.getBackgroundColor(); + this.jScrollPane.setBackground(backgroundColor); + File[] files = this.main.getFiles(); if (files == null || files.length == 0) { String label = "There are currently no files to import in " + this.main.getImportDir(); JComponent jTextPanel = new JTextPanel(label); - jTextPanel.setBackground(preferences.getBackgroundColor()); + jTextPanel.setBackground(backgroundColor); this.jScrollPane.setViewportView(jTextPanel); + this.jScrollPane.getViewport().setBackground(backgroundColor); this.jScrollPane.setPreferredSize( new Dimension(Constants.MESSAGE_WIDTH, Constants.MESSAGE_HEIGHT)); return; @@ -117,13 +120,16 @@ public final void refresh() { this.jTable.getColumn(Constants.DESCRIPTOR_MODIFIED).setCellRenderer( defaultTableCellRenderer); + DateFormat dateFormatter = preferences.getDateFormatter(); + DateFormat timeFormatter = preferences.getTimeFormatter(); + this.defaultTableModel.setRowCount(0); for (File file : files) { - Date date = new Date(file.lastModified()); - String dateString = preferences.getDateFormatter().format(date) - + " " - + preferences.getTimeFormatter().format(date); + Date date = new Date(file.lastModified()); + String dateString = dateFormatter.format(date) + + " " + + timeFormatter.format(date); this.defaultTableModel.addRow( new Object[] { @@ -136,15 +142,11 @@ public final void refresh() { } this.jScrollPane.setViewportView(this.jTable); - this.jScrollPane.validate(); + this.jScrollPane.getViewport().setBackground(backgroundColor); } public final JComponent getGUIView(final RootAccount rootAccount) { - Preferences preferences = this.main.getPreferences(); - Color backgroundColor = preferences.getBackgroundColor(); - this.jScrollPane.setBackground(backgroundColor); - this.jScrollPane.getViewport().setBackground(backgroundColor); return this.jScrollPane; } diff --git a/src/com/moneydance/modules/features/importlist/meta_info.dict b/src/com/moneydance/modules/features/importlist/meta_info.dict index ea0a76ed..327df1a5 100644 --- a/src/com/moneydance/modules/features/importlist/meta_info.dict +++ b/src/com/moneydance/modules/features/importlist/meta_info.dict @@ -3,5 +3,5 @@ "module_build" = "2" "vendor.url" = "https://github.com/my-flow/importlist" "module_name" = "Import List" - "desc" = "Import List monitors a directory and displays its transaction files in Moneydance's homepage view. From there, the files can be imported into Moneydance." + "desc" = "Import List monitors a directory and displays its transaction files in Moneydance's homepage view. From there, the files can be imported into Moneydance. This plugin requires Java 6 to function, see the Moneydance About window to determine what version of Java you are using." }