added sequence fetcher and sequence features retrieval to web serviices index
[jalview.git] / src / jalview / gui / AnnotationPanel.java
index 07841d2..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;
@@ -608,26 +607,20 @@ public class AnnotationPanel
     drawComponent(gg, av.startRes, av.endRes + 1);
     g.drawImage(image, 0, 0, this);
   }
-  boolean fpainting=false;
   /**
-   * Thread safe repaint
+   * non-Thread safe repaint
    *
    * @param horizontal repaint with horizontal shift in alignment
    */
   public void fastPaint(int horizontal)
   {
-    
-    if (fpainting)
-      return;
-    fpainting=true;
 
     if ( (horizontal == 0)
         || gg == null
         || av.alignment.getAlignmentAnnotation() == null
         || av.alignment.getAlignmentAnnotation().length < 1
         || av.updatingConsensus
-        || av.updatingConservation
-        ) // || fpainting)
+        || av.updatingConservation)
     {
       repaint();
       return;
@@ -656,7 +649,7 @@ public class AnnotationPanel
 
     fastPaint = true;
     repaint();
-    fpainting=false;
+
   }
 
   /**
@@ -868,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);