X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FAlignmentAnnotation.java;h=4c5ea1724a2e4eeab0305c9d70a0b1638c7c96fe;hb=fbed706fbf25c2f7a5b3f3ba9b2b44737c411dcc;hp=b60813950ae4c84a22587a8e3c769765fa0a966d;hpb=d62b90cb6effb7b380e5f7d590691dd884b024cf;p=jalview.git diff --git a/src/jalview/datamodel/AlignmentAnnotation.java b/src/jalview/datamodel/AlignmentAnnotation.java index b608139..4c5ea17 100755 --- a/src/jalview/datamodel/AlignmentAnnotation.java +++ b/src/jalview/datamodel/AlignmentAnnotation.java @@ -20,6 +20,10 @@ */ package jalview.datamodel; +import jalview.analysis.Rna; +import jalview.analysis.SecStrConsensus.SimpleBP; +import jalview.analysis.WUSSParseException; + import java.util.ArrayList; import java.util.Collection; import java.util.Collections; @@ -28,10 +32,6 @@ import java.util.Iterator; import java.util.Map; import java.util.Map.Entry; -import jalview.analysis.Rna; -import jalview.analysis.SecStrConsensus.SimpleBP; -import jalview.analysis.WUSSParseException; - /** * DOCUMENT ME! * @@ -502,9 +502,13 @@ public class AlignmentAnnotation public char charAt(int index) { return ((index + offset < 0) || (index + offset) >= max - || annotations[index + offset] == null || (annotations[index - + offset].secondaryStructure < ' ') ? ' ' - : annotations[index + offset].secondaryStructure); + || annotations[index + offset] == null + || (annotations[index + offset].secondaryStructure <= ' ') ? ' ' + : annotations[index + offset].displayCharacter == null + || annotations[index + offset].displayCharacter + .length() == 0 ? annotations[index + offset].secondaryStructure + : annotations[index + offset].displayCharacter + .charAt(0)); } @Override @@ -515,8 +519,10 @@ public class AlignmentAnnotation for (int i = offset; i < mx; i++) { - string[i] = (annotations[i] == null || (annotations[i].secondaryStructure < 32)) ? ' ' - : annotations[i].secondaryStructure; + string[i] = (annotations[i] == null || (annotations[i].secondaryStructure <= 32)) ? ' ' + : (annotations[i].displayCharacter == null + || annotations[i].displayCharacter.length() == 0 ? annotations[i].secondaryStructure + : annotations[i].displayCharacter.charAt(0)); } return new String(string); } @@ -644,7 +650,7 @@ public class AlignmentAnnotation { if (annotations[i] != null) { - annotations[i].displayCharacter = "X"; + annotations[i].displayCharacter = ""; } } }