*/
private boolean superposeAdded = true;
+ /**
+ * whether to open structures in their own thread or not
+ */
+ private boolean async = true;
+
+ public void setAsync(boolean b)
+ {
+ async = b;
+ }
+
public enum ViewerType
{
JMOL, CHIMERA, CHIMERAX, PYMOL
if (sview != null)
{
sview.setAlignAddedStructures(superposeAdded);
- new Thread(new Runnable()
+
+ Runnable viewRunnable = new Runnable()
{
@Override
public void run()
sview.updateTitleAndMenus();
}
- }).start();
+ };
+ if (async)
+ {
+ new Thread(viewRunnable).start();
+ }
+ else
+ {
+ viewRunnable.run();
+ }
return sview;
}
JalviewStructureDisplayI sview = null;
+ public JalviewStructureDisplayI getJalviewStructureDisplay()
+ {
+ return sview;
+ }
+
public JalviewStructureDisplayI viewStructures(PDBEntry pdb,
SequenceI[] seqsForPdb, AlignmentPanel ap)
{