-/*******************************************************************************\r
- * Copyright (c) 2007, 2011 Association for Decentralized Information Management in\r
- * 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.modeling.ui.diagramEditor;\r
-\r
-import java.awt.geom.AffineTransform;\r
-import java.util.Collections;\r
-import java.util.Set;\r
-\r
-import org.simantics.db.Resource;\r
-import org.simantics.g2d.canvas.Hints;\r
-import org.simantics.g2d.canvas.IToolMode;\r
-\r
-/**\r
- * @author Tuukka Lehtonen\r
- */\r
-public class EditorState {\r
-\r
- public AffineTransform viewTransform;\r
-\r
- public Set<Resource> selection = Collections.emptySet();\r
-\r
- public String toolMode;\r
-\r
- public IToolMode toToolMode() {\r
- if (Hints.POINTERTOOL.getId().equals(toolMode))\r
- return Hints.POINTERTOOL;\r
- else if (Hints.PANTOOL.getId().equals(toolMode))\r
- return Hints.PANTOOL;\r
- else if (Hints.CONNECTTOOL.getId().equals(toolMode))\r
- return Hints.CONNECTTOOL;\r
- return null;\r
- }\r
-\r
-}\r
+/*******************************************************************************
+ * Copyright (c) 2007, 2011 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.modeling.ui.diagramEditor;
+
+import java.awt.geom.AffineTransform;
+import java.util.Collections;
+import java.util.Set;
+
+import org.simantics.db.Resource;
+import org.simantics.g2d.canvas.Hints;
+import org.simantics.g2d.canvas.IToolMode;
+
+/**
+ * @author Tuukka Lehtonen
+ */
+public class EditorState {
+
+ public AffineTransform viewTransform;
+
+ public Set<Resource> selection = Collections.emptySet();
+
+ public String toolMode;
+
+ public IToolMode toToolMode() {
+ if (Hints.POINTERTOOL.getId().equals(toolMode))
+ return Hints.POINTERTOOL;
+ else if (Hints.PANTOOL.getId().equals(toolMode))
+ return Hints.PANTOOL;
+ else if (Hints.CONNECTTOOL.getId().equals(toolMode))
+ return Hints.CONNECTTOOL;
+ return null;
+ }
+
+}