-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from TheInfiniteKind/master
Updated for Moneydance 2015
- Loading branch information
Showing
16 changed files
with
172 additions
and
193 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Empty file modified
0
src/com/moneydance/modules/features/mdcsvimporter/CustomReaderData.java
100644 → 100755
Empty file.
Empty file modified
0
src/com/moneydance/modules/features/mdcsvimporter/CustomReaderDialog.form
100644 → 100755
Empty file.
Empty file modified
0
src/com/moneydance/modules/features/mdcsvimporter/CustomReaderDialog.java
100644 → 100755
Empty file.
90 changes: 45 additions & 45 deletions
90
src/com/moneydance/modules/features/mdcsvimporter/CustomTableCellRenderer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,45 @@ | ||
package com.moneydance.modules.features.mdcsvimporter; | ||
|
||
import java.awt.Color; | ||
import java.awt.Component; | ||
import javax.swing.JLabel; | ||
import javax.swing.JTable; | ||
import javax.swing.table.DefaultTableCellRenderer; | ||
|
||
/** | ||
* | ||
* @author stan | ||
*/ | ||
|
||
|
||
public class CustomTableCellRenderer extends DefaultTableCellRenderer { | ||
|
||
int forRow = -1; | ||
int forCol = -1; | ||
|
||
public void setForRowCol( int row, int col ) | ||
{ | ||
forRow = row; | ||
forCol = col; | ||
} | ||
|
||
@Override | ||
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int col) | ||
{ | ||
JLabel lbl = (JLabel) super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, col); | ||
|
||
//Get the status for the current row. | ||
PreviewImportTblModel tableModel = (PreviewImportTblModel) table.getModel(); | ||
if ( (row == forRow || forRow < 0) && (col == forCol || forCol < 0) ) | ||
{ | ||
lbl.setBackground( Color.RED ); | ||
} | ||
else | ||
{ | ||
//lbl.setBackground( javax.swing.UIManager.getColor( "Table.dropCellBackground" ) ); | ||
lbl.setBackground( Color.WHITE ); | ||
} | ||
//Return the JLabel which renders the cell. | ||
return lbl; | ||
} | ||
} | ||
package com.moneydance.modules.features.mdcsvimporter; | ||
|
||
import java.awt.Color; | ||
import java.awt.Component; | ||
import javax.swing.JLabel; | ||
import javax.swing.JTable; | ||
import javax.swing.table.DefaultTableCellRenderer; | ||
|
||
/** | ||
* | ||
* @author stan | ||
*/ | ||
|
||
|
||
public class CustomTableCellRenderer extends DefaultTableCellRenderer { | ||
|
||
int forRow = -1; | ||
int forCol = -1; | ||
|
||
public void setForRowCol( int row, int col ) | ||
{ | ||
forRow = row; | ||
forCol = col; | ||
} | ||
|
||
@Override | ||
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int col) | ||
{ | ||
JLabel lbl = (JLabel) super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, col); | ||
|
||
//Get the status for the current row. | ||
PreviewImportTblModel tableModel = (PreviewImportTblModel) table.getModel(); | ||
if ( (row == forRow || forRow < 0) && (col == forCol || forCol < 0) ) | ||
{ | ||
lbl.setBackground( Color.RED ); | ||
} | ||
else | ||
{ | ||
//lbl.setBackground( javax.swing.UIManager.getColor( "Table.dropCellBackground" ) ); | ||
lbl.setBackground( Color.WHITE ); | ||
} | ||
//Return the JLabel which renders the cell. | ||
return lbl; | ||
} | ||
} |
Empty file modified
0
src/com/moneydance/modules/features/mdcsvimporter/DataField.java
100644 → 100755
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
106 changes: 53 additions & 53 deletions
106
src/com/moneydance/modules/features/mdcsvimporter/PreviewImportTblModel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,53 @@ | ||
package com.moneydance.modules.features.mdcsvimporter; | ||
|
||
import java.util.ArrayList; | ||
import javax.swing.table.AbstractTableModel; | ||
|
||
/** | ||
* | ||
* @author stan | ||
*/ | ||
|
||
|
||
public class PreviewImportTblModel extends AbstractTableModel | ||
{ | ||
private ArrayList<String>colNames; | ||
private String[][] data; | ||
|
||
public PreviewImportTblModel( ArrayList<String> colNamesArg, String[][] dataArg ) | ||
{ | ||
colNames = colNamesArg; | ||
data = dataArg; | ||
|
||
System.err.println( "row count =" + data.length ); | ||
System.err.println( "col count =" + data[0].length ); | ||
} | ||
|
||
public int getColumnCount() { return data[0].length; } | ||
public int getRowCount() { return data.length;} | ||
public Object getValueAt(int row, int col) | ||
{ | ||
//System.err.println( "getValueAt row =" + row + " col =" + col ); | ||
try { | ||
if ( data[row][col] == "" ) | ||
{ | ||
//System.err.println( "NOT EXISTS getValueAt row =" + row + " col =" + col ); | ||
} | ||
} | ||
catch( Exception ex ) | ||
{ | ||
return ""; | ||
} | ||
return data[row][col]; | ||
} | ||
|
||
public String getColumnName(int col) { | ||
return colNames.get( col ); | ||
} | ||
|
||
/* | ||
public int getColumnCount() { return 10; } | ||
public int getRowCount() { return 10;} | ||
public Object getValueAt(int row, int col) { return new Integer(row*col); } | ||
*/ | ||
} | ||
package com.moneydance.modules.features.mdcsvimporter; | ||
|
||
import java.util.ArrayList; | ||
import javax.swing.table.AbstractTableModel; | ||
|
||
/** | ||
* | ||
* @author stan | ||
*/ | ||
|
||
|
||
public class PreviewImportTblModel extends AbstractTableModel | ||
{ | ||
private ArrayList<String>colNames; | ||
private String[][] data; | ||
|
||
public PreviewImportTblModel( ArrayList<String> colNamesArg, String[][] dataArg ) | ||
{ | ||
colNames = colNamesArg; | ||
data = dataArg; | ||
|
||
System.err.println( "row count =" + data.length ); | ||
System.err.println( "col count =" + data[0].length ); | ||
} | ||
|
||
public int getColumnCount() { return data[0].length; } | ||
public int getRowCount() { return data.length;} | ||
public Object getValueAt(int row, int col) | ||
{ | ||
//System.err.println( "getValueAt row =" + row + " col =" + col ); | ||
try { | ||
if ( data[row][col] == "" ) | ||
{ | ||
//System.err.println( "NOT EXISTS getValueAt row =" + row + " col =" + col ); | ||
} | ||
} | ||
catch( Exception ex ) | ||
{ | ||
return ""; | ||
} | ||
return data[row][col]; | ||
} | ||
|
||
public String getColumnName(int col) { | ||
return colNames.get( col ); | ||
} | ||
|
||
/* | ||
public int getColumnCount() { return 10; } | ||
public int getRowCount() { return 10;} | ||
public Object getValueAt(int row, int col) { return new Integer(row*col); } | ||
*/ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.