]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scenegraph.profile/src/org/simantics/scenegraph/profile/Observer.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.scenegraph.profile / src / org / simantics / scenegraph / profile / Observer.java
diff --git a/bundles/org.simantics.scenegraph.profile/src/org/simantics/scenegraph/profile/Observer.java b/bundles/org.simantics.scenegraph.profile/src/org/simantics/scenegraph/profile/Observer.java
new file mode 100644 (file)
index 0000000..94131e2
--- /dev/null
@@ -0,0 +1,43 @@
+/*******************************************************************************\r
+ * Copyright (c) 2007, 2010 Association for Decentralized Information Management\r
+ * in Industry THTH ry.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.scenegraph.profile;\r
+\r
+/**\r
+ * Diagram profile observer interface is a channel for {@link ProfileEntry} and\r
+ * {@link Style} to request style re-application, log exceptions and track the\r
+ * current state of the profile system for a particular diagram instance.\r
+ * \r
+ * TODO: add mechanism for partial style re-application\r
+ */\r
+public interface Observer {\r
+\r
+    /**\r
+     * Notifies this profile system instance that a profile subsystem is\r
+     * requesting for style re-application for the whole diagram.\r
+     */\r
+    void update();\r
+\r
+    /**\r
+     * For logging exceptional situations that occur within profile entries or\r
+     * styles.\r
+     * \r
+     * @param throwable\r
+     */\r
+    void exception(Throwable throwable);\r
+\r
+    /**\r
+     * @return <code>true</code> if this profile system instance has been shut\r
+     *         down, <code>false</code> otherwise\r
+     */\r
+    boolean isDisposed();\r
+\r
+}\r