this.av = av;
PaintRefresher.Register(this, av.getSequenceSetId());
av.getRanges().addPropertyChangeListener(this);
- }
+ }
/**
* DOCUMENT ME!
fastPaint = true;
- av.getAlignPanel().alignFrame.repaint();
+ // Call repaint on alignment panel so that repaints from other alignment
+ // panel components can be aggregated. Otherwise performance of the overview
+ // window and others may be adversely affected.
+ av.getAlignPanel().repaint();
}
/**
if (oldHeight != imgHeight || image.getWidth(this) != getWidth())
{
- image = new BufferedImage(getWidth(), imgHeight,
- BufferedImage.TYPE_INT_RGB);
+ image = new BufferedImage(getWidth(), imgHeight,
+ BufferedImage.TYPE_INT_RGB);
}
gg = (Graphics2D) image.getGraphics();
|| evt.getPropertyName().equals(ViewportRanges.STARTRESANDSEQ))
{
// scroll event, repaint panel
- av.getAlignPanel().alignFrame.repaint();
+
+ // Call repaint on alignment panel so that repaints from other alignment
+ // panel components can be aggregated. Otherwise performance of the overview
+ // window and others may be adversely affected.
+ av.getAlignPanel().repaint();
}
}
import java.awt.Graphics2D;
import java.awt.RenderingHints;
import java.awt.Shape;
+import java.awt.Transparency;
import java.awt.image.BufferedImage;
import java.beans.PropertyChangeEvent;
import java.util.List;
int endSeq = ranges.getEndSeq();
int transX = 0;
int transY = 0;
-
+
gg.copyArea(horizontal * charWidth, vertical * charHeight,
img.getWidth(), img.getHeight(), -horizontal * charWidth,
-vertical * charHeight);
drawPanel(gg, startRes, endRes, startSeq, endSeq, 0);
gg.translate(-transX, -transY);
- av.getAlignPanel().alignFrame.repaint();
+ // Call repaint on alignment panel so that repaints from other alignment
+ // panel components can be aggregated. Otherwise performance of the
+ // overview
+ // window and others may be adversely affected.
+ av.getAlignPanel().repaint();
} finally
{
fastpainting = false;
private BufferedImage buildLocalImage(BufferedImage selectImage)
{
// clone the cached image
- BufferedImage lcimg = new BufferedImage(img.getWidth(), img.getHeight(),
- img.getType());
+ BufferedImage lcimg = new BufferedImage(img.getWidth(), img.getHeight(),
+ img.getType());
+
+ // BufferedImage lcimg = new BufferedImage(img.getWidth(), img.getHeight(),
+ // img.getType());
Graphics2D g2d = lcimg.createGraphics();
g2d.drawImage(img, 0, 0, null);
try
{
- lcimg = new BufferedImage(width, height,
- BufferedImage.TYPE_INT_ARGB); // ARGB so alpha compositing works
+ lcimg = new BufferedImage(width, height,
+ BufferedImage.TYPE_INT_ARGB); // ARGB so alpha compositing works
} catch (OutOfMemoryError er)
{
System.gc();
}
else
{
- fastPaint(scrollX, 0);
+ fastPaint(scrollX, 0);
}
}
else if (eventName.equals(ViewportRanges.STARTSEQ))