altosui: Hook up the launch controller UI from the main button box
[fw/altos] / altosui / AltosUI.java
index 36c08882413fe61b1907d96f654e3769b617a7ab..8399b7c8440e101a1d271c5c00ed4542fe0b6786 100644 (file)
@@ -210,6 +210,13 @@ public class AltosUI extends JFrame {
                        });
                b.setToolTipText("Check flight readiness of altimeter in idle mode");
 
+               b = addButton(2, 2, "Launch Controller");
+               b.addActionListener(new ActionListener() {
+                               public void actionPerformed(ActionEvent e) {
+                                       LaunchController();
+                               }
+                       });
+
                setTitle("AltOS");
 
                pane.doLayout();
@@ -272,6 +279,10 @@ public class AltosUI extends JFrame {
                new AltosSiteMapPreload(AltosUI.this);
        }
 
+       void LaunchController() {
+               new AltosLaunchUI(AltosUI.this);
+       }
+
        /*
         * Replay a flight from telemetry data
         */
@@ -508,6 +519,10 @@ public class AltosUI extends JFrame {
        }
        
        public static void main(final String[] args) {
+               try {
+                       UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
+               } catch (Exception e) {
+               }
                /* Handle batch-mode */
                if (args.length == 0) {
                        AltosUI altosui = new AltosUI();