X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fschemes%2FRNAInteractionColourScheme.java;h=86104175e25d3be505564d4f7b4284aca54b50b4;hb=13f232d8ecdc2665be8239a4049022127ea8399e;hp=db1401ab9df7e2f0da1909b7855ebd01958a0fcb;hpb=65a73bdab9f97cadab54162fbbe53ba9f1d3f3be;p=jalview.git diff --git a/src/jalview/schemes/RNAInteractionColourScheme.java b/src/jalview/schemes/RNAInteractionColourScheme.java index db1401a..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,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(); + } }