X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fschemes%2FCovariationColourScheme.java;h=6cb095b32e8795a3237e21104bed3fa02384da1f;hb=refs%2Fheads%2Fbug%2FJAL-2256;hp=ee78317bdde2e51dcd626546e8cb399055783660;hpb=94379c810f9115b8564ee7bac46ed119218d5fd2;p=jalview.git diff --git a/src/jalview/schemes/CovariationColourScheme.java b/src/jalview/schemes/CovariationColourScheme.java index ee78317..6cb095b 100644 --- a/src/jalview/schemes/CovariationColourScheme.java +++ b/src/jalview/schemes/CovariationColourScheme.java @@ -24,6 +24,7 @@ import jalview.datamodel.AlignmentAnnotation; import jalview.datamodel.AnnotatedCollectionI; import jalview.datamodel.SequenceCollectionI; import jalview.datamodel.SequenceI; +import jalview.util.ColorUtils; import java.awt.Color; import java.util.Hashtable; @@ -37,9 +38,9 @@ import java.util.Map; */ public class CovariationColourScheme extends ResidueColourScheme { - public Hashtable helixcolorhash = new Hashtable(); + public Map helixcolorhash = new Hashtable(); - public Hashtable positionsToHelix = new Hashtable(); + public Map positionsToHelix = new Hashtable(); int numHelix = 0; @@ -86,8 +87,8 @@ public class CovariationColourScheme extends ResidueColourScheme for (int j = 0; j <= numHelix; j++) { - helixcolorhash.put(Integer.toString(j), - jalview.util.ColorUtils.generateRandomColor(Color.white)); + helixcolorhash.put(String.valueOf(j), + ColorUtils.generateRandomColor(Color.white)); } } @@ -124,12 +125,12 @@ public class CovariationColourScheme extends ResidueColourScheme Color currentColour = Color.white; String currentHelix = null; // System.out.println(c + " " + j); - currentHelix = (String) positionsToHelix.get(j); + currentHelix = positionsToHelix.get(j); // System.out.println(positionsToHelix.get(j)); if (currentHelix != null) { - currentColour = (Color) helixcolorhash.get(currentHelix); + currentColour = helixcolorhash.get(currentHelix); } // System.out.println(c + " " + j + " helix " + currentHelix + " " + @@ -148,4 +149,10 @@ public class CovariationColourScheme extends ResidueColourScheme { return "Covariation"; } + + @Override + public boolean isSimple() + { + return false; + } }