import jalview.io.FileLoader;
import jalview.viewmodel.ViewportRanges;
+import java.lang.reflect.InvocationTargetException;
+
+import javax.swing.SwingUtilities;
+
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
AlignFrame af;
@BeforeMethod(alwaysRun = true)
- public void setUp()
+ public void setUp() throws InvocationTargetException, InterruptedException
{
Jalview.main(new String[] { "-nonews", "-props",
"test/jalview/testProps.jvprops" });
Boolean.TRUE.toString());
af = new FileLoader().LoadFileWaitTillLoaded("examples/uniref50.fa",
DataSourceType.FILE);
+
+ /*
+ * ensure the panel has been repainted and so ViewportRanges set
+ */
+ SwingUtilities.invokeAndWait(new Runnable() {
+ @Override
+ public void run() {
+ af.repaint();
+ }});
/*
* wait for Consensus thread to complete