]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.g2d/src/org/simantics/g2d/participant/CanvasGrab.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.g2d / src / org / simantics / g2d / participant / CanvasGrab.java
index 7ca15a8a61ed0775fb35dae4bf3664e5f52cc1c1..f0d0ac934f91629a3c8a9458f0265dc9aefe34e3 100644 (file)
@@ -1,63 +1,63 @@
-/*******************************************************************************\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.participant;\r
-\r
-import java.awt.geom.Point2D;\r
-import java.util.HashMap;\r
-import java.util.Map;\r
-\r
-import org.simantics.g2d.canvas.impl.AbstractCanvasParticipant;\r
-import org.simantics.g2d.canvas.impl.DependencyReflection.Dependency;\r
-\r
-/**\r
- * Participant that enables grabbing of canvas.\r
- * \r
- * @See {@link HandPainter} Paints grabbing of canvas\r
- * @author Toni Kalajainen\r
- */\r
-public class CanvasGrab extends AbstractCanvasParticipant {\r
-\r
-       @Dependency TransformUtil util;\r
-       \r
-    public Map<Integer, PointerInfo> grabInfo = new HashMap<Integer, PointerInfo>();\r
-    \r
-    public PointerInfo grabCanvas(int id, Point2D pos)\r
-    {          \r
-       PointerInfo result = new PointerInfo(pos, id);\r
-        result.currentPos = pos;        \r
-        grabInfo.put(id, result);        \r
-       return result;\r
-    }\r
-    \r
-    public void releaseCanvas(int id)\r
-    {\r
-       grabInfo.remove(id);\r
-    }\r
-       \r
-    /** Info of pointers with left button down */\r
-    public static final class PointerInfo {\r
-        public final int mouseId;\r
-        // Anchoring position in control coordinates \r
-        public Point2D anchorPos;\r
-        public Point2D currentPos;\r
-        public PointerInfo(Point2D anchorPos, int mouseId) {\r
-            this.anchorPos = anchorPos;\r
-            this.mouseId = mouseId;\r
-        }       \r
-    }\r
-    \r
-    public Map<Integer, PointerInfo> getGrabInfo()\r
-    {\r
-       return grabInfo;\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.participant;
+
+import java.awt.geom.Point2D;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.simantics.g2d.canvas.impl.AbstractCanvasParticipant;
+import org.simantics.g2d.canvas.impl.DependencyReflection.Dependency;
+
+/**
+ * Participant that enables grabbing of canvas.
+ * 
+ * @See {@link HandPainter} Paints grabbing of canvas
+ * @author Toni Kalajainen
+ */
+public class CanvasGrab extends AbstractCanvasParticipant {
+
+       @Dependency TransformUtil util;
+       
+    public Map<Integer, PointerInfo> grabInfo = new HashMap<Integer, PointerInfo>();
+    
+    public PointerInfo grabCanvas(int id, Point2D pos)
+    {          
+       PointerInfo result = new PointerInfo(pos, id);
+        result.currentPos = pos;        
+        grabInfo.put(id, result);        
+       return result;
+    }
+    
+    public void releaseCanvas(int id)
+    {
+       grabInfo.remove(id);
+    }
+       
+    /** Info of pointers with left button down */
+    public static final class PointerInfo {
+        public final int mouseId;
+        // Anchoring position in control coordinates 
+        public Point2D anchorPos;
+        public Point2D currentPos;
+        public PointerInfo(Point2D anchorPos, int mouseId) {
+            this.anchorPos = anchorPos;
+            this.mouseId = mouseId;
+        }       
+    }
+    
+    public Map<Integer, PointerInfo> getGrabInfo()
+    {
+       return grabInfo;
+    }
+       
+}