X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Frenderer%2FAnnotationRenderer.java;h=0d7d4ca463dd7ea60438dbce7f4121fe6ea0751c;hb=f51ad53a1437086e6deea02e4f8930078b92bfcc;hp=c3d4ef5bc46eda4a8be7ba2f801396a801cc1bc0;hpb=57c960648b550f10c7db40e39c7bb6a761d732b1;p=jalview.git diff --git a/src/jalview/renderer/AnnotationRenderer.java b/src/jalview/renderer/AnnotationRenderer.java index c3d4ef5..0d7d4ca 100644 --- a/src/jalview/renderer/AnnotationRenderer.java +++ b/src/jalview/renderer/AnnotationRenderer.java @@ -37,7 +37,7 @@ public class AnnotationRenderer int x2 = (x * charWidth); Regex closeparen = new Regex("(\\))"); - String dc = column == 0 ? "" + String dc = (column == 0 || row.annotations[column-1]==null) ? "" : row.annotations[column - 1].displayCharacter; boolean diffupstream = sCol == 0 || row.annotations[sCol - 1] == null @@ -163,7 +163,8 @@ public class AnnotationRenderer { if (aa.autoCalculated && aa.label.startsWith("StrucConsensus")) { - if (aa.groupRef != null && aa.groupRef.consensusData != null + // TODO implement group structure consensus + /* if (aa.groupRef != null && aa.groupRef.consensusData != null && aa.groupRef.isShowSequenceLogo()) { //TODO check what happens for group selections @@ -171,11 +172,12 @@ public class AnnotationRenderer aa.groupRef.consensusData[column], aa.groupRef .getIgnoreGapsConsensus()); } + */ // TODO extend annotation row to enable dynamic and static profile data // to // be stored if (aa.groupRef == null && aa.sequenceRef == null - && av_renderProfile) + && av_renderProfile && hStrucConsensus!=null && hStrucConsensus.length>column) { return StructureFrequency.extractProfile(hStrucConsensus[column], av_ignoreGapsConsensus); @@ -344,7 +346,11 @@ public class AnnotationRenderer } } } - + if (!row.isValidStruc()) + { + g.setColor(Color.orange); + g.fillRect((int)row.getInvalidStrucPos()*charWidth, y, charWidth, charHeight); + } if (validCharWidth && validRes && row.annotations[column].displayCharacter != null @@ -471,6 +477,15 @@ public class AnnotationRenderer { validEnd = true; } + if ((row.annotations == null) || (row.annotations.length <= column) + || (row.annotations[column] == null)) + { + validRes = false; + } + else + { + validRes = true; + } // x ++;