{
int x = 4, y = 5;
int w = 400, h = 500;
+
try
{
NewickFile fin = new NewickFile(
- new FileParse(cm.getNewickString(), DataSourceType.PASTE));
- fin.parse();
- if (fin.getTree() == null)
- {
- return;
- }
+ new FileParse(cm.getNewick(), DataSourceType.PASTE));
String title = "PAE Matrix Tree for "
+ cm.getReferenceSeq().getDisplayId(false);
- TreePanel tp = new TreePanel(alignPanel, fin, aa, title);
-
- tp.setSize(w, h);
-
- if (x > 0 && y > 0)
- {
- tp.setLocation(x, y);
- }
- Desktop.addInternalFrame(tp, title, w, h);
+ 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;
/**