{
try
{
+ while (updatingConservation)
+ {
+ try
+ {
+ Thread.sleep(200);
+ }
+ catch (Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+
+ updatingConservation = true;
+
+
int alWidth = alignment.getWidth();
if(alWidth<0)
return;
}
- static ConservationThread conservationThread;
+ ConservationThread conservationThread;
- static ConsensusThread consensusThread;
+ ConsensusThread consensusThread;
boolean consUpdateNeeded = false;
- boolean updatingConsensus = false;
+ static boolean updatingConsensus = false;
- boolean updatingConservation = false;
+ static boolean updatingConservation = false;
/**
* DOCUMENT ME!
if (alignment.isNucleotide() || conservation==null)
return;
- updatingConservation = true;
- // javax.swing.SwingUtilities.invokeLater(new Runnable() { public void run() {
- while (conservationThread != null && conservationThread.isAlive())
- {
- try
- {
- // Thread.sleep(100);
- ap.repaint();
- }
- catch (Exception ex)
- {}
- }
- conservationThread = new ConservationThread(ap);
- conservationThread.start();
- // } });
+ conservationThread = new ConservationThread(ap);
+ conservationThread.start();
}
/**
*/
public void updateConsensus(final AlignmentPanel ap)
{
- updatingConsensus = true;
-
- // javax.swing.SwingUtilities.invokeLater(new Runnable() { public void run() {
- while (consensusThread != null && consensusThread.isAlive())
- {
- try
- {
- // Thread.sleep(100);
- ap.repaint();
- }
- catch (Exception ex)
- {}
- }
- consensusThread = new ConsensusThread(ap);
- consensusThread.start();
- // } });
+ consensusThread = new ConsensusThread(ap);
+ consensusThread.start();
}
}
public void run()
{
+ while (updatingConsensus)
+ {
+ try
+ {
+ Thread.sleep(200);
+ }
+ catch (Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+
+ updatingConsensus = true;
+
try
{
int aWidth = alignment.getWidth();
resetAllColourSchemes();
alignment.adjustSequenceAnnotations();
+
}