import java.io.*;
import java.util.concurrent.*;
import java.util.*;
-import org.altusmetrum.altoslib_11.*;
-import org.altusmetrum.altosuilib_11.*;
+import org.altusmetrum.altoslib_12.*;
+import org.altusmetrum.altosuilib_12.*;
import org.jfree.chart.ChartPanel;
import org.jfree.chart.JFreeChart;
import org.jfree.ui.RefineryUtilities;
-public class TeleGPSGraphUI extends AltosUIFrame implements AltosFontListener, AltosUnitsListener
+public class TeleGPSGraphUI extends AltosUIFrame implements AltosFontListener, AltosUnitsListener, AltosFilterListener
{
JTabbedPane pane;
- AltosGraphNew graph;
+ AltosGraph graph;
AltosUIEnable enable;
AltosUIMap map;
AltosState state;
enable.units_changed(imperial_units);
}
+ AltosUIFlightSeries flight_series;
+
+ public void filter_changed(double speed_filter, double accel_filter) {
+ flight_series.set_filter(speed_filter, accel_filter);
+ graph.filter_changed();
+ stats = new AltosFlightStats(flight_series);
+ statsTable.filter_changed(stats);
+ }
+
+ public double speed_filter() {
+ return flight_series.speed_filter_width;
+ }
+
+ public double accel_filter() {
+ return flight_series.accel_filter_width;
+ }
+
TeleGPSGraphUI(AltosRecordSet set, File file) throws InterruptedException, IOException {
super(file.getName());
AltosCalData cal_data = set.cal_data();
- AltosUIFlightSeries flight_series = new AltosUIFlightSeries(cal_data);
+ flight_series = new AltosUIFlightSeries(cal_data);
set.capture_series(flight_series);
flight_series.finish();
pane = new JTabbedPane();
- enable = new AltosUIEnable();
+ graph = new AltosGraph(enable, stats, flight_series);
+
stats = new AltosFlightStats(flight_series);
- graph = new AltosGraphNew(enable, stats, flight_series);
+ enable = new AltosUIEnable(this);
statsTable = new AltosFlightStatsTable(stats);