From 0f100e91dc5de58fe3cd6d1704d5a51f2530b62f Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Mon, 5 Feb 2007 11:58:42 +0000 Subject: [PATCH] stop flickering annotationPanel --- src/jalview/appletgui/AnnotationPanel.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/jalview/appletgui/AnnotationPanel.java b/src/jalview/appletgui/AnnotationPanel.java index 172211e..17c0c8a 100755 --- a/src/jalview/appletgui/AnnotationPanel.java +++ b/src/jalview/appletgui/AnnotationPanel.java @@ -225,6 +225,7 @@ public class AnnotationPanel fastPaint = false; } + if (fastPaint) { g.drawImage(image, 0, 0, this); @@ -232,7 +233,11 @@ public class AnnotationPanel return; } + gg.setColor(Color.white); + gg.fillRect(0, 0, getSize().width, getSize().height); drawComponent(gg, av.startRes, av.endRes + 1); + + g.drawImage(image, 0, 0, this); } @@ -281,13 +286,15 @@ public class AnnotationPanel { g.setFont(av.getFont()); + + g.setColor(Color.white); + g.fillRect(0, 0, (endRes - startRes) * av.charWidth, getSize().height); + + if (fm == null) fm = g.getFontMetrics(); - g.setColor(Color.white); - g.fillRect(0, 0, getSize().width, getSize().height); - if ((av.alignment.getAlignmentAnnotation() == null) || (av.alignment.getAlignmentAnnotation().length < 1)) { -- 1.7.10.2