private BufferedImage lastMiniMe = null;
- public boolean resizing = false;
+ public boolean updating = false;
// This is set true if the user resizes whilst
// the overview is being calculated
- public boolean resizeAgain = false;
+ public volatile boolean updateAgain = false;
// Can set different properties in this seqCanvas than
// main visible SeqCanvas
if (showAnnotation)
{
renderer.updateFromAlignViewport(av);
- for (int col = 0; col < od.getWidth() && !resizeAgain; col++)
+ for (int col = 0; col < od.getWidth() && !updateAgain; col++)
{
mg.translate(col, od.getSequencesHeight());
renderer.drawGraph(mg, av.getAlignmentConservationAnnotation(),
}
System.gc();
- resizing = false;
+ updating = false;
- if (resizeAgain)
+ if (updateAgain)
{
- resizeAgain = false;
+ updateAgain = false;
op.updateOverviewImage();
}
else
@Override
public void paintComponent(Graphics g)
{
- if (resizing || resizeAgain)
+ if (updating || updateAgain)
{
if (lastMiniMe == null)
{
// get hidden row and hidden column map once at beginning.
// clone featureRenderer settings to avoid race conditions... if state is
// updated just need to refresh again
- for (int row = 0; row < od.getSequencesHeight() && !resizeAgain; row++)
+ for (int row = 0; row < od.getSequencesHeight() && !updateAgain; row++)
{
boolean doCopy = true;
int currentrow = (int) (row * sampleRow);
seq = av.getAlignment().getSequenceAtAbsoluteIndex(lastrow);
}
- for (int col = 0; col < od.getWidth() && !resizeAgain; col++)
+ for (int col = 0; col < od.getWidth() && !updateAgain; col++)
{
if (doCopy)
{
*/
public void updateOverviewImage()
{
- if (oviewCanvas.resizing)
+ if (oviewCanvas.updating)
{
- oviewCanvas.resizeAgain = true;
+ oviewCanvas.updateAgain = true;
return;
}
- oviewCanvas.resizing = true;
+ oviewCanvas.updating = true;
if ((getWidth() > 0) && (getHeight() > 0))
{