diff options
| author | Keith Packard <keithp@keithp.com> | 2010-11-19 17:14:17 +0800 |
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2010-11-19 17:15:35 +0800 |
| commit | 8f72f08839346fb225238420324f0edcd070e531 (patch) | |
| tree | b6460e8d11ef9b8c7ed0586110d43d059b0ceeae /ao-tools/altosui/AltosUI.java | |
| parent | 24ffcf86c43290ce0f70fb4ee0984b3debdb8a5f (diff) | |
altosui: Unify datafile selection to AltosDataChooser
Instead of having several separate intefaces, use a single dialog for
selecting data files for graph/export/replay.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'ao-tools/altosui/AltosUI.java')
| -rw-r--r-- | ao-tools/altosui/AltosUI.java | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/ao-tools/altosui/AltosUI.java b/ao-tools/altosui/AltosUI.java index 5e9566f0..c82c8e8a 100644 --- a/ao-tools/altosui/AltosUI.java +++ b/ao-tools/altosui/AltosUI.java @@ -230,8 +230,9 @@ public class AltosUI extends JFrame { * Replay a flight from telemetry data */ private void Replay() { - AltosLogfileChooser chooser = new AltosLogfileChooser( + AltosDataChooser chooser = new AltosDataChooser( AltosUI.this); + AltosRecordIterable iterable = chooser.runDialog(); if (iterable != null) { AltosFlightReader reader = new AltosReplayReader(iterable.iterator(), @@ -252,14 +253,24 @@ public class AltosUI extends JFrame { */ private void ExportData() { - new AltosCSVUI(AltosUI.this); + AltosDataChooser chooser; + chooser = new AltosDataChooser(this); + AltosRecordIterable record_reader = chooser.runDialog(); + if (record_reader == null) + return; + new AltosCSVUI(AltosUI.this, record_reader, chooser.file()); } /* Load a flight log CSV file and display a pretty graph. */ private void GraphData() { - new AltosGraphUI(AltosUI.this); + AltosDataChooser chooser; + chooser = new AltosDataChooser(this); + AltosRecordIterable record_reader = chooser.runDialog(); + if (record_reader == null) + return; + new AltosGraphUI(record_reader); } private void ConfigureAltosUI() { |
