X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fschemes%2FRNAHelicesColour.java;h=57fcba562eb7ff083a9bc245f01b4e54f8797a7a;hb=ad15cff29620f960119f80176f1fd443da9f6763;hp=46fa626882f61e7ae050fb1955f6cb0295512d7e;hpb=47168f025aefdaa044802bd5f8f510ffe43a4808;p=jalview.git diff --git a/src/jalview/schemes/RNAHelicesColour.java b/src/jalview/schemes/RNAHelicesColour.java index 46fa626..57fcba5 100644 --- a/src/jalview/schemes/RNAHelicesColour.java +++ b/src/jalview/schemes/RNAHelicesColour.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2) - * Copyright (C) 2014 The Jalview Authors + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors * * This file is part of Jalview. * @@ -67,6 +67,7 @@ public class RNAHelicesColour extends ResidueColourScheme this.annotation = annotation; refresh(); } + public RNAHelicesColour(AnnotatedCollectionI alignment) { super(ResidueProperties.nucleotideIndex); @@ -79,28 +80,31 @@ public class RNAHelicesColour extends ResidueColourScheme { // This loop will find the first rna structure annotation by which to colour - // the sequences. + // the sequences. AlignmentAnnotation[] annotations = alignment.getAlignmentAnnotation(); - for (int i = 0; i < annotations.length; i++) { - - // is this a sensible way of determining type of annotation? - if (annotations[i].getRNAStruc() != null) { - annotation = annotations[i]; - break; - } + for (int i = 0; i < annotations.length; i++) + { + + // is this a sensible way of determining type of annotation? + if (annotations[i].getRNAStruc() != null) + { + annotation = annotations[i]; + break; + } } refresh(); } + private long lastrefresh = -1; public void refresh() { - - if (annotation!=null && ((annotation._rnasecstr == null - || lastrefresh != annotation._rnasecstr.hashCode()) - && annotation.isValidStruc())) + + if (annotation != null + && ((annotation._rnasecstr == null || lastrefresh != annotation._rnasecstr + .hashCode()) && annotation.isValidStruc())) { annotation.getRNAStruc(); lastrefresh = annotation._rnasecstr.hashCode();