Add only colours that currently work
authoramwaterhouse <Andrew Waterhouse>
Tue, 16 Nov 2004 15:27:06 +0000 (15:27 +0000)
committeramwaterhouse <Andrew Waterhouse>
Tue, 16 Nov 2004 15:27:06 +0000 (15:27 +0000)
src/jalview/schemes/ColourProperties.java

index ff2c6bc..ae6cd1e 100755 (executable)
@@ -34,30 +34,10 @@ public class ColourProperties {
                                               prefix + "TaylorColourScheme",\r
                                               "Taylor colours"));\r
 \r
-    colourSchemes.add(new ColourSchemeProperty("PID",\r
-                                              prefix + "PIDColourScheme",\r
-                                              "By PID"));\r
-\r
-    colourSchemes.add(new ColourSchemeProperty("BLOSUM62",\r
-                                              prefix + "Blosum62ColourScheme",\r
-                                              "By BLOSUM62 Score"));\r
-\r
-    colourSchemes.add(new ColourSchemeProperty("Secondary structure",\r
-                                              prefix + "SecondaryColourScheme",\r
-                                              "By Secondary Structure"));\r
-\r
-    colourSchemes.add(new ColourSchemeProperty("User defined",\r
-                                              prefix + "ZappoColourScheme",\r
-                                              "User defined colours"));\r
-\r
     colourSchemes.add(new ColourSchemeProperty("Hydrophobic",\r
                                               prefix + "HydrophobicColourScheme",\r
                                               "By Hydrophobicity"));\r
 \r
-   colourSchemes.add(new ColourSchemeProperty("Conservation",\r
-                                                   prefix + "ZappoColourScheme",\r
-                                                   null));\r
-\r
     colourSchemes.add(new ColourSchemeProperty("Helix",\r
                                               prefix + "HelixColourScheme",\r
                                               "Helix propensity"));\r
@@ -74,13 +54,33 @@ public class ColourProperties {
                                               prefix + "BuriedColourScheme",\r
                                               "Buried index"));\r
 \r
-    //    colourSchemes.add(new ColourSchemeProperty("Features",\r
-    //                                               prefix + "FeatureColourScheme",\r
-    //                                               null));\r
+    colourSchemes.add(new ColourSchemeProperty("BLOSUM62",\r
+                                            prefix + "Blosum62ColourScheme",\r
+                                            "By BLOSUM62 Score"));\r
+\r
+   colourSchemes.add(new ColourSchemeProperty("User defined",\r
+                                            prefix + "ZappoColourScheme",\r
+                                            "User defined colours"));\r
+\r
+    /*   colourSchemes.add(new ColourSchemeProperty("PID",\r
+                                                  prefix + "PIDColourScheme",\r
+                                                  "By PID"));*/\r
+\r
+  /*  colourSchemes.add(new ColourSchemeProperty("Secondary structure",\r
+                                               prefix + "SecondaryColourScheme",\r
+                                               "By Secondary Structure"));*/\r
+\r
+  /* colourSchemes.add(new ColourSchemeProperty("Conservation",\r
+                                                   prefix + "ZappoColourScheme",\r
+                                                   null));*/\r
+\r
+    /*  colourSchemes.add(new ColourSchemeProperty("Features",\r
+                                                   prefix + "FeatureColourScheme",\r
+                                                   null));\r
 \r
     colourSchemes.add(new ColourSchemeProperty("Clustalx",\r
                                                prefix + "ClustalXColourScheme",\r
-                                               "ClustalX colours"));\r
+                                               "ClustalX colours"));*/\r
   }\r
 \r
   static int indexOf(String scheme) {\r
@@ -91,7 +91,7 @@ public class ColourProperties {
     }\r
   }\r
 \r
-  static int indexOfClass(ColourSchemeI scheme) {\r
+  public static int indexOfClass(ColourSchemeI scheme) {\r
     return colourSchemes.indexOfClass(scheme);\r
   }\r
 \r
@@ -114,6 +114,31 @@ public class ColourProperties {
   protected static String getDefaultClassPrefix() {\r
     return "jalview.schemes.";\r
   }\r
+\r
+  public static ColourSchemeI getColourScheme(int i)\r
+  {\r
+    switch(i)\r
+    {\r
+        case ColourProperties.HYDROPHOBIC: return new HydrophobicColourScheme();\r
+\r
+        case  ColourProperties.TAYLOR:   return new TaylorColourScheme();\r
+        case  ColourProperties.HELIX:    return new HelixColourScheme();\r
+        case  ColourProperties.STRAND:   return new StrandColourScheme();\r
+        case  ColourProperties.TURN:     return new TurnColourScheme();\r
+        case  ColourProperties.BURIED:   return new BuriedColourScheme();\r
+        case  ColourProperties.PID:      return new PIDColourScheme();\r
+        case  ColourProperties.BLOSUM62: return new Blosum62ColourScheme(null);\r
+        case  ColourProperties.SECONDARY:return new SecondaryColourScheme();\r
+\r
+        case  ColourProperties.ZAPPO:\r
+        case  ColourProperties.USER:\r
+        case  ColourProperties.CONSERVATION:\r
+        case  ColourProperties.FEATURES:\r
+        case  ColourProperties.CLUSTALX:\r
+       default: return new ZappoColourScheme();\r
+    }\r
+\r
+  }\r
 }\r
 \r
 \r