Merge branch 'develop' into merge/JAL-3127
[jalview.git] / src / jalview / schemes / RNAInteractionColourScheme.java
index db1401a..8610417 100644 (file)
@@ -20,6 +20,8 @@
  */
 package jalview.schemes;
 
+import jalview.api.AlignViewportI;
+import jalview.datamodel.AnnotatedCollectionI;
 import jalview.datamodel.SequenceI;
 
 import java.awt.Color;
@@ -42,27 +44,37 @@ public class RNAInteractionColourScheme extends ResidueColourScheme
   public Color findColour(char c, int j, SequenceI seq)
   {
     // FIXME this is just a copy of NucleotideColourScheme
-    Color currentColour;
-    if ((threshold == 0) || aboveThreshold(c, j))
+    Color currentColour = Color.white;
+    try
     {
-      try
-      {
-        currentColour = colors[ResidueProperties.nucleotideIndex[c]];
-      } catch (Exception ex)
-      {
-        return Color.white;
-      }
-    }
-    else
-    {
-      return Color.white;
-    }
-
-    if (conservationColouring)
+      currentColour = colors[ResidueProperties.nucleotideIndex[c]];
+    } catch (Exception ex)
     {
-      currentColour = applyConservation(currentColour, j);
     }
 
     return currentColour;
   }
+
+  @Override
+  public boolean isNucleotideSpecific()
+  {
+    return true;
+  }
+
+  @Override
+  public String getSchemeName()
+  {
+    return "RNA Interaction type";
+  }
+
+  /**
+   * Returns a new instance of this colour scheme with which the given data may
+   * be coloured
+   */
+  @Override
+  public ColourSchemeI getInstance(AlignViewportI view,
+          AnnotatedCollectionI coll)
+  {
+    return new RNAInteractionColourScheme();
+  }
 }