public class ArchaeopteryxFrame
{
-
- public static ArchaeopteryxFrame createInstance(Phylogeny aptxTree)
- {
- return new ArchaeopteryxFrame(aptxTree);
-
- }
-
- public static ArchaeopteryxFrame createInstance(
- TreeBuilder calculatedTree)
+ public static ArchaeopteryxFrame createInstance(Phylogeny[] aptxTrees)
{
- return new ArchaeopteryxFrame(calculatedTree);
+ return new ArchaeopteryxFrame(aptxTrees);
}
- private ArchaeopteryxFrame(Phylogeny aptxTree)
+ public static ArchaeopteryxFrame createInstance(Phylogeny aptxTree)
{
- MainFrame aptxApp = Archaeopteryx.createApplication(aptxTree);
- start(aptxApp);
+ Phylogeny[] aptxTrees = { aptxTree }; // future possibility to load in
+ // several trees simultaneously
+ return new ArchaeopteryxFrame(aptxTrees);
}
- private ArchaeopteryxFrame(TreeBuilder calculatedTree)
+ public static ArchaeopteryxFrame createInstance(
+ TreeBuilder calculatedTree)
{
ArchaeopteryxTreeBuilder aptxTreeBuilder = new ArchaeopteryxTreeBuilder();
Phylogeny aptxTree = aptxTreeBuilder.buildAptxTree(calculatedTree);
-
Phylogeny[] aptxTrees = { aptxTree }; // future possibility to load in
// several trees simultaneously
+ return new ArchaeopteryxFrame(aptxTrees);
+
+ }
+
+
+ private ArchaeopteryxFrame(Phylogeny[] aptxTrees)
+ {
MainFrame aptxApp = Archaeopteryx.createApplication(aptxTrees,
"_aptx_jalview_configuration_file", null);
- start(aptxApp);
- }
+ bindFrameToJalview(aptxApp);
+ }
- public void start(MainFrame aptxApp)
+ // public so that, should an Aptx main frame ever get created outside this
+ // class, it can be bound to jalview anyway
+ public void bindFrameToJalview(MainFrame aptxApp)
{
int width = 400;
int height = 550;