X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altosui%2FAltosCSVUI.java;h=c41ea74b5190dba3a7c5868db374cfec20db9613;hp=a212409ee83e3fc4f60aaa6d361a39cd87e15fc3;hb=2ad31bad20b20615e9d8b29088e2488fddc81ac9;hpb=128bbfa150f88c09f7adde2434b7bf0b5a9ed556 diff --git a/altosui/AltosCSVUI.java b/altosui/AltosCSVUI.java index a212409e..c41ea74b 100644 --- a/altosui/AltosCSVUI.java +++ b/altosui/AltosCSVUI.java @@ -20,22 +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_2.*; +import org.altusmetrum.altosuilib_1.*; public class AltosCSVUI - extends JDialog + 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)" }; @@ -59,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(); @@ -95,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,