Switch to new srs url
[jalview.git] / src / jalview / appletgui / AnnotationPanel.java
index 1bf3d38..614498c 100755 (executable)
@@ -467,6 +467,9 @@ public class AnnotationPanel
           column++;\r
           }\r
 \r
+          if(column>=row.annotations.length)\r
+              column = row.annotations.length-1;\r
+\r
           x += av.charWidth;\r
 \r
           if (row.hasIcons)\r
@@ -511,8 +514,8 @@ public class AnnotationPanel
               case 'E':\r
                   g.setColor(SHEET_COLOUR);\r
 \r
-                  if (row.annotations.length > endRes\r
-                      && row.annotations[endRes].secondaryStructure != 'E')\r
+                  if (row.annotations[endRes] ==null\r
+                        || row.annotations[endRes].secondaryStructure != 'E')\r
                   {\r
                     g.fillRect(lastSSX, y + 4 + iconOffset,\r
                                x - lastSSX - 4, 7);\r
@@ -624,7 +627,7 @@ public class AnnotationPanel
 \r
     ////Draw origin\r
     if(min<0)\r
-      y2 = (int)(y - (0-min / range)*graphHeight);\r
+      y2 = y - (int)((0-min / range)*graphHeight);\r
 \r
     g.setColor(Color.gray);\r
     g.drawLine(x-av.charWidth,y2,(eRes-sRes)*av.charWidth,y2);\r
@@ -672,7 +675,7 @@ public class AnnotationPanel
     y1 = y2 = y;\r
 \r
     if(min<0)\r
-      y2 = (int)(y - (0-min / (range))*aa.graphHeight);\r
+      y2 = y -(int)( (0-min / (range))*aa.graphHeight);\r
 \r
     g.setColor(Color.gray);\r
 \r