added centre annotation labels menu entry (and commented out SeqSearch web service...
[jalview.git] / src / jalview / gui / AnnotationPanel.java
index 676fecf..2226e8b 100755 (executable)
@@ -42,7 +42,6 @@ public class AnnotationPanel
   final String COLOUR = "Colour";
   final Color HELIX_COLOUR = Color.red.darker();
   final Color SHEET_COLOUR = Color.green.darker().darker();
-
   /** DOCUMENT ME!! */
   AlignViewport av;
   AlignmentPanel ap;
@@ -862,10 +861,13 @@ public class AnnotationPanel
             && (row.annotations[column].displayCharacter.length() > 0))
         {
 
-          int charOffset = (av.charWidth -
-                            fm.charWidth(row.annotations[column].
-                                         displayCharacter.charAt(
-                                             0))) / 2;
+          int charOffset = (av.getCentreColumnLabels()) ? ((av.charWidth -
+                            fm.charsWidth(row.annotations[column].
+                                         displayCharacter.toCharArray(),0,
+                                         row.annotations[column].
+                                         displayCharacter.length())) / 2)
+                                         : (av.charWidth - fm.charWidth(row.annotations[column].
+                                                 displayCharacter.charAt(0))) / 2;
 
           if (row.annotations[column].colour == null)
             g.setColor(Color.black);