]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.diagram/src/org/simantics/diagram/content/ResourceTerminal.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.diagram / src / org / simantics / diagram / content / ResourceTerminal.java
index d18468b49c9f504523b5af1cd4f20ca79ef6e2b9..ccd86086e6ca51c5ef3429250a38bef644ef695b 100644 (file)
@@ -1,79 +1,79 @@
-/*******************************************************************************\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.diagram.content;\r
-\r
-import java.awt.Shape;\r
-import java.awt.geom.AffineTransform;\r
-\r
-import org.simantics.db.Resource;\r
-import org.simantics.diagram.adapter.GraphToDiagramSynchronizer;\r
-import org.simantics.g2d.diagram.handler.Topology.Terminal;\r
-import org.simantics.g2d.element.handler.impl.ObjectTerminal;\r
-import org.simantics.g2d.utils.geom.DirectionSet;\r
-import org.simantics.utils.Container;\r
-import org.simantics.utils.DataContainer;\r
-\r
-/**\r
- * A default DB resource based implementation of the g2d {@link Terminal}\r
- * interface.\r
- * \r
- * <p>\r
- * Elements that intend to contain terminal and use\r
- * {@link GraphToDiagramSynchronizer} must use this implementation to represent\r
- * the terminals of the element.\r
- * </p>\r
- * \r
- * <p>\r
- * Also contains a relative transformation with respect to its parent, a set of\r
- * allowed drawing directions and a graphical shape to depict the terminal.\r
- * </p>\r
- * \r
- * <p>\r
- * The specified terminal resource is expected to have at least the following\r
- * graph attached to it:\r
- * <pre>\r
- * specified-resource\r
- *     DIAGRAM.HasConnectionVariable\r
- *         _ : STRUCTURAL.ConnectionVariable\r
- *             STRUCTURAL.Binds TerminalRelation\r
- * </pre>\r
- * </p>\r
- * \r
- * @author Tuukka Lehtonen\r
- */\r
-public class ResourceTerminal extends ObjectTerminal {\r
-\r
-    public ResourceTerminal(Resource r, AffineTransform transform, DirectionSet ds, Container<Shape> shape) {\r
-        super(r, transform, ds, shape);\r
-    }\r
-\r
-    public ResourceTerminal(Resource r, AffineTransform transform, DirectionSet ds, Shape shape) {\r
-        super(r, transform, ds, new DataContainer<Shape>(shape));\r
-    }\r
-\r
-    public ResourceTerminal(Resource r, AffineTransform transform, DirectionSet ds) {\r
-        super(r, transform, ds);\r
-    }\r
-\r
-    public ResourceTerminal(Resource r, AffineTransform transform) {\r
-        super(r, transform);\r
-    }\r
-\r
-    public ResourceTerminal(Resource r) {\r
-        super(r, new AffineTransform());\r
-    }\r
-\r
-    public Resource getResource() {\r
-        return (Resource) getData();\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.diagram.content;
+
+import java.awt.Shape;
+import java.awt.geom.AffineTransform;
+
+import org.simantics.db.Resource;
+import org.simantics.diagram.adapter.GraphToDiagramSynchronizer;
+import org.simantics.g2d.diagram.handler.Topology.Terminal;
+import org.simantics.g2d.element.handler.impl.ObjectTerminal;
+import org.simantics.g2d.utils.geom.DirectionSet;
+import org.simantics.utils.Container;
+import org.simantics.utils.DataContainer;
+
+/**
+ * A default DB resource based implementation of the g2d {@link Terminal}
+ * interface.
+ * 
+ * <p>
+ * Elements that intend to contain terminal and use
+ * {@link GraphToDiagramSynchronizer} must use this implementation to represent
+ * the terminals of the element.
+ * </p>
+ * 
+ * <p>
+ * Also contains a relative transformation with respect to its parent, a set of
+ * allowed drawing directions and a graphical shape to depict the terminal.
+ * </p>
+ * 
+ * <p>
+ * The specified terminal resource is expected to have at least the following
+ * graph attached to it:
+ * <pre>
+ * specified-resource
+ *     DIAGRAM.HasConnectionVariable
+ *         _ : STRUCTURAL.ConnectionVariable
+ *             STRUCTURAL.Binds TerminalRelation
+ * </pre>
+ * </p>
+ * 
+ * @author Tuukka Lehtonen
+ */
+public class ResourceTerminal extends ObjectTerminal {
+
+    public ResourceTerminal(Resource r, AffineTransform transform, DirectionSet ds, Container<Shape> shape) {
+        super(r, transform, ds, shape);
+    }
+
+    public ResourceTerminal(Resource r, AffineTransform transform, DirectionSet ds, Shape shape) {
+        super(r, transform, ds, new DataContainer<Shape>(shape));
+    }
+
+    public ResourceTerminal(Resource r, AffineTransform transform, DirectionSet ds) {
+        super(r, transform, ds);
+    }
+
+    public ResourceTerminal(Resource r, AffineTransform transform) {
+        super(r, transform);
+    }
+
+    public ResourceTerminal(Resource r) {
+        super(r, new AffineTransform());
+    }
+
+    public Resource getResource() {
+        return (Resource) getData();
+    }
+
 }
\ No newline at end of file