JTabbedPane pane;
- AltosSiteMap sitemap;
+ AltosUIMap map;
TeleGPSInfo gps_info;
+ TeleGPSState gps_state;
AltosInfoTable info_table;
LinkedList<AltosFlightDisplay> displays;
}
void load_maps() {
- new AltosSiteMapPreload(this);
+ new AltosUIMapPreload(this);
}
void disconnect() {
void add_frequency_menu(int serial, final AltosFlightReader reader) {
// Channel menu
+ if (frequencies != null)
+ return;
+
frequencies = new AltosFreqList(AltosUIPreferences.frequency(serial));
frequencies.set_product("Monitor");
frequencies.set_serial(serial);
void remove_frequency_menu() {
if (frequencies != null) {
menu_bar.remove(frequencies);
+ menu_bar.repaint();
frequencies = null;
}
}
}
private void close() {
+ disconnect();
AltosUIPreferences.unregister_font_listener(this);
AltosPreferences.unregister_units_listener(this);
setVisible(false);
c.gridwidth = 2;
bag.add(pane, c);
- sitemap = new AltosSiteMap();
- pane.add("Site Map", sitemap);
- displays.add(sitemap);
+ map = new AltosUIMap();
+ pane.add(map.getName(), map);
+ displays.add(map);
gps_info = new TeleGPSInfo();
- pane.add("Info", gps_info);
+ pane.add(gps_info.getName(), gps_info);
displays.add(gps_info);
+ gps_state = new TeleGPSState();
+ pane.add(gps_state.getName(), gps_state);
+ displays.add(gps_state);
+
info_table = new AltosInfoTable();
pane.add("Table", info_table);
displays.add(info_table);
} else {
double lat = Double.parseDouble(args[i+1]);
double lon = Double.parseDouble(args[i+2]);
- AltosSiteMap.prefetchMaps(lat, lon);
+ AltosUIMap.prefetch_maps(lat, lon);
i += 2;
}
} else if (args[i].equals("--replay"))