-/*******************************************************************************\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.diagram.handler;\r
-\r
-import java.util.Collection;\r
-\r
-import org.simantics.g2d.diagram.IDiagram;\r
-import org.simantics.g2d.element.IElement;\r
-\r
-/**\r
- * @author Toni Kalajainen\r
- */\r
-public interface LifeCycle extends DiagramHandler {\r
-\r
- /**\r
- * New empty diagram has spawned to the world.\r
- * \r
- * @param diagram\r
- */\r
- void onDiagramCreated(IDiagram diagram);\r
-\r
- /**\r
- * An old diagram has been restored from a other form of state\r
- * (loaded or cloned).\r
- * \r
- * @param diagram\r
- */\r
- void onDiagramLoaded(IDiagram diagram, Collection<IElement> initialElements);\r
-\r
- /**\r
- * Diagram is about to be disposed\r
- * @param diagram\r
- */\r
- void onDiagramDisposed(IDiagram diagram);\r
-\r
- /**\r
- * Diagram is about to be destoyed permanently from the world\r
- * @param diagram\r
- */\r
- void onDiagramDestroyed(IDiagram diagram);\r
-\r
- /**\r
- * A stub implementation for {@link LifeCycle} that does not do anything.\r
- * Extend this to avoid having to implement all methods.\r
- */\r
- public class Stub implements LifeCycle {\r
- @Override\r
- public void onDiagramCreated(IDiagram diagram) {\r
- }\r
-\r
- @Override\r
- public void onDiagramLoaded(IDiagram diagram, Collection<IElement> initialElements) {\r
- }\r
-\r
- @Override\r
- public void onDiagramDisposed(IDiagram diagram) {\r
- }\r
-\r
- @Override\r
- public void onDiagramDestroyed(IDiagram diagram) {\r
- }\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.diagram.handler;
+
+import java.util.Collection;
+
+import org.simantics.g2d.diagram.IDiagram;
+import org.simantics.g2d.element.IElement;
+
+/**
+ * @author Toni Kalajainen
+ */
+public interface LifeCycle extends DiagramHandler {
+
+ /**
+ * New empty diagram has spawned to the world.
+ *
+ * @param diagram
+ */
+ void onDiagramCreated(IDiagram diagram);
+
+ /**
+ * An old diagram has been restored from a other form of state
+ * (loaded or cloned).
+ *
+ * @param diagram
+ */
+ void onDiagramLoaded(IDiagram diagram, Collection<IElement> initialElements);
+
+ /**
+ * Diagram is about to be disposed
+ * @param diagram
+ */
+ void onDiagramDisposed(IDiagram diagram);
+
+ /**
+ * Diagram is about to be destoyed permanently from the world
+ * @param diagram
+ */
+ void onDiagramDestroyed(IDiagram diagram);
+
+ /**
+ * A stub implementation for {@link LifeCycle} that does not do anything.
+ * Extend this to avoid having to implement all methods.
+ */
+ public class Stub implements LifeCycle {
+ @Override
+ public void onDiagramCreated(IDiagram diagram) {
+ }
+
+ @Override
+ public void onDiagramLoaded(IDiagram diagram, Collection<IElement> initialElements) {
+ }
+
+ @Override
+ public void onDiagramDisposed(IDiagram diagram) {
+ }
+
+ @Override
+ public void onDiagramDestroyed(IDiagram diagram) {
+ }
+ }
+}