altosui: Create iterables for log file scanning. Split out display threads
[fw/altos] / ao-tools / altosui / AltosLogfileChooser.java
index 36b51de65c993bece80378fb3d11b2d0bafb5f24..8b9d77d69cba6f70cd0d385b20ace70c03ca569e 100644 (file)
@@ -27,11 +27,6 @@ import java.util.*;
 import java.text.*;
 import java.util.prefs.*;
 
-import altosui.AltosPreferences;
-import altosui.AltosReader;
-import altosui.AltosEepromReader;
-import altosui.AltosTelemetryReader;
-
 public class AltosLogfileChooser extends JFileChooser {
        JFrame  frame;
        String  filename;
@@ -45,7 +40,7 @@ public class AltosLogfileChooser extends JFileChooser {
                return file;
        }
 
-       public AltosReader runDialog() {
+       public AltosRecordIterable runDialog() {
                int     ret;
 
                ret = showOpenDialog(frame);
@@ -59,9 +54,9 @@ public class AltosLogfileChooser extends JFileChooser {
 
                                in = new FileInputStream(file);
                                if (filename.endsWith("eeprom"))
-                                       return new AltosEepromReader(in);
+                                       return new AltosEepromIterable(in);
                                else
-                                       return new AltosTelemetryReader(in);
+                                       return new AltosTelemetryIterable(in);
                        } catch (FileNotFoundException fe) {
                                JOptionPane.showMessageDialog(frame,
                                                              filename,