altosui/altosuilib: Cleanup -Xlint:unchecked warnings
[fw/altos] / altosui / AltosCSVUI.java
index 1d024086514e8161d91a46d2170a789940ac37c6..95a8aeeaff9f64b22595bbd7cf08b708437e64f5 100644 (file)
@@ -21,16 +21,17 @@ import java.awt.*;
 import java.awt.event.*;
 import javax.swing.*;
 import java.io.*;
-import org.altusmetrum.AltosLib.*;
+import org.altusmetrum.altoslib_3.*;
+import org.altusmetrum.altosuilib_1.*;
 
 public class AltosCSVUI
-       extends AltosDialog
+       extends AltosUIDialog
        implements ActionListener
 {
        JFileChooser            csv_chooser;
        JPanel                  accessory;
-       JComboBox               combo_box;
-       AltosRecordIterable     iterable;
+       JComboBox<String>       combo_box;
+       Iterable<AltosState>    states;
        AltosWriter             writer;
 
        static String[]         combo_box_items = { "Comma Separated Values (.CSV)", "Googleearth Data (.KML)" };
@@ -54,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();
@@ -72,7 +73,7 @@ public class AltosCSVUI
                c.gridy = 0;
                accessory.add(accessory_label, c);
 
-               combo_box = new JComboBox(combo_box_items);
+               combo_box = new JComboBox<String>(combo_box_items);
                combo_box.addActionListener(this);
                c.gridx = 0;
                c.gridy = 1;
@@ -90,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,