From c666bd50b9ef05b6f78adb83c68557955e3132e9 Mon Sep 17 00:00:00 2001 From: Marko Luukkainen Date: Fri, 1 Nov 2019 10:27:15 +0200 Subject: [PATCH] Generic listener interfaces gitlab #29 Change-Id: Ia23e9223d76b0d942dd0738df77fe31cb5729ff1 --- org.simantics.g3d/META-INF/MANIFEST.MF | 2 ++ .../src/org/simantics/g3d/event/RefreshListener.java | 7 +++++++ .../src/org/simantics/g3d/event/RefreshProvider.java | 8 ++++++++ 3 files changed, 17 insertions(+) create mode 100644 org.simantics.g3d/src/org/simantics/g3d/event/RefreshListener.java create mode 100644 org.simantics.g3d/src/org/simantics/g3d/event/RefreshProvider.java diff --git a/org.simantics.g3d/META-INF/MANIFEST.MF b/org.simantics.g3d/META-INF/MANIFEST.MF index 933d272f..876933d4 100644 --- a/org.simantics.g3d/META-INF/MANIFEST.MF +++ b/org.simantics.g3d/META-INF/MANIFEST.MF @@ -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 index 00000000..bb92cc11 --- /dev/null +++ b/org.simantics.g3d/src/org/simantics/g3d/event/RefreshListener.java @@ -0,0 +1,7 @@ +package org.simantics.g3d.event; + +public interface RefreshListener { + + 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 index 00000000..82065da0 --- /dev/null +++ b/org.simantics.g3d/src/org/simantics/g3d/event/RefreshProvider.java @@ -0,0 +1,8 @@ +package org.simantics.g3d.event; + +public interface RefreshProvider { + + void addListener(RefreshListener listener); + void removeListener(RefreshListener listener); + +} -- 2.47.1