JAL-1320 preserve option/parameter order with LinkedHashMap
[jalview.git] / src / jalview / gui / AnnotationLabels.java
index 6df2088..8566e57 100755 (executable)
@@ -831,6 +831,8 @@ public class AnnotationLabels extends JPanel implements MouseListener,
   {
     drawComponent(g, false, width);
   }
+
+  private final boolean debugRedraw = false;
   /**
    * Draw the full set of annotation Labels for the alignment at the given cursor
    * 
@@ -880,8 +882,6 @@ public class AnnotationLabels extends JPanel implements MouseListener,
       for (int i = 0; i < aa.length; i++)
       {
         visible = true;
-        g.setColor(Color.black);
-
         if (!aa[i].visible)
         {
           hasHiddenRows = true;
@@ -893,7 +893,9 @@ public class AnnotationLabels extends JPanel implements MouseListener,
         {
           if (!before)
           {
-          System.out.println("before vis: "+i);
+            if (debugRedraw) {
+              System.out.println("before vis: "+i);
+            }
           before=true;
           }
           // don't draw what isn't visible
@@ -904,12 +906,16 @@ public class AnnotationLabels extends JPanel implements MouseListener,
 
           if (!after)
           {
-          System.out.println("Scroll offset: "+sOffset+" after vis: "+i);
+            if (debugRedraw) {
+              System.out.println("Scroll offset: "+sOffset+" after vis: "+i);
+            }
           after=true;
           }
           // don't draw what isn't visible
           continue;
         }}
+        g.setColor(Color.black);
+
         offset = -aa[i].height / 2;
 
         if (aa[i].hasText)
@@ -925,6 +931,7 @@ public class AnnotationLabels extends JPanel implements MouseListener,
         if (aa[i].graphGroup > -1)
         {
           int groupSize = 0;
+          // TODO: JAL-1291 revise rendering model so the graphGroup map is computed efficiently for all visible labels
           for (int gg = 0; gg < aa.length; gg++)
           {
             if (aa[gg].graphGroup == aa[i].graphGroup)