X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altosuilib%2FAltosUIMapPreload.java;h=1c088a497cf202bbcd031687ed59c0093c2d9359;hp=d702dddfee70f59029a6a3356e019544d7444229;hb=c8078d352a7f54a4a97d25af080155d3f875536a;hpb=db2443fdbf65b65703217174303027c439124a83 diff --git a/altosuilib/AltosUIMapPreload.java b/altosuilib/AltosUIMapPreload.java index d702dddf..1c088a49 100644 --- a/altosuilib/AltosUIMapPreload.java +++ b/altosuilib/AltosUIMapPreload.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import java.awt.*; import java.awt.event.*; @@ -26,7 +26,7 @@ import java.text.*; import java.lang.Math; import java.net.URL; import java.net.URLConnection; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; class AltosUIMapPos extends Box { AltosUIFrame owner; @@ -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"); } }