Merge branch 'feature/JAL-4159_pasimap' into spike/JAL-4159_pasimap_2113_series
authorJim Procter <jprocter@dundee.ac.uk>
Tue, 21 May 2024 14:46:05 +0000 (15:46 +0100)
committerJim Procter <jprocter@dundee.ac.uk>
Tue, 21 May 2024 14:53:29 +0000 (15:53 +0100)
loop in new progress bar and resolve formatting conflicts in PairwiseAlignPanel

1  2 
build.gradle
src/jalview/gui/PairwiseAlignPanel.java

diff --cc build.gradle
Simple merge
@@@ -107,10 -137,14 +137,16 @@@ System.out.println("Creating pap")
      float[][] alignmentScores = new float[seqs.length][seqs.length];
      double totscore = 0D;
      int count = seqs.length;
 +    suppressTextbox = count<10;
 +    discardAlignments = count<15;
      boolean first = true;
  
+     progress = 0;
+     firePropertyChange(TOTAL, 0, total);
+     suppressTextbox = count<10;
+     discardAlignments = count<15;
      for (int i = 1; i < count; i++)
      {
        // fill diagonal alignmentScores with Float.NaN
  
          if (!first)
          {
-           System.out.println(DASHES);
+           jalview.bin.Console.outPrintln(DASHES);
            textarea.append(DASHES);
 -        sb.append(DASHES);
 +          sb.append(DASHES);
          }
          first = false;
          if (discardAlignments) {
          scores[i][j] = as.getMaxScore() / as.getASeq1().length;
          alignmentScores[i][j] = as.getAlignmentScore();
          totscore = totscore + scores[i][j];
 -
 -      if (suppressTextbox)
 -      {
 +        if (suppressTextbox)
 +        {
            textarea.append(as.getOutput());
 -        sb.append(as.getOutput());
 -      }
 -      if (discardAlignments)
 -      {
 +          sb.append(as.getOutput());
 +        }
 +        if (discardAlignments)
 +        {
            sequences.add(as.getAlignedSeq1());
            sequences.add(as.getAlignedSeq2());
 -      }
 -
 -      firePropertyChange(PROGRESS, progress, ++progress);
 +        }
++        firePropertyChange(PROGRESS, progress, ++progress);
        }
      }
      alignmentScores[count - 1][count - 1] = Float.NaN;