X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=altosui%2FAltosUI.java;h=d630ceec763613a38e4fd5abe4c907d9ed9bc0c8;hb=e1133481f2208fd16be8196977696da2cce430f3;hp=c1a66b835692c695f232f401a1030002602ee583;hpb=9a7d6431777ce3377b788ddac6cb9fadd53c039c;p=fw%2Faltos diff --git a/altosui/AltosUI.java b/altosui/AltosUI.java index c1a66b83..d630ceec 100644 --- a/altosui/AltosUI.java +++ b/altosui/AltosUI.java @@ -20,18 +20,12 @@ package altosui; import java.awt.*; import java.awt.event.*; import javax.swing.*; -import javax.swing.filechooser.FileNameExtensionFilter; -import javax.swing.table.*; import java.io.*; -import java.util.*; -import java.text.*; -import java.util.prefs.*; import java.util.concurrent.*; import org.altusmetrum.AltosLib.*; +import org.altusmetrum.altosuilib.*; -import libaltosJNI.*; - -public class AltosUI extends AltosFrame { +public class AltosUI extends AltosUIFrame { public AltosVoice voice = new AltosVoice(); public static boolean load_library(Frame frame) { @@ -94,7 +88,7 @@ public class AltosUI extends AltosFrame { c.weighty = 1; b = new JButton(label); - Dimension ps = b.getPreferredSize(); + //Dimension ps = b.getPreferredSize(); gridbag.setConstraints(b, c); add(b, c); @@ -248,7 +242,7 @@ public class AltosUI extends AltosFrame { } private void ConnectToDevice() { - AltosDevice device = AltosDeviceDialog.show(AltosUI.this, + AltosDevice device = AltosDeviceUIDialog.show(AltosUI.this, Altos.product_basestation); if (device != null) @@ -448,9 +442,11 @@ public class AltosUI extends AltosFrame { return null; } AltosRecordIterable recs; - AltosReplayReader reader; + //AltosReplayReader reader; if (file.getName().endsWith("eeprom")) { recs = new AltosEepromIterable(in); + } else if (file.getName().endsWith("mega")) { + recs = new AltosEepromMegaIterable(in); } else { recs = new AltosTelemetryIterable(in); } @@ -556,7 +552,6 @@ public class AltosUI extends AltosFrame { /* Handle batch-mode */ if (args.length == 0) { AltosUI altosui = new AltosUI(); - altosui.setVisible(true); java.util.List devices = AltosUSBDevice.list(Altos.product_basestation); for (AltosDevice device : devices)