summaryrefslogtreecommitdiff
path: root/ao-tools/altosui/AltosLogfileChooser.java
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2010-09-27 17:11:48 -0700
committerKeith Packard <keithp@keithp.com>2010-09-27 17:11:48 -0700
commitc89a34d1eb25155405b0036baeadc7bbfeade1c2 (patch)
tree1329c7c89b3d6a182fb68ec8f00c37a6104f5ab9 /ao-tools/altosui/AltosLogfileChooser.java
parente66919aa46193bd8c7a1e86fb32a3367dae121f5 (diff)
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 <keithp@keithp.com>
Diffstat (limited to 'ao-tools/altosui/AltosLogfileChooser.java')
-rw-r--r--ao-tools/altosui/AltosLogfileChooser.java11
1 files changed, 3 insertions, 8 deletions
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,