X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=ao-tools%2Faltosui%2FAltosCSVUI.java;h=4eb72de820f9f6bd0af3a94fc75c0fcb4fc1ae90;hp=2d81236162c1b6d370a3ca6f9c82eceb773852e8;hb=e2b9f47a205348d38756c70e928a2a9183de6884;hpb=ddc83b4c401be965a9947782becf20cc8c54e6a2 diff --git a/ao-tools/altosui/AltosCSVUI.java b/ao-tools/altosui/AltosCSVUI.java index 2d812361..4eb72de8 100644 --- a/ao-tools/altosui/AltosCSVUI.java +++ b/ao-tools/altosui/AltosCSVUI.java @@ -35,17 +35,17 @@ public class AltosCSVUI extends JDialog implements Runnable, ActionListener { - JFrame frame; - Thread thread; - AltosReader reader; - AltosCSV writer; + JFrame frame; + Thread thread; + AltosRecordIterable iterable; + AltosCSV writer; public void run() { AltosLogfileChooser chooser; chooser = new AltosLogfileChooser(frame); - reader = chooser.runDialog(); - if (reader == null) + iterable = chooser.runDialog(); + if (iterable == null) return; JFileChooser csv_chooser; @@ -56,6 +56,7 @@ public class AltosCSVUI path = path.substring(0,dot); path = path.concat(".csv"); csv_chooser = new JFileChooser(path); + csv_chooser.setSelectedFile(new File(path)); int ret = csv_chooser.showSaveDialog(frame); if (ret == JFileChooser.APPROVE_OPTION) { try { @@ -66,8 +67,7 @@ public class AltosCSVUI "Cannot open file", JOptionPane.ERROR_MESSAGE); } - writer.write(reader); - reader.close(); + writer.write(iterable); writer.close(); } }