X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=altosuilib%2FAltosUIMapPreload.java;h=56066d70b25764a3ad0fb661112172123c82caa9;hb=90e03dfc8534fc4fc25f6a5ee9ec109b98baa238;hp=d702dddfee70f59029a6a3356e019544d7444229;hpb=db2443fdbf65b65703217174303027c439124a83;p=fw%2Faltos diff --git a/altosuilib/AltosUIMapPreload.java b/altosuilib/AltosUIMapPreload.java index d702dddf..56066d70 100644 --- a/altosuilib/AltosUIMapPreload.java +++ b/altosuilib/AltosUIMapPreload.java @@ -209,6 +209,7 @@ class AltosUISites extends Thread { public class AltosUIMapPreload extends AltosUIFrame implements ActionListener, ItemListener, AltosUIMapTileListener { AltosUIFrame owner; AltosUIMap map; + AltosUIMapCache cache = new AltosUIMapCache(); AltosUIMapPos lat; AltosUIMapPos lon; @@ -326,7 +327,7 @@ public class AltosUIMapPreload extends AltosUIFrame implements ActionListener, I /* AltosUIMapTileListener methods */ - public void notify_tile(AltosUIMapTile tile, int status) { + public synchronized void notify_tile(AltosUIMapTile tile, int status) { if (status == AltosUIMapStore.loading) return; @@ -353,6 +354,8 @@ public class AltosUIMapPreload extends AltosUIFrame implements ActionListener, I } } + public AltosUIMapCache cache() { return cache; } + public void set_sites() { int i = 1; for (AltosUISite site : sites.sites) { @@ -400,8 +403,6 @@ public class AltosUIMapPreload extends AltosUIFrame implements ActionListener, I } public AltosUIMapPreload(AltosUIFrame in_owner) { - System.out.printf("start creating preload ui\n"); - owner = in_owner; Container pane = getContentPane(); @@ -602,7 +603,5 @@ public class AltosUIMapPreload extends AltosUIFrame implements ActionListener, I pack(); setLocationRelativeTo(owner); setVisible(true); - - System.out.printf("done creating preload ui\n"); } }