import jalview.datamodel.AlignmentI;
import jalview.io.DataSourceType;
import jalview.io.FileLoader;
-import jalview.viewmodel.ViewportRanges;
import java.awt.Font;
import java.awt.FontMetrics;
//
// });
//
- ViewportRanges.sTest = "";
+
Thread.currentThread().setName("SeqCanvasTest fromScrolled " + ++nTest);
AlignFrame af = new FileLoader().LoadFileWaitTillLoaded(
"examples/uniref50.fa", DataSourceType.FILE);
AlignmentI al = av.getAlignment();
assertEquals(al.getWidth(), 157);
assertEquals(al.getHeight(), 15);
- String s = "";
- s += "flushing events";
flushEvents();
- s += "events flushed";
av.getRanges().setStartEndSeq(0, 3);
- s += " SC1 " + av.getRanges() + " " + ViewportRanges.sTest;
av.setShowAnnotation(false);
av.setScaleAboveWrapped(true);
SeqCanvas testee = af.alignPanel.getSeqPanel().seqCanvas;
testee.calculateWrappedGeometry(canvasWidth, canvasHeight);
int repeatingHeight = (int) PA.getValue(testee,
"wrappedRepeatHeightPx");
- assertEquals(av.getRanges().getEndSeq(), 3, "endSeq should be 3 " + s); // unchanged
+ assertEquals(av.getRanges().getEndSeq(), 3,
+ "endSeq should be 3 but may be 13 if scrollbar update thread interferes"); // unchanged
assertEquals(repeatingHeight, charHeight * (2 + al.getHeight()));
}