import jalview.viewmodel.ViewportRanges;
import jalview.ws.DBRefFetcher;
import jalview.ws.DBRefFetcher.FetchFinishedListenerI;
+import jalview.ws.datamodel.alphafold.PAEContactMatrix;
import jalview.ws.jws1.Discoverer;
import jalview.ws.jws2.Jws2Discoverer;
import jalview.ws.jws2.jabaws2.Jws2Instance;
@Override
public void setProgressBar(String message, long id)
{
- progressBar.setProgressBar(message, id);
+ if (!Platform.isHeadless())
+ progressBar.setProgressBar(message, id);
}
@Override
return showNewickTree(nf, treeTitle, null, w, h, x, y);
}
+
/**
* Add a treeviewer for the tree extracted from a Newick file object to the
* current alignment view
return tp;
}
+
+ public void showContactMapTree(AlignmentAnnotation aa,
+ PAEContactMatrix cm)
+ {
+ int x = 4, y = 5;
+ int w = 400, h = 500;
+
+ try
+ {
+ NewickFile fin = new NewickFile(
+ new FileParse(cm.getNewick(), DataSourceType.PASTE));
+ String title = "PAE Matrix Tree for "
+ + cm.getReferenceSeq().getDisplayId(false);
+
+ showColumnWiseTree(fin, aa, title, w,h, x,y);
+ } catch (Throwable xx)
+ {
+ Console.error("Unexpected exception showing tree for contact matrix",
+ xx);
+ }
+ }
+ public TreePanel showColumnWiseTree(NewickFile nf, AlignmentAnnotation aa, String treeTitle,
+ int w, int h, int x, int y)
+ {
+ try
+ {
+ nf.parse();
+ if (nf.getTree() == null)
+ {
+ return null;
+ }
+ TreePanel tp = new TreePanel(alignPanel, nf, aa, title);
+
+ tp.setSize(w, h);
+
+ if (x > 0 && y > 0)
+ {
+ tp.setLocation(x, y);
+ }
+
+ Desktop.addInternalFrame(tp, title, w, h);
+ return tp;
+ } catch (Throwable xx)
+ {
+ Console.error("Unexpected exception showing tree for contact matrix",
+ xx);
+ }
+ return null;
+ }
+
private boolean buildingMenu = false;
/**
{
return lastFeatureSettingsBounds;
}
+
}
class PrintThread extends Thread