From 31182f620c72d4140c1854d1228038f2ea9f31a6 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Fri, 8 Apr 2005 15:04:23 +0000 Subject: [PATCH] clear the last area in fast paint --- src/jalview/gui/AnnotationPanel.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/jalview/gui/AnnotationPanel.java b/src/jalview/gui/AnnotationPanel.java index 76559bd..69af559 100755 --- a/src/jalview/gui/AnnotationPanel.java +++ b/src/jalview/gui/AnnotationPanel.java @@ -350,7 +350,10 @@ public class AnnotationPanel extends JPanel implements MouseListener, MouseMotio public void fastPaint(int horizontal) { - if(image==null || horizontal ==0) + if( horizontal ==0 + || av.alignment.getAlignmentAnnotation()==null + || av.alignment.getAlignmentAnnotation().length<1 + ) { repaint(); return; @@ -387,6 +390,8 @@ public class AnnotationPanel extends JPanel implements MouseListener, MouseMotio g.fillRect(0,0,(endRes-startRes) *av.charWidth, getHeight()); if(av.alignment.getAlignmentAnnotation()==null || av.alignment.getAlignmentAnnotation().length<1) { + g.setColor(Color.white); + g.fillRect(0,0,getWidth(), getHeight()); g.setColor(Color.black); g.drawString("Alignment has no annotations",20,15); return; -- 1.7.10.2