From: Anthony Towns Date: Sat, 20 Nov 2010 08:20:45 +0000 (+1000) Subject: Merge branch 'buttonbox' of git://git.gag.com/fw/altos into buttonbox X-Git-Tag: debian/0.7.1+117+ge7954c8~8^2~9 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=74cab8503b51ba6fb05a4d12a031c749e870b0ef;hp=-c Merge branch 'buttonbox' of git://git.gag.com/fw/altos into buttonbox --- 74cab8503b51ba6fb05a4d12a031c749e870b0ef diff --combined ao-tools/altosui/AltosFlightUI.java index 21b41528,ac88aa15..6db6c67b --- a/ao-tools/altosui/AltosFlightUI.java +++ b/ao-tools/altosui/AltosFlightUI.java @@@ -42,11 -42,9 +42,11 @@@ public class AltosFlightUI extends JFra AltosAscent ascent; AltosDescent descent; AltosLanded landed; + AltosSiteMap sitemap; private AltosFlightStatus flightStatus; private JScrollPane flightInfoPane; + private JScrollPane sitemapPane; private AltosInfoTable flightInfo; static final int tab_pad = 1; @@@ -96,7 -94,6 +96,7 @@@ descent.reset(); landed.reset(); flightInfo.clear(); + sitemap.reset(); } public void show(AltosState state, int crc_errors) { @@@ -123,7 -120,6 +123,7 @@@ } flightStatus.show(state, crc_errors); flightInfo.show(state, crc_errors); + sitemap.show(state, crc_errors); } public void set_exit_on_close() { @@@ -131,6 -127,7 +131,7 @@@ } Container bag; + JComboBox channels; public AltosFlightUI(AltosVoice in_voice, AltosFlightReader in_reader, final int serial) { AltosPreferences.init(this); @@@ -151,10 -148,10 +152,10 @@@ if (serial >= 0) { // Channel menu - JComboBox channels = new AltosChannelMenu(AltosPreferences.channel(serial)); + channels = new AltosChannelMenu(AltosPreferences.channel(serial)); channels.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { - int channel = Integer.parseInt(e.getActionCommand()); + int channel = channels.getSelectedIndex(); reader.set_channel(channel); AltosPreferences.set_channel(serial, channel); } @@@ -190,10 -187,6 +191,10 @@@ flightInfoPane = new JScrollPane(flightInfo.box()); pane.add("Table", flightInfoPane); + sitemap = new AltosSiteMap(); + sitemapPane = new JScrollPane(sitemap); + pane.add("Site Map", sitemapPane); + c.gridx = 0; c.gridy = 2; c.fill = GridBagConstraints.BOTH;