]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.ui/src/org/simantics/ui/colors/RGBAdapter.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.ui / src / org / simantics / ui / colors / RGBAdapter.java
index fab078d8267782e1605933f2d4d9d5a5b4577468..86e249e622a7ecfab0362ba63ef72bbc562b5bd8 100644 (file)
@@ -1,53 +1,53 @@
-/*******************************************************************************\r
- * Copyright (c) 2007, 2011 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.ui.colors;\r
-\r
-import org.eclipse.swt.graphics.RGB;\r
-import org.simantics.databoard.Bindings;\r
-import org.simantics.databoard.binding.Binding;\r
-import org.simantics.db.AsyncReadGraph;\r
-import org.simantics.db.Resource;\r
-import org.simantics.db.common.adaption.ResourceAdapter;\r
-import org.simantics.db.procedure.AsyncProcedure;\r
-\r
-public class RGBAdapter implements ResourceAdapter<RGB> {\r
-\r
-    public static class RGBDouble {\r
-        public double red;\r
-        public double green;\r
-        public double blue;\r
-    }\r
-\r
-    public static final Binding BINDING = Bindings.getBindingUnchecked(RGBDouble.class);\r
-\r
-    @Override\r
-    public void adapt(AsyncReadGraph g, Resource source, Resource r, final AsyncProcedure<RGB> procedure) {\r
-        g.forValue(r, BINDING, new AsyncProcedure<RGBDouble>() {\r
-            @Override\r
-            public void execute(AsyncReadGraph graph, RGBDouble result) {\r
-                procedure.execute(graph, \r
-                        new RGB(\r
-                                (int)(result.red*255.0),\r
-                                (int)(result.green*255.0),\r
-                                (int)(result.blue*255.0)\r
-                        )\r
-                );\r
-            }\r
-\r
-            @Override\r
-            public void exception(AsyncReadGraph graph, Throwable throwable) {\r
-                procedure.exception(graph, throwable);\r
-            }\r
-        });\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.ui.colors;
+
+import org.eclipse.swt.graphics.RGB;
+import org.simantics.databoard.Bindings;
+import org.simantics.databoard.binding.Binding;
+import org.simantics.db.AsyncReadGraph;
+import org.simantics.db.Resource;
+import org.simantics.db.common.adaption.ResourceAdapter;
+import org.simantics.db.procedure.AsyncProcedure;
+
+public class RGBAdapter implements ResourceAdapter<RGB> {
+
+    public static class RGBDouble {
+        public double red;
+        public double green;
+        public double blue;
+    }
+
+    public static final Binding BINDING = Bindings.getBindingUnchecked(RGBDouble.class);
+
+    @Override
+    public void adapt(AsyncReadGraph g, Resource source, Resource r, final AsyncProcedure<RGB> procedure) {
+        g.forValue(r, BINDING, new AsyncProcedure<RGBDouble>() {
+            @Override
+            public void execute(AsyncReadGraph graph, RGBDouble result) {
+                procedure.execute(graph, 
+                        new RGB(
+                                (int)(result.red*255.0),
+                                (int)(result.green*255.0),
+                                (int)(result.blue*255.0)
+                        )
+                );
+            }
+
+            @Override
+            public void exception(AsyncReadGraph graph, Throwable throwable) {
+                procedure.exception(graph, throwable);
+            }
+        });
+    }
+
+}