]> gitweb.fperrin.net Git - GpsPrune.git/blobdiff - tim/prune/gui/map/MapTile.java
Version 18.5, July 2016
[GpsPrune.git] / tim / prune / gui / map / MapTile.java
diff --git a/tim/prune/gui/map/MapTile.java b/tim/prune/gui/map/MapTile.java
new file mode 100644 (file)
index 0000000..36a494d
--- /dev/null
@@ -0,0 +1,32 @@
+package tim.prune.gui.map;
+
+import java.awt.Image;
+
+/**
+ * Simple wrapper to hold an image for a map tile
+ * and a boolean flag to show whether it's expired or not
+ */
+public class MapTile
+{
+       /** Image or null if no image available */
+       private Image _image = null;
+       /** True if image expired, false if still fresh */
+       private boolean _expired = false;
+
+       /** Constructor */
+       public MapTile(Image inImage, boolean inExpired)
+       {
+               _image = inImage;
+               _expired = inExpired;
+       }
+
+       /** Get the image */
+       public Image getImage() {
+               return _image;
+       }
+
+       /** Return true if image is too old */
+       public boolean isExpired() {
+               return _expired;
+       }
+}