Alignment might not have any annotations
[jalview.git] / src / jalview / appletgui / SequenceRenderer.java
index 3f87b02..891dfab 100755 (executable)
@@ -264,4 +264,22 @@ public class SequenceRenderer
     }\r
   }\r
 \r
+  public void drawCursor(SequenceI seq, int res, int x1, int y1)\r
+  {\r
+    int pady = av.charHeight / 5;\r
+    int charOffset = 0;\r
+    graphics.setColor(Color.black);\r
+    graphics.fillRect(x1, y1, av.charWidth, av.charHeight);\r
+    graphics.setColor(Color.white);\r
+\r
+    graphics.setColor(Color.white);\r
+\r
+    char s = seq.getCharAt(res);\r
+\r
+    charOffset = (av.charWidth - fm.charWidth(s)) / 2;\r
+    graphics.drawString(String.valueOf(s),\r
+              charOffset + x1,\r
+              (y1 + av.charHeight) - pady);\r
+    }\r
+\r
 }\r