]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.trend/src/org/simantics/trend/impl/JarisPaints.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.trend / src / org / simantics / trend / impl / JarisPaints.java
index 06e63535729deb0d3ad9aec82734c392b0203108..bcbbb9524be00f97a7a197509cfa4ca24cc3ffc1 100644 (file)
@@ -1,80 +1,80 @@
-/*******************************************************************************\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.trend.impl;\r
-\r
-import java.awt.Color;\r
-\r
-public class JarisPaints {\r
-       \r
-       public static final Color[] JarisPaintSequence;\r
-       public static final String[] JarisPaintName;\r
-\r
-       /**\r
-        * Get color. First color ( blue ) is 1.\r
-        * @param paintIndex\r
-        * @return\r
-        */\r
-       public static Color getColor( int paintIndex )\r
-       {\r
-               return JarisPaintSequence[ modulus(paintIndex-1, JarisPaintSequence.length) ];\r
-       }\r
-       \r
-       public static int modulus( int a, int b )\r
-       {\r
-               return a>=0? a%b : (((a%b)+b)%b);\r
-       }\r
-\r
-       static {\r
-           JarisPaintSequence = new Color[] {\r
-                   new Color(0.00f, 0.00f, 1.00f),\r
-                   new Color(0.00f, 0.50f, 0.00f),\r
-                   new Color(1.00f, 0.00f, 0.00f),\r
-                   new Color(0.00f, 0.75f, 0.75f),\r
-                   new Color(0.75f, 0.00f, 0.75f),\r
-                   new Color(0.40f, 0.40f, 0.00f), // Keltainen\r
-                   new Color(0.25f, 0.25f, 0.25f),\r
-                   new Color(0.75f, 0.25f, 0.25f),\r
-                   new Color(0.75f, 0.75f, 0.00f), // Kirkkaampi keltainen\r
-                   new Color(0.25f, 0.25f, 0.75f),\r
-                   new Color(0.58f, 0.58f, 0.58f),\r
-                   new Color(0.00f, 1.00f, 0.00f),\r
-                   new Color(0.76f, 0.57f, 0.17f),\r
-                   new Color(0.54f, 0.63f, 0.22f),\r
-                   new Color(0.80f, 0.52f, 0.85f),\r
-                   new Color(0.10f, 0.49f, 0.47f),\r
-                   new Color(0.66f, 0.34f, 0.65f),\r
-                   new Color(0.99f, 0.41f, 0.23f)\r
-           };\r
-           JarisPaintName = new String[] {\r
-                   Messages.JarisPaints_0,\r
-                   Messages.JarisPaints_1,\r
-                   Messages.JarisPaints_2,\r
-                   Messages.JarisPaints_3,\r
-                   Messages.JarisPaints_4,\r
-                   Messages.JarisPaints_5,\r
-                   Messages.JarisPaints_6,\r
-                   Messages.JarisPaints_7,\r
-                   Messages.JarisPaints_8,\r
-                   Messages.JarisPaints_9,\r
-                   Messages.JarisPaints_10,\r
-                   Messages.JarisPaints_11,\r
-                   Messages.JarisPaints_12,\r
-                   Messages.JarisPaints_13,\r
-                   Messages.JarisPaints_14,\r
-                   Messages.JarisPaints_15,\r
-                   Messages.JarisPaints_16,\r
-                   Messages.JarisPaints_17\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.trend.impl;
+
+import java.awt.Color;
+
+public class JarisPaints {
+       
+       public static final Color[] JarisPaintSequence;
+       public static final String[] JarisPaintName;
+
+       /**
+        * Get color. First color ( blue ) is 1.
+        * @param paintIndex
+        * @return
+        */
+       public static Color getColor( int paintIndex )
+       {
+               return JarisPaintSequence[ modulus(paintIndex-1, JarisPaintSequence.length) ];
+       }
+       
+       public static int modulus( int a, int b )
+       {
+               return a>=0? a%b : (((a%b)+b)%b);
+       }
+
+       static {
+           JarisPaintSequence = new Color[] {
+                   new Color(0.00f, 0.00f, 1.00f),
+                   new Color(0.00f, 0.50f, 0.00f),
+                   new Color(1.00f, 0.00f, 0.00f),
+                   new Color(0.00f, 0.75f, 0.75f),
+                   new Color(0.75f, 0.00f, 0.75f),
+                   new Color(0.40f, 0.40f, 0.00f), // Keltainen
+                   new Color(0.25f, 0.25f, 0.25f),
+                   new Color(0.75f, 0.25f, 0.25f),
+                   new Color(0.75f, 0.75f, 0.00f), // Kirkkaampi keltainen
+                   new Color(0.25f, 0.25f, 0.75f),
+                   new Color(0.58f, 0.58f, 0.58f),
+                   new Color(0.00f, 1.00f, 0.00f),
+                   new Color(0.76f, 0.57f, 0.17f),
+                   new Color(0.54f, 0.63f, 0.22f),
+                   new Color(0.80f, 0.52f, 0.85f),
+                   new Color(0.10f, 0.49f, 0.47f),
+                   new Color(0.66f, 0.34f, 0.65f),
+                   new Color(0.99f, 0.41f, 0.23f)
+           };
+           JarisPaintName = new String[] {
+                   Messages.JarisPaints_0,
+                   Messages.JarisPaints_1,
+                   Messages.JarisPaints_2,
+                   Messages.JarisPaints_3,
+                   Messages.JarisPaints_4,
+                   Messages.JarisPaints_5,
+                   Messages.JarisPaints_6,
+                   Messages.JarisPaints_7,
+                   Messages.JarisPaints_8,
+                   Messages.JarisPaints_9,
+                   Messages.JarisPaints_10,
+                   Messages.JarisPaints_11,
+                   Messages.JarisPaints_12,
+                   Messages.JarisPaints_13,
+                   Messages.JarisPaints_14,
+                   Messages.JarisPaints_15,
+                   Messages.JarisPaints_16,
+                   Messages.JarisPaints_17
+           };  
+           
+       }
+
+}