Merge branch 'sitemap' into buttonbox
authorAnthony Towns <aj@erisian.com.au>
Sun, 21 Nov 2010 01:15:02 +0000 (11:15 +1000)
committerAnthony Towns <aj@erisian.com.au>
Sun, 21 Nov 2010 01:15:02 +0000 (11:15 +1000)
Conflicts:
ao-tools/altosui/AltosSiteMap.java

ao-tools/altosui/AltosFlightUI.java
ao-tools/altosui/AltosSiteMap.java
ao-tools/altosui/AltosSiteMapCache.java
ao-tools/altosui/AltosSiteMapTile.java

index 1107d52725a62125d46c1c1940d73f908747d69a..732f7395565eee41b2d0388c4474cd4f8ddb99b1 100644 (file)
@@ -198,15 +198,15 @@ public class AltosFlightUI extends JFrame implements AltosFlightDisplay {
 
                setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
                addWindowListener(new WindowAdapter() {
-                       @Override
-                       public void windowClosing(WindowEvent e) {
-                               disconnect();
-                               setVisible(false);
-                               dispose();
-                               if (exit_on_close)
-                                       System.exit(0);
-                       }
-               });
+                               @Override
+                               public void windowClosing(WindowEvent e) {
+                                       disconnect();
+                                       setVisible(false);
+                                       dispose();
+                                       if (exit_on_close)
+                                               System.exit(0);
+                               }
+                       });
 
                pack();
                setVisible(true);
index e222e2c8cc88e592a8f90627d24c2986a33b54b8..2c5420619eda46a36ae29a1b91eda1a7a371c047 100644 (file)
@@ -213,6 +213,8 @@ public class AltosSiteMap extends JScrollPane implements AltosFlightDisplay {
        boolean initialised = false;
        public void show(AltosState state, int crc_errors) {
                // if insufficient gps data, nothing to update
+               if (state.gps == null)
+                       return;
                if (!state.gps.locked) {
                        if (state.pad_lat == 0 && state.pad_lon == 0)
                                return;
@@ -268,4 +270,3 @@ public class AltosSiteMap extends JScrollPane implements AltosFlightDisplay {
                setPreferredSize(new Dimension(500,200));
        }
 }
-
index e9dbf8e6ec8a8245b5b6901271d88e180431906a..2e62cc454f71fcfa27ef782bd926395e64a5dddf 100644 (file)
@@ -33,6 +33,7 @@ import java.net.URLConnection;
 public class AltosSiteMapCache extends JLabel {
        public static boolean fetchMap(File file, String url) {
                URL u;
+
                try {
                        u = new URL(url);
                } catch (java.net.MalformedURLException e) {
@@ -100,4 +101,3 @@ public class AltosSiteMapCache extends JLabel {
                }
        }
 }
-
index 8aee86c1a04eaba9492d6986033de458a48f9cd6..fd4cf0bbd3b3097f1b5a0fe43fb5671d1a7f6767 100644 (file)
@@ -125,10 +125,12 @@ public class AltosSiteMapTile extends JLayeredPane {
 
                draw = new JLabel();
                g2d = fillLabel(draw, new Color(127, 127, 127, 0), px_size);
+               g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
+                                    RenderingHints.VALUE_ANTIALIAS_ON);
+               g2d.setStroke(new BasicStroke(6, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND));
                draw.setBounds(0, 0, px_size, px_size);
                draw.setOpaque(false);
 
                add(draw, new Integer(1));
        }
 }
-