X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAnnotationLabels.java;h=8566e57baadb9c301fa94ee1a3994db0a5c36582;hb=296d1d4fdf60f651889d03a475e54aee135890d4;hp=6df208815fe8f9e1b0d7a08e401f950169c06cb9;hpb=69dd054a99ba910b138e84c8db62a11ee7c3ef37;p=jalview.git diff --git a/src/jalview/gui/AnnotationLabels.java b/src/jalview/gui/AnnotationLabels.java index 6df2088..8566e57 100755 --- a/src/jalview/gui/AnnotationLabels.java +++ b/src/jalview/gui/AnnotationLabels.java @@ -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)