X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fschemes%2FRNAHelicesColour.java;h=62b457998deb64e37adb48977153cdfeb38e2544;hb=c932f0e85a8852824cdd8ce790af68682732c85c;hp=056a1676a4801cebe663a150a07e60437ce94af1;hpb=f831ddf7f52d6c4a1918e87d94877b22bd322648;p=jalview.git diff --git a/src/jalview/schemes/RNAHelicesColour.java b/src/jalview/schemes/RNAHelicesColour.java index 056a167..62b4579 100644 --- a/src/jalview/schemes/RNAHelicesColour.java +++ b/src/jalview/schemes/RNAHelicesColour.java @@ -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 positionsToHelix = new Hashtable(); + public Hashtable positionsToHelix = new Hashtable<>(); /** * Number of helices in the RNA secondary structure @@ -125,14 +126,14 @@ public class RNAHelicesColour extends ResidueColourScheme 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(); numHelix = 0; - positionsToHelix = new Hashtable(); + positionsToHelix = new Hashtable<>(); // Figure out number of helices // Length of rnasecstr is the number of pairs of positions that base pair @@ -141,21 +142,21 @@ public class RNAHelicesColour extends ResidueColourScheme { /* - * System.out.println(this.annotation._rnasecstr[x] + " Begin" + + * jalview.bin.Console.outPrintln(this.annotation._rnasecstr[x] + " Begin" + * this.annotation._rnasecstr[x].getBegin()); */ - // System.out.println(this.annotation._rnasecstr[x].getFeatureGroup()); + // jalview.bin.Console.outPrintln(this.annotation._rnasecstr[x].getFeatureGroup()); positionsToHelix.put(this.annotation._rnasecstr[x].getBegin(), this.annotation._rnasecstr[x].getFeatureGroup()); positionsToHelix.put(this.annotation._rnasecstr[x].getEnd(), this.annotation._rnasecstr[x].getFeatureGroup()); - if (Integer.parseInt(this.annotation._rnasecstr[x] - .getFeatureGroup()) > numHelix) + if (Integer.parseInt( + this.annotation._rnasecstr[x].getFeatureGroup()) > numHelix) { - numHelix = Integer.parseInt(this.annotation._rnasecstr[x] - .getFeatureGroup()); + numHelix = Integer.parseInt( + this.annotation._rnasecstr[x].getFeatureGroup()); } } @@ -206,8 +207,8 @@ public class RNAHelicesColour extends ResidueColourScheme } @Override - public ColourSchemeI getInstance(AnnotatedCollectionI sg, - Map hiddenRepSequences) + public ColourSchemeI getInstance(AlignViewportI view, + AnnotatedCollectionI sg) { return new RNAHelicesColour(sg); }