-/*******************************************************************************\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.g2d.element.handler;\r
-\r
-import org.simantics.g2d.diagram.participant.ElementPainter;\r
-import org.simantics.g2d.element.IElement;\r
-import org.simantics.g2d.element.SceneGraphNodeKey;\r
-import org.simantics.scenegraph.g2d.G2DNode;\r
-import org.simantics.scenegraph.g2d.G2DParentNode;\r
-\r
-/**\r
- * Scene graph node update handler of an element.\r
- * \r
- * <p>\r
- * This handler is responsible for making sure that the scene graph is in sync\r
- * with the element's current state.\r
- * \r
- * <p>\r
- * An element may have multiple scene graph handlers. Painting order of the\r
- * scene graph nodes is defined by the z-indexes given to the nodes created by\r
- * each {@link SceneGraph} handler.\r
- * \r
- * @author J-P Laine\r
- * \r
- * @see {@link G2DNode} for scene graph\r
- * @see ElementPainter\r
- */\r
-public interface SceneGraph extends ElementHandler {\r
-\r
- /**\r
- * Updates the renderable representation of the specified element, i.e. its\r
- * scene graph parts to match the current state of the element.\r
- * \r
- * <p>\r
- * This method will be called whenever the g2d framework decides that an\r
- * element is dirty. This means that implementations must be prepared to\r
- * have this method be called multiple times.\r
- * \r
- * <p>\r
- * Generally implementations should create a scene graph node or nodes only\r
- * on the first invocation, store that in the element with a\r
- * {@link SceneGraphNodeKey} and on each call initialize the created\r
- * node/nodes with the values stored in the element.\r
- * \r
- * @param e element to update into the scene graph\r
- * @param parent scene graph parent node for this element\r
- * \r
- * TODO: the method is badly named since it can be invoked multiple\r
- * times. initOrUpdate would be more suitable but that just sounds\r
- * bad and the whole thing feels like bad design anyway.\r
- */\r
- void init(final IElement e, final G2DParentNode parent);\r
-\r
- /**\r
- * Remove any scene graph node references from the specified element and\r
- * from the scene graph.\r
- * \r
- * @param e the element whose scene graph references to clean up\r
- */\r
- void cleanup(final IElement e);\r
-\r
-}\r
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 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.g2d.element.handler;
+
+import org.simantics.g2d.diagram.participant.ElementPainter;
+import org.simantics.g2d.element.IElement;
+import org.simantics.g2d.element.SceneGraphNodeKey;
+import org.simantics.scenegraph.g2d.G2DNode;
+import org.simantics.scenegraph.g2d.G2DParentNode;
+
+/**
+ * Scene graph node update handler of an element.
+ *
+ * <p>
+ * This handler is responsible for making sure that the scene graph is in sync
+ * with the element's current state.
+ *
+ * <p>
+ * An element may have multiple scene graph handlers. Painting order of the
+ * scene graph nodes is defined by the z-indexes given to the nodes created by
+ * each {@link SceneGraph} handler.
+ *
+ * @author J-P Laine
+ *
+ * @see {@link G2DNode} for scene graph
+ * @see ElementPainter
+ */
+public interface SceneGraph extends ElementHandler {
+
+ /**
+ * Updates the renderable representation of the specified element, i.e. its
+ * scene graph parts to match the current state of the element.
+ *
+ * <p>
+ * This method will be called whenever the g2d framework decides that an
+ * element is dirty. This means that implementations must be prepared to
+ * have this method be called multiple times.
+ *
+ * <p>
+ * Generally implementations should create a scene graph node or nodes only
+ * on the first invocation, store that in the element with a
+ * {@link SceneGraphNodeKey} and on each call initialize the created
+ * node/nodes with the values stored in the element.
+ *
+ * @param e element to update into the scene graph
+ * @param parent scene graph parent node for this element
+ *
+ * TODO: the method is badly named since it can be invoked multiple
+ * times. initOrUpdate would be more suitable but that just sounds
+ * bad and the whole thing feels like bad design anyway.
+ */
+ void init(final IElement e, final G2DParentNode parent);
+
+ /**
+ * Remove any scene graph node references from the specified element and
+ * from the scene graph.
+ *
+ * @param e the element whose scene graph references to clean up
+ */
+ void cleanup(final IElement e);
+
+}