X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=ao-tools%2Faltosui%2FAltosSiteMapTile.java;h=e09429862d505dd92a4b3111a5f6a7abc5586671;hp=ea8c8bd9eafb302d272020751e3ae4fc76d29dff;hb=4a9ded5b39ed08e13abc2cddba8b712f62b983f2;hpb=ec47bc93a487614714a752cb30ec9fe3d8f72929 diff --git a/ao-tools/altosui/AltosSiteMapTile.java b/ao-tools/altosui/AltosSiteMapTile.java index ea8c8bd9..e0942986 100644 --- a/ao-tools/altosui/AltosSiteMapTile.java +++ b/ao-tools/altosui/AltosSiteMapTile.java @@ -52,10 +52,17 @@ public class AltosSiteMapTile extends JLayeredPane { Color.BLACK // landed }; - boolean drawn_landed_circle = false; - boolean drawn_boost_circle = false; - public void show(AltosState state, int crc_errors, - Point2D.Double last_pt, Point2D.Double pt) + private boolean drawn_landed_circle = false; + private boolean drawn_boost_circle = false; + private boolean scrollable = false; + public synchronized void setScrollable() { + scrollable = true; + } + public synchronized boolean isScrollable() { + return scrollable; + } + public synchronized void show(AltosState state, int crc_errors, + Point2D.Double last_pt, Point2D.Double pt) { if (0 <= state.state && state.state < stateColors.length) { g2d.setColor(stateColors[state.state]); @@ -63,7 +70,7 @@ public class AltosSiteMapTile extends JLayeredPane { g2d.draw(new Line2D.Double(last_pt, pt)); int px_size = getWidth(); - if (0 <= pt.x && pt.x < px_size) { + if (isScrollable() && 0 <= pt.x && pt.x < px_size) { if (0 <= pt.y && pt.y < px_size) { int dx = 500, dy = 250; if (state.state > 2) {