X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=altosui%2FAltosUI.java;h=fefe74e82e4b2c397780134c8fcf7795a19d5442;hb=81bb6f42d8b859195ea5a35806c42d98ba82e8e1;hp=d8c8d61ce6794f8b6b4d8717c839bd2bc77dd916;hpb=abb8510b97ce9cbbff0275cc31f74780fe1ce138;p=fw%2Faltos diff --git a/altosui/AltosUI.java b/altosui/AltosUI.java index d8c8d61c..fefe74e8 100644 --- a/altosui/AltosUI.java +++ b/altosui/AltosUI.java @@ -26,7 +26,7 @@ import java.io.*; import java.util.*; import java.text.*; import java.util.prefs.*; -import java.util.concurrent.LinkedBlockingQueue; +import java.util.concurrent.*; import libaltosJNI.*; @@ -67,6 +67,16 @@ public class AltosUI extends JFrame { device.toShortString(), "Unkonwn I/O error", JOptionPane.ERROR_MESSAGE); + } catch (TimeoutException te) { + JOptionPane.showMessageDialog(this, + device.toShortString(), + "Timeout error", + JOptionPane.ERROR_MESSAGE); + } catch (InterruptedException ie) { + JOptionPane.showMessageDialog(this, + device.toShortString(), + "Interrupted exception", + JOptionPane.ERROR_MESSAGE); } } @@ -137,7 +147,7 @@ public class AltosUI extends JFrame { ExportData(); } }); - b = addButton(0, 1, "Configure TeleMetrum"); + b = addButton(0, 1, "Configure Altimeter"); b.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { ConfigureTeleMetrum(); @@ -187,6 +197,13 @@ public class AltosUI extends JFrame { } }); + b = addButton(2, 2, "Monitor Idle"); + b.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + IdleMonitor(); + } + }); + setTitle("AltOS"); pane.doLayout(); @@ -300,6 +317,13 @@ public class AltosUI extends JFrame { new AltosConfigureUI(AltosUI.this, voice); } + private void IdleMonitor() { + try { + new AltosIdleMonitorUI(this); + } catch (Exception e) { + } + } + static AltosRecordIterable open_logfile(String filename) { File file = new File (filename); try {