--- /dev/null
+/*******************************************************************************\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
+import org.simantics.db.RequestProcessor;\r
+import org.simantics.db.Resource;\r
+\r
+/**\r
+ * This interface is not intended to be implemented directly. Extend\r
+ * {@link StyleBase} instead.\r
+ * \r
+ * @see StyleBase\r
+ * @author Antti Villberg\r
+ */\r
+public interface Style {\r
+\r
+ /**\r
+ * Activates this style. Intended to start tracking the diagram items\r
+ * contained by the specified group and to request style applications\r
+ * whenever necessary through the specified profile observer. If a style\r
+ * instance is already active, re-activation should not do anything. A style\r
+ * can be re-activated after being deactivated.\r
+ * \r
+ * @param backend\r
+ * @param runtimeDiagram\r
+ * @param configuration\r
+ * @param group\r
+ * @param observer\r
+ */\r
+ void activate(RequestProcessor backend, Resource runtimeDiagram, Resource entry, Group group, EvaluationContext observer);\r
+\r
+ /**\r
+ * Deactivates this style. Intended to stop tracking the currently tracked\r
+ * group of diagram items and clean the diagram scene graph up by\r
+ * removing/disabling all scene graph contributions produced by this style.\r
+ * Deactivating an inactive style does nothing.\r
+ * \r
+ * @param backend\r
+ * @param runtimeDiagram\r
+ * @param configuration\r
+ * @param group\r
+ * @param observer\r
+ */\r
+ void deactivate(Resource runtimeDiagram, Resource entry, Group group, EvaluationContext observer);\r
+\r
+ /**\r
+ * Perform complete re-application of this style on the current set of\r
+ * observed diagram items.\r
+ * \r
+ * <p>\r
+ * Must always be invoked from the canvas context thread.\r
+ * \r
+ * @param context the canvas context in which the style is to be applied\r
+ * @param diagram\r
+ * @param group\r
+ * @param observer profile system observer for this canvas context\r
+ */\r
+ void apply(Resource entry, Group group, EvaluationContext observer);\r
+\r
+}\r