JAL-580 - display position where wuss parsing error occured
authorjprocter <jprocter@compbio.dundee.ac.uk>
Fri, 28 Oct 2011 14:42:18 +0000 (15:42 +0100)
committerjprocter <jprocter@compbio.dundee.ac.uk>
Fri, 28 Oct 2011 14:42:18 +0000 (15:42 +0100)
src/jalview/renderer/AnnotationRenderer.java

index 5c03881..e8b2e72 100644 (file)
@@ -344,7 +344,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 +475,15 @@ public class AnnotationRenderer
       {
         validEnd = true;
       }
+      if ((row.annotations == null) || (row.annotations.length <= column)
+              || (row.annotations[column] == null))
+      {
+        validRes = false;
+      }
+      else
+      {
+        validRes = true;
+      }
   
       // x ++;