JAL-2371 CollectionColourScheme wraps ColourSchemeI
[jalview.git] / examples / groovy / colourSchemes.groovy
index 84eabbf..27e179b 100644 (file)
@@ -2,7 +2,6 @@ import java.awt.Color;
 import jalview.schemes.ResidueColourScheme;
 import jalview.schemes.ColourSchemes;
 import jalview.datamodel.AnnotatedCollectionI;
-import java.util.Map;
 import jalview.datamodel.SequenceI;
 
 /*
@@ -17,13 +16,8 @@ class Stripy extends ResidueColourScheme {
     Stripy() { }
     String getSchemeName() { "stripy" }
     Stripy getInstance(AnnotatedCollectionI coll, Map map) { new Stripy() }
-    Color findColour(char res, int col, SequenceI seq) {
-      // determine the colour
-      Color colour = findColour(res, col)
-      // let Jalview apply conservation or consensus shading
-      adjustColour(res, col, colour);
-    }
-    Color findColour(char res, int col) {
+    Color findColour(char res, int col, SequenceI seq) 
+    {
         if (res == ' ' || res == '-' || res == '.') 
         {
             Color.yellow
@@ -48,17 +42,13 @@ class ByWeight extends ResidueColourScheme {
     boolean isPeptideSpecific() {true}
     String getSchemeName() { "By Weight" }
     ByWeight getInstance(AnnotatedCollectionI coll, Map map) { new ByWeight() }
-    Color makeColour(int weight) {
+    Color makeColour(int weight) 
+    {
       int i = 255 * (weight - min) / (max - min);
       new Color(i, 0, i);
     }
-    Color findColour(char res, int col, SequenceI seq) {
-      // determine the colour
-      Color colour = findColour(res, col)
-      // let Jalview apply any conservation or consensus shading
-      adjustColour(res, col, colour);
-    }
-    Color findColour(char res, int col) {
+    Color findColour(char res, int col, SequenceI seq) 
+    {
         switch (res) {
           case ' ':
           case '-':