X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Frenderer%2FAnnotationRenderer.java;h=d063c5b10ac848d87c9bed5a4c7bb517e14ad701;hb=8c2e72fec911f86333cbc82aaed4d29fadac542c;hp=5c03881ad96a83f7b1e4e37b7bfa5842b256983f;hpb=bbfd4560be47ed3e6a2364665716009960064d51;p=jalview.git diff --git a/src/jalview/renderer/AnnotationRenderer.java b/src/jalview/renderer/AnnotationRenderer.java index 5c03881..d063c5b 100644 --- a/src/jalview/renderer/AnnotationRenderer.java +++ b/src/jalview/renderer/AnnotationRenderer.java @@ -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); @@ -201,6 +203,7 @@ public class AnnotationRenderer // NOTES: // AnnotationPanel needs to implement: ImageObserver, access to AlignViewport updateFromAwtRenderPanel(annotPanel, av); + fm = g.getFontMetrics(); AlignmentAnnotation[] aa = av.getAlignment().getAlignmentAnnotation(); int x = 0, y = 0; @@ -344,7 +347,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 +478,15 @@ public class AnnotationRenderer { validEnd = true; } + if ((row.annotations == null) || (row.annotations.length <= column) + || (row.annotations[column] == null)) + { + validRes = false; + } + else + { + validRes = true; + } // x ++;