From: amwaterhouse Date: Fri, 8 Apr 2005 15:04:23 +0000 (+0000) Subject: clear the last area in fast paint X-Git-Tag: Release_2_0~451 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=31182f620c72d4140c1854d1228038f2ea9f31a6;p=jalview.git clear the last area in fast paint --- 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;