From c89a34d1eb25155405b0036baeadc7bbfeade1c2 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 27 Sep 2010 17:11:48 -0700 Subject: altosui: Create iterables for log file scanning. Split out display threads Convert from log file reading paradigm to using iterators which is more idiomatic for java. Split more code out of AltosUI.java, including the display update threads for telemetry monitoring and logfile replay.x Signed-off-by: Keith Packard --- ao-tools/altosui/AltosLogfileChooser.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'ao-tools/altosui/AltosLogfileChooser.java') diff --git a/ao-tools/altosui/AltosLogfileChooser.java b/ao-tools/altosui/AltosLogfileChooser.java index 36b51de6..8b9d77d6 100644 --- a/ao-tools/altosui/AltosLogfileChooser.java +++ b/ao-tools/altosui/AltosLogfileChooser.java @@ -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, -- cgit v1.2.3