summaryrefslogtreecommitdiff
path: root/altosuilib/AltosSiteMapImage.java
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2014-05-28 10:16:38 -0700
committerKeith Packard <keithp@keithp.com>2014-05-28 10:16:38 -0700
commit52ce41952c5a3c31532fa4f0d1b3155a162b76f4 (patch)
tree91d72fd602969a74b7d1ec0cc6c67fd298313c25 /altosuilib/AltosSiteMapImage.java
parent5c3991768d3cb17fc99ad32b2d6d8d11f0e37dfa (diff)
altosuilib: Update map preloading UI to include zoom and maptypes
This lets you specify precisely which maps to load. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosuilib/AltosSiteMapImage.java')
-rw-r--r--altosuilib/AltosSiteMapImage.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/altosuilib/AltosSiteMapImage.java b/altosuilib/AltosSiteMapImage.java
index f08c0b26..ae32418f 100644
--- a/altosuilib/AltosSiteMapImage.java
+++ b/altosuilib/AltosSiteMapImage.java
@@ -34,7 +34,7 @@ public class AltosSiteMapImage {
Thread load_thread;
- public boolean validate() {
+ public boolean validate(final int serial) {
if (image != null) {
AltosSiteMap.debug_component(tile, "valid");
return true;
@@ -42,16 +42,15 @@ public class AltosSiteMapImage {
AltosSiteMap.debug_component(tile, "loading");
load_thread = new Thread() {
public void run() {
- image = null;
try {
image = ImageIO.read(file);
} catch (Exception e) {
}
SwingUtilities.invokeLater( new Runnable() {
public void run() {
- AltosSiteMap.debug_component(tile, "later");
+ AltosSiteMap.debug_component(tile, file.toString());
Graphics2D g2d = (Graphics2D) tile.getGraphics();
- tile.paint_graphics(g2d, image);
+ tile.paint_graphics(g2d, image, serial);
load_thread = null;
}
});