]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.g2d/src/org/simantics/g2d/element/handler/impl/proxy/ProxyHandler.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.g2d / src / org / simantics / g2d / element / handler / impl / proxy / ProxyHandler.java
index 109ed1ab83dc328db4ef64f4154ef79370de4bbe..5dc5cec73fd07246ba1ef15fdb90745d1a867827 100644 (file)
@@ -1,88 +1,88 @@
-/*******************************************************************************\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.impl.proxy;\r
-\r
-import java.util.ArrayList;\r
-import java.util.List;\r
-\r
-import org.simantics.g2d.element.ElementClass;\r
-import org.simantics.g2d.element.handler.AdditionalColor;\r
-import org.simantics.g2d.element.handler.BendsHandler;\r
-import org.simantics.g2d.element.handler.BorderColor;\r
-import org.simantics.g2d.element.handler.Clickable;\r
-import org.simantics.g2d.element.handler.EdgeVisuals;\r
-import org.simantics.g2d.element.handler.ElementAdapter;\r
-import org.simantics.g2d.element.handler.ElementHandler;\r
-import org.simantics.g2d.element.handler.FillColor;\r
-import org.simantics.g2d.element.handler.HandleMouseEvent;\r
-import org.simantics.g2d.element.handler.Heartbeat;\r
-import org.simantics.g2d.element.handler.InternalSize;\r
-import org.simantics.g2d.element.handler.LifeCycle;\r
-import org.simantics.g2d.element.handler.Move;\r
-import org.simantics.g2d.element.handler.Outline;\r
-import org.simantics.g2d.element.handler.Pick;\r
-import org.simantics.g2d.element.handler.Resize;\r
-import org.simantics.g2d.element.handler.Rotate;\r
-import org.simantics.g2d.element.handler.Scale;\r
-import org.simantics.g2d.element.handler.Stateful;\r
-import org.simantics.g2d.element.handler.TerminalLayout;\r
-import org.simantics.g2d.element.handler.TerminalTopology;\r
-import org.simantics.g2d.element.handler.Text;\r
-import org.simantics.g2d.element.handler.TextColor;\r
-import org.simantics.g2d.element.handler.Transform;\r
-import org.simantics.g2d.element.handler.Validator;\r
-\r
-/**\r
- * @author Toni Kalajainen\r
- */\r
-public class ProxyHandler {\r
-\r
-    public static ElementClass getProxyClass(ElementClass clazz, IProxyProvider prov)\r
-    {\r
-        List<ElementHandler> result = new ArrayList<ElementHandler>();\r
-        for (ElementHandler eh : clazz.getAll())\r
-        {\r
-            addProxyElementHandlers(eh, prov, result);\r
-            result.add(eh);\r
-        }\r
-        return ElementClass.compile(result);\r
-    }\r
-\r
-    public static void addProxyElementHandlers(ElementHandler eh, IProxyProvider prov, List<ElementHandler> result)\r
-    {\r
-        if (eh instanceof Move) result.add(new ProxyMove(prov, (Move)eh));\r
-        if (eh instanceof Stateful) result.add(new ProxyEnabled(prov, (Stateful)eh));\r
-        if (eh instanceof Clickable) result.add(new ProxyClickable(prov, (Clickable)eh));\r
-        if (eh instanceof InternalSize) result.add( new ProxyBounds(prov, (InternalSize)eh) );\r
-        if (eh instanceof Resize) result.add( new ProxyResize(prov, (Resize)eh) );\r
-        if (eh instanceof Outline) result.add( new ProxyElementShape(prov, (Outline)eh) );\r
-        if (eh instanceof FillColor) result.add(new ProxyFillColor(prov, (FillColor)eh));\r
-        if (eh instanceof BorderColor) result.add(new ProxyBorderColor(prov, (BorderColor)eh));\r
-        if (eh instanceof TextColor) result.add(new ProxyTextColor(prov, (TextColor)eh));\r
-        if (eh instanceof AdditionalColor) result.add(new ProxyAdditionalColor(prov, (AdditionalColor)eh));\r
-        if (eh instanceof BendsHandler) result.add(new ProxyEdgeBends(prov, (BendsHandler)eh));\r
-        if (eh instanceof EdgeVisuals) result.add(new ProxyEdgeVisuals(prov, (EdgeVisuals)eh));\r
-        if (eh instanceof ElementAdapter) result.add(new ProxyElementAdapter(prov, (ElementAdapter)eh));\r
-        if (eh instanceof HandleMouseEvent) result.add(new ProxyHandleMouseEvent(prov, (HandleMouseEvent)eh));\r
-        if (eh instanceof LifeCycle) result.add(new ProxyLifeCycle(prov, (LifeCycle)eh));\r
-        if (eh instanceof TerminalTopology) result.add(new ProxyNode(prov, (TerminalTopology)eh));\r
-        if (eh instanceof Pick) result.add(new ProxyPick(prov, (Pick)eh));\r
-        if (eh instanceof Rotate) result.add(new ProxyRotate(prov, (Rotate)eh));\r
-        if (eh instanceof Scale) result.add(new ProxyScale(prov, (Scale)eh));\r
-        if (eh instanceof TerminalLayout) result.add(new ProxyTerminalHandler(prov, (TerminalLayout)eh));\r
-        if (eh instanceof Text) result.add(new ProxyText(prov, (Text)eh));\r
-        if (eh instanceof Transform) result.add(new ProxyTransform(prov, (Transform)eh));\r
-        if (eh instanceof Validator) result.add(new ProxyValidator(prov, (Validator)eh));\r
-        if (eh instanceof Heartbeat) result.add(new ProxyHeartbeat(prov, (Heartbeat)eh));\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.element.handler.impl.proxy;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.simantics.g2d.element.ElementClass;
+import org.simantics.g2d.element.handler.AdditionalColor;
+import org.simantics.g2d.element.handler.BendsHandler;
+import org.simantics.g2d.element.handler.BorderColor;
+import org.simantics.g2d.element.handler.Clickable;
+import org.simantics.g2d.element.handler.EdgeVisuals;
+import org.simantics.g2d.element.handler.ElementAdapter;
+import org.simantics.g2d.element.handler.ElementHandler;
+import org.simantics.g2d.element.handler.FillColor;
+import org.simantics.g2d.element.handler.HandleMouseEvent;
+import org.simantics.g2d.element.handler.Heartbeat;
+import org.simantics.g2d.element.handler.InternalSize;
+import org.simantics.g2d.element.handler.LifeCycle;
+import org.simantics.g2d.element.handler.Move;
+import org.simantics.g2d.element.handler.Outline;
+import org.simantics.g2d.element.handler.Pick;
+import org.simantics.g2d.element.handler.Resize;
+import org.simantics.g2d.element.handler.Rotate;
+import org.simantics.g2d.element.handler.Scale;
+import org.simantics.g2d.element.handler.Stateful;
+import org.simantics.g2d.element.handler.TerminalLayout;
+import org.simantics.g2d.element.handler.TerminalTopology;
+import org.simantics.g2d.element.handler.Text;
+import org.simantics.g2d.element.handler.TextColor;
+import org.simantics.g2d.element.handler.Transform;
+import org.simantics.g2d.element.handler.Validator;
+
+/**
+ * @author Toni Kalajainen
+ */
+public class ProxyHandler {
+
+    public static ElementClass getProxyClass(ElementClass clazz, IProxyProvider prov)
+    {
+        List<ElementHandler> result = new ArrayList<ElementHandler>();
+        for (ElementHandler eh : clazz.getAll())
+        {
+            addProxyElementHandlers(eh, prov, result);
+            result.add(eh);
+        }
+        return ElementClass.compile(result);
+    }
+
+    public static void addProxyElementHandlers(ElementHandler eh, IProxyProvider prov, List<ElementHandler> result)
+    {
+        if (eh instanceof Move) result.add(new ProxyMove(prov, (Move)eh));
+        if (eh instanceof Stateful) result.add(new ProxyEnabled(prov, (Stateful)eh));
+        if (eh instanceof Clickable) result.add(new ProxyClickable(prov, (Clickable)eh));
+        if (eh instanceof InternalSize) result.add( new ProxyBounds(prov, (InternalSize)eh) );
+        if (eh instanceof Resize) result.add( new ProxyResize(prov, (Resize)eh) );
+        if (eh instanceof Outline) result.add( new ProxyElementShape(prov, (Outline)eh) );
+        if (eh instanceof FillColor) result.add(new ProxyFillColor(prov, (FillColor)eh));
+        if (eh instanceof BorderColor) result.add(new ProxyBorderColor(prov, (BorderColor)eh));
+        if (eh instanceof TextColor) result.add(new ProxyTextColor(prov, (TextColor)eh));
+        if (eh instanceof AdditionalColor) result.add(new ProxyAdditionalColor(prov, (AdditionalColor)eh));
+        if (eh instanceof BendsHandler) result.add(new ProxyEdgeBends(prov, (BendsHandler)eh));
+        if (eh instanceof EdgeVisuals) result.add(new ProxyEdgeVisuals(prov, (EdgeVisuals)eh));
+        if (eh instanceof ElementAdapter) result.add(new ProxyElementAdapter(prov, (ElementAdapter)eh));
+        if (eh instanceof HandleMouseEvent) result.add(new ProxyHandleMouseEvent(prov, (HandleMouseEvent)eh));
+        if (eh instanceof LifeCycle) result.add(new ProxyLifeCycle(prov, (LifeCycle)eh));
+        if (eh instanceof TerminalTopology) result.add(new ProxyNode(prov, (TerminalTopology)eh));
+        if (eh instanceof Pick) result.add(new ProxyPick(prov, (Pick)eh));
+        if (eh instanceof Rotate) result.add(new ProxyRotate(prov, (Rotate)eh));
+        if (eh instanceof Scale) result.add(new ProxyScale(prov, (Scale)eh));
+        if (eh instanceof TerminalLayout) result.add(new ProxyTerminalHandler(prov, (TerminalLayout)eh));
+        if (eh instanceof Text) result.add(new ProxyText(prov, (Text)eh));
+        if (eh instanceof Transform) result.add(new ProxyTransform(prov, (Transform)eh));
+        if (eh instanceof Validator) result.add(new ProxyValidator(prov, (Validator)eh));
+        if (eh instanceof Heartbeat) result.add(new ProxyHeartbeat(prov, (Heartbeat)eh));
+    }
+
+}