JAL-3210 next attempts to use goomph (a gradle eclipse-as-disposable-build-artifact...
[jalview.git] / src / jalview / schemes / RNAHelicesColour.java
index dbc9c03..c61eeed 100644 (file)
@@ -20,6 +20,7 @@
  */
 package jalview.schemes;
 
+import jalview.api.AlignViewportI;
 import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.AnnotatedCollectionI;
@@ -45,7 +46,7 @@ public class RNAHelicesColour extends ResidueColourScheme
    * Maps sequence positions to the RNA helix they belong to. Key: position,
    * Value: helix TODO: Revise or drop in favour of annotation position numbers
    */
-  public Hashtable<Integer, String> positionsToHelix = new Hashtable<Integer, String>();
+  public Hashtable<Integer, String> positionsToHelix = new Hashtable<>();
 
   /**
    * Number of helices in the RNA secondary structure
@@ -69,14 +70,14 @@ public class RNAHelicesColour extends ResidueColourScheme
   {
     super(ResidueProperties.nucleotideIndex);
     this.annotation = annotation;
-    ColourSchemeProperty.resetRnaHelicesShading();
+    ColourSchemes.resetRnaHelicesShading();
     refresh();
   }
 
   public RNAHelicesColour(AnnotatedCollectionI alignment)
   {
     super(ResidueProperties.nucleotideIndex);
-    ColourSchemeProperty.resetRnaHelicesShading();
+    ColourSchemes.resetRnaHelicesShading();
     alignmentChanged(alignment, null);
   }
 
@@ -132,7 +133,7 @@ public class RNAHelicesColour extends ResidueColourScheme
       annotation.getRNAStruc();
       lastrefresh = annotation._rnasecstr.hashCode();
       numHelix = 0;
-      positionsToHelix = new Hashtable<Integer, String>();
+      positionsToHelix = new Hashtable<>();
 
       // Figure out number of helices
       // Length of rnasecstr is the number of pairs of positions that base pair
@@ -159,7 +160,7 @@ public class RNAHelicesColour extends ResidueColourScheme
         }
 
       }
-      ColourSchemeProperty.initRnaHelicesShading(numHelix);
+      ColourSchemes.initRnaHelicesShading(numHelix);
     }
   }
 
@@ -199,15 +200,15 @@ public class RNAHelicesColour extends ResidueColourScheme
     currentHelix = positionsToHelix.get(j);
     if (currentHelix != null)
     {
-      currentColour = ColourSchemeProperty.rnaHelices[Integer
+      currentColour = ColourSchemes.getInstance().rnaHelices[Integer
               .parseInt(currentHelix)];
     }
     return currentColour;
   }
 
   @Override
-  public ColourSchemeI getInstance(AnnotatedCollectionI sg,
-          Map<SequenceI, SequenceCollectionI> hiddenRepSequences)
+  public ColourSchemeI getInstance(AlignViewportI view,
+          AnnotatedCollectionI sg)
   {
     return new RNAHelicesColour(sg);
   }