@BeforeClass(alwaysRun = true)
public void setUp()
{
- Jalview.setInteractive(false);
+ Cache.loadProperties(null);
Cache.initLogger();
+ Desktop.getInstance().setVisible(false);
}
/**
{
AlignFrame af = new FileLoader().LoadFileWaitTillLoaded(
"examples/uniref50.fa", DataSourceType.FILE);
+
AlignViewport av = af.getViewport();
AlignmentI al = av.getAlignment();
assertEquals(al.getWidth(), 157);
{
AlignFrame af = new FileLoader().LoadFileWaitTillLoaded(
"examples/uniref50.fa", DataSourceType.FILE);
+ // The thing is that
+ System.out.println("ap dim = " + af.alignPanel.getSize());
+ System.out.println("seqpan dim = " + af.alignPanel.getSeqPanel().getSize());
+ System.out.println("seqcan dim = " + af.alignPanel.getSeqPanel().seqCanvas.getSize());
+
+
AlignViewport av = af.getViewport();
AlignmentI al = av.getAlignment();
assertEquals(al.getWidth(), 157);
assertEquals(al.getHeight(), 15);
ViewportRanges ranges = av.getRanges();
+ System.out.println(ranges + " before setting to 3");
ranges.setStartEndSeq(0, 3);
- System.out.println(ranges);
+ int endSeq = ranges.getEndSeq();
+ System.out.println(ranges + " after setting to 3");
av.setShowAnnotation(false);
av.setScaleAboveWrapped(true);
- System.out.println(ranges);
SeqCanvas testee = af.alignPanel.getSeqPanel().seqCanvas;
av.setWrapAlignment(true);
- System.out.println(ranges);
av.setFont(new Font("SansSerif", Font.PLAIN, 14), true);
int charHeight = av.getCharHeight();
int charWidth = av.getCharWidth();
- System.out.println(ranges);
// Windows h=19, w=11.
assertEquals(charHeight, !Platform.isWin() ? 17 : 19);
assertEquals(charWidth, !Platform.isWin() ? 12 : 11);
- System.out.println(ranges);
int canvasWidth = 400;
int canvasHeight = 300;
testee.calculateWrappedGeometry(canvasWidth, canvasHeight);
System.out.println(ranges);
- assertEquals(ranges.getEndSeq(), 3); // unchanged
+ assertEquals(ranges.getEndSeq(), endSeq); // unchanged
int repeatingHeight = (int) PA.getValue(testee,
"wrappedRepeatHeightPx");
int h = charHeight * (2 + al.getHeight());