@Override
public SequenceI getSequenceAt(int i)
{
- synchronized (sequences)
+ // don't need to synchronise here as sequences is a synchronizedList
+ if (i > -1 && i < sequences.size())
{
- if (i > -1 && i < sequences.size())
- {
- return sequences.get(i);
- }
+ return sequences.get(i);
}
+
return null;
}
int er = av.getRanges().getEndRes() + 1;
int transX = 0;
- long stime = System.currentTimeMillis();
gg.copyArea(0, 0, imgWidth, getHeight(),
-horizontal * av.getCharWidth(), 0);
- long mtime = System.currentTimeMillis();
if (horizontal > 0) // scrollbar pulled right, image to the left
{
drawComponent(gg, sr, er);
gg.translate(-transX, 0);
- long dtime = System.currentTimeMillis();
+
fastPaint = true;
repaint();
- long rtime = System.currentTimeMillis();
- if (debugRedraw)
- {
- System.err.println("Scroll:\t" + horizontal + "\tCopyArea:\t"
- + (mtime - stime) + "\tDraw component:\t" + (dtime - mtime)
- + "\tRepaint call:\t" + (rtime - dtime));
- }
-
}
private volatile boolean lastImageGood = false;