X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altosui%2FAltosIdleMonitorUI.java;h=4d5c3b2df7661f96c6f91b67a8e7120bcd7d830a;hp=7f6abbded0b5c1a9c1b7659ac6086006494c8439;hb=0641326842bffbf4b3ae69459ca540131cb64e59;hpb=643c2fb03833d658320f476ef731bbb06fe3cc31 diff --git a/altosui/AltosIdleMonitorUI.java b/altosui/AltosIdleMonitorUI.java index 7f6abbde..4d5c3b2d 100644 --- a/altosui/AltosIdleMonitorUI.java +++ b/altosui/AltosIdleMonitorUI.java @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of @@ -24,8 +25,8 @@ import javax.swing.event.*; import java.io.*; import java.util.concurrent.*; import java.util.Arrays; -import org.altusmetrum.altoslib_7.*; -import org.altusmetrum.altosuilib_7.*; +import org.altusmetrum.altoslib_11.*; +import org.altusmetrum.altosuilib_11.*; public class AltosIdleMonitorUI extends AltosUIFrame implements AltosFlightDisplay, AltosIdleMonitorListener, DocumentListener { AltosDevice device; @@ -35,7 +36,7 @@ public class AltosIdleMonitorUI extends AltosUIFrame implements AltosFlightDispl AltosFlightStatus flightStatus; AltosIgnitor ignitor; AltosIdleMonitor thread; - AltosUIMapNew sitemap; + AltosUIMap sitemap; int serial; boolean remote; boolean has_ignitor; @@ -128,6 +129,19 @@ public class AltosIdleMonitorUI extends AltosUIFrame implements AltosFlightDispl SwingUtilities.invokeLater(r); } + public void error(final String reason) { + Runnable r = new Runnable() { + public void run() { + disconnect(); + JOptionPane.showMessageDialog(AltosIdleMonitorUI.this, + reason, + "Error fetching data", + JOptionPane.ERROR_MESSAGE); + } + }; + SwingUtilities.invokeLater(r); + } + Container bag; AltosUIFreqList frequencies; JTextField callsign_value; @@ -262,7 +276,7 @@ public class AltosIdleMonitorUI extends AltosUIFrame implements AltosFlightDispl ignitor = new AltosIgnitor(); - sitemap = new AltosUIMapNew(); + sitemap = new AltosUIMap(); /* Make the tabbed pane use the rest of the window space */ bag.add(pane, constraints(0, 4, GridBagConstraints.BOTH));