X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=altosui%2FAltosCSVUI.java;h=4b48bdf625f2bb1874e6989ee6ec4212ac9b7e5e;hb=d203a2da2641bec21a4257c8a7b03d9a1eba53a5;hp=2702668bfb9fdf768c9b2ced2702530c20aebc88;hpb=3c2f601139d36761de6a8a2210545d082ef16133;p=fw%2Faltos diff --git a/altosui/AltosCSVUI.java b/altosui/AltosCSVUI.java index 2702668b..4b48bdf6 100644 --- a/altosui/AltosCSVUI.java +++ b/altosui/AltosCSVUI.java @@ -20,23 +20,18 @@ package altosui; import java.awt.*; import java.awt.event.*; import javax.swing.*; -import javax.swing.filechooser.FileNameExtensionFilter; -import javax.swing.table.*; import java.io.*; -import java.util.*; -import java.text.*; -import java.util.prefs.*; -import java.util.concurrent.LinkedBlockingQueue; -import org.altusmetrum.AltosLib.*; +import org.altusmetrum.altoslib_1.*; +import org.altusmetrum.altosuilib_1.*; public class AltosCSVUI - extends AltosDialog + extends AltosUIDialog implements ActionListener { JFileChooser csv_chooser; JPanel accessory; JComboBox combo_box; - AltosRecordIterable iterable; + Iterable states; AltosWriter writer; static String[] combo_box_items = { "Comma Separated Values (.CSV)", "Googleearth Data (.KML)" }; @@ -60,8 +55,8 @@ public class AltosCSVUI set_default_file(); } - public AltosCSVUI(JFrame frame, AltosRecordIterable in_iterable, File source_file) { - iterable = in_iterable; + public AltosCSVUI(JFrame frame, AltosStateIterable states, File source_file) { + this.states = states; csv_chooser = new JFileChooser(source_file); accessory = new JPanel(); @@ -96,7 +91,7 @@ public class AltosCSVUI writer = new AltosCSV(file); else writer = new AltosKML(file); - writer.write(iterable); + writer.write(states); writer.close(); } catch (FileNotFoundException ee) { JOptionPane.showMessageDialog(frame,