]> gerrit.simantics Code Review - simantics/district.git/blobdiff - org.simantics.district.maps/src/org/simantics/maps/tile/ITileListener.java
Share some projects for Simantics District
[simantics/district.git] / org.simantics.district.maps / src / org / simantics / maps / tile / ITileListener.java
diff --git a/org.simantics.district.maps/src/org/simantics/maps/tile/ITileListener.java b/org.simantics.district.maps/src/org/simantics/maps/tile/ITileListener.java
new file mode 100644 (file)
index 0000000..ac267ec
--- /dev/null
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Association for Decentralized Information Management
+ * in Industry THTH ry.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     VTT Technical Research Centre of Finland - initial API and implementation
+ *******************************************************************************/
+package org.simantics.maps.tile;
+
+import java.awt.Image;
+
+/**
+ * @author Tuukka Lehtonen
+ */
+public interface ITileListener {
+
+    /**
+     * Indicates that the a request for the specified tile has been canceled for
+     * some reason.
+     * 
+     * @param key the requested tile that was canceled
+     */
+    void tileCanceled(TileKey key);
+
+    /**
+     * Indicates that the a request for the specified tile has failed for some
+     * reason.
+     * 
+     * @param key the requested tile
+     * @param e the reason for the failure
+     */
+    void tileFailed(TileKey key, Throwable e);
+
+    /**
+     * Indicates that the a request for the specified tile has been completed
+     * and the results delivered.
+     * 
+     * @param key the requested tile
+     * @param image the result image
+     */
+    void tileUpdated(TileKey key, Image image);
+
+}