]> gerrit.simantics Code Review - simantics/3d.git/commitdiff
Generic listener interfaces 38/3438/1
authorMarko Luukkainen <marko.luukkainen@semantum.fi>
Fri, 1 Nov 2019 08:27:15 +0000 (10:27 +0200)
committerMarko Luukkainen <marko.luukkainen@semantum.fi>
Fri, 1 Nov 2019 08:27:15 +0000 (10:27 +0200)
gitlab #29

Change-Id: Ia23e9223d76b0d942dd0738df77fe31cb5729ff1

org.simantics.g3d/META-INF/MANIFEST.MF
org.simantics.g3d/src/org/simantics/g3d/event/RefreshListener.java [new file with mode: 0644]
org.simantics.g3d/src/org/simantics/g3d/event/RefreshProvider.java [new file with mode: 0644]

index 933d272fa8907631518bcc33ec312fd0195a58ec..876933d45cec50ddedd21a3855a662df99e9ccaa 100644 (file)
@@ -23,6 +23,8 @@ Require-Bundle: org.eclipse.core.runtime,
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Bundle-ActivationPolicy: lazy
 Export-Package: org.simantics.g3d,
+ org.simantics.g3d.adapters,
+ org.simantics.g3d.event,
  org.simantics.g3d.gizmo,
  org.simantics.g3d.math,
  org.simantics.g3d.preferences,
diff --git a/org.simantics.g3d/src/org/simantics/g3d/event/RefreshListener.java b/org.simantics.g3d/src/org/simantics/g3d/event/RefreshListener.java
new file mode 100644 (file)
index 0000000..bb92cc1
--- /dev/null
@@ -0,0 +1,7 @@
+package org.simantics.g3d.event;
+
+public interface RefreshListener<T> {
+    
+    void contentRefresh(Object source, T object);
+
+}
diff --git a/org.simantics.g3d/src/org/simantics/g3d/event/RefreshProvider.java b/org.simantics.g3d/src/org/simantics/g3d/event/RefreshProvider.java
new file mode 100644 (file)
index 0000000..82065da
--- /dev/null
@@ -0,0 +1,8 @@
+package org.simantics.g3d.event;
+
+public interface RefreshProvider<T> {
+    
+    void addListener(RefreshListener<T> listener);
+    void removeListener(RefreshListener<T> listener);
+
+}