X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fschemes%2FRNAInteractionColourScheme.java;h=86104175e25d3be505564d4f7b4284aca54b50b4;hb=7428d315297907b3bb52ddb099a348acffb87636;hp=707afd716bac05b400e1ee1aeb974090020054fa;hpb=b0cee3aaf7d8873910939f97b6acb217d518968d;p=jalview.git diff --git a/src/jalview/schemes/RNAInteractionColourScheme.java b/src/jalview/schemes/RNAInteractionColourScheme.java index 707afd7..8610417 100644 --- a/src/jalview/schemes/RNAInteractionColourScheme.java +++ b/src/jalview/schemes/RNAInteractionColourScheme.java @@ -20,6 +20,8 @@ */ package jalview.schemes; +import jalview.api.AlignViewportI; +import jalview.datamodel.AnnotatedCollectionI; import jalview.datamodel.SequenceI; import java.awt.Color; @@ -42,25 +44,12 @@ 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; @@ -77,4 +66,15 @@ public class RNAInteractionColourScheme extends ResidueColourScheme { 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(); + } }