JAL-3127 pass reference to AlignViewportI when creating an instance of ColourSchemeI
[jalview.git] / src / jalview / schemes / CovariationColourScheme.java
index 923bd85..41acef3 100644 (file)
@@ -20,6 +20,7 @@
  */
 package jalview.schemes;
 
+import jalview.api.AlignViewportI;
 import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.AnnotatedCollectionI;
 import jalview.datamodel.SequenceCollectionI;
@@ -38,9 +39,9 @@ import java.util.Map;
  */
 public class CovariationColourScheme extends ResidueColourScheme
 {
-  public Map<String, Color> helixcolorhash = new Hashtable<String, Color>();
+  public Map<String, Color> helixcolorhash = new Hashtable<>();
 
-  public Map<Integer, String> positionsToHelix = new Hashtable<Integer, String>();
+  public Map<Integer, String> positionsToHelix = new Hashtable<>();
 
   int numHelix = 0;
 
@@ -51,7 +52,8 @@ public class CovariationColourScheme extends ResidueColourScheme
    * be coloured
    */
   @Override
-  public ColourSchemeI getInstance(AnnotatedCollectionI coll,
+  public ColourSchemeI getInstance(AlignViewportI view,
+          AnnotatedCollectionI coll,
           Map<SequenceI, SequenceCollectionI> hrs)
   {
     return new CovariationColourScheme(coll.getAlignmentAnnotation()[0]);