Skip to content

Commit

Permalink
appended note on Java 6 requirement to meta information
Browse files Browse the repository at this point in the history
  • Loading branch information
my-flow committed Mar 30, 2011
1 parent 32ef3e3 commit 0bcc4d9
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -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

Expand Down
26 changes: 14 additions & 12 deletions src/com/moneydance/modules/features/importlist/View.java
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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[] {
Expand All @@ -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;
}

Expand Down
Expand Up @@ -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."
}

0 comments on commit 0bcc4d9

Please sign in to comment.