\r
imgWidth = (av.endRes - av.startRes + 1) * av.charWidth;\r
\r
- if (image != null && imgWidth == image.getWidth())\r
+ if (image == null || imgWidth != image.getWidth())\r
{\r
- //This will be called by a mouse over, tool tip etc\r
- // no need to redraw whole image\r
- g.drawImage(image, 0, 0, this);\r
- fastPaint = false;\r
- return;\r
+ image = new BufferedImage(imgWidth, ap.annotationPanel.getHeight(),\r
+ BufferedImage.TYPE_INT_RGB);\r
+ gg = (Graphics2D) image.getGraphics();\r
+ gg.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\r
+ RenderingHints.VALUE_ANTIALIAS_ON);\r
+\r
+ gg.setFont(av.getFont());\r
+ fm = gg.getFontMetrics();\r
}\r
\r
- image = new BufferedImage(imgWidth, ap.annotationPanel.getHeight(),\r
- BufferedImage.TYPE_INT_RGB);\r
- gg = (Graphics2D) image.getGraphics();\r
- gg.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\r
- RenderingHints.VALUE_ANTIALIAS_ON);\r
-\r
- gg.setFont(av.getFont());\r
- fm = gg.getFontMetrics();\r
-\r
drawComponent(gg, av.startRes, av.endRes + 1);\r
g.drawImage(image, 0, 0, this);\r
}\r