int LABEL_WEST;\r
int LABEL_EAST;\r
\r
+\r
public SeqCanvas(AlignViewport av)\r
{\r
this.av = av;\r
fr = new FeatureRenderer(av);\r
sr = new SequenceRenderer(av);\r
setLayout(new BorderLayout());\r
- PaintRefresher.Register(this);\r
+ PaintRefresher.Register(this, av.alignment);\r
+ setBackground(Color.white);\r
}\r
\r
void drawNorthScale(Graphics g, int startx, int endx, int ypos)\r
* NOTE 1: The av limits are set in setFont in this class and\r
* in the adjustment listener in SeqPanel when the scrollbars move.\r
*/\r
+\r
+\r
+ // Set this to false to force a full panel paint\r
public void paintComponent(Graphics g)\r
{\r
- g.setColor(Color.white);\r
- g.fillRect(0, 0, getWidth(), getHeight());\r
-\r
- if (fastPaint)\r
+ if (fastPaint || getWidth() != g.getClipBounds().width\r
+ || getHeight() != g.getClipBounds().height)\r
{\r
g.drawImage(img, 0, 0, this);\r
fastPaint = false;\r
-\r
return;\r
}\r
\r