19 package org.sleuthkit.autopsy.geolocation;
21 import java.awt.image.BufferedImage;
22 import java.lang.ref.SoftReference;
24 import org.jxmapviewer.viewer.Tile;
31 final class MBTilesTile
extends Tile {
33 private SoftReference<BufferedImage> image =
new SoftReference<>(null);
34 private Priority priority = Priority.High;
35 private boolean loaded =
false;
36 private final String tileID;
45 MBTilesTile(
int x,
int y,
int zoom) {
59 MBTilesTile(
int x,
int y,
int zoom, String tileID, Priority priority) {
61 this.priority = priority;
70 void setImage(BufferedImage image) {
71 this.image =
new SoftReference<>(image);
82 public synchronized boolean isLoaded() {
86 synchronized void setLoaded(
boolean loaded) {
87 boolean old = isLoaded();
89 firePropertyChange(
"loaded", old, isLoaded());
93 public BufferedImage getImage() {
94 BufferedImage img = image.get();
102 public Priority getPriority() {
107 public void setPriority(Priority priority) {
108 this.priority = priority;
118 public String getURL() {