import org.forester.archaeopteryx.MainFrame;
import org.forester.phylogeny.Phylogeny;
-public class ArchaeopteryxFrame
+public final class ArchaeopteryxInit
{
- public static ArchaeopteryxFrame createInstance(Phylogeny[] aptxTrees)
+ public static MainFrame createInstance(Phylogeny[] aptxTrees)
{
- return new ArchaeopteryxFrame(aptxTrees);
+ return createAptxFrame(aptxTrees);
}
- public static ArchaeopteryxFrame createInstance(Phylogeny aptxTree)
+ public static MainFrame createInstance(Phylogeny aptxTree)
{
Phylogeny[] aptxTrees = { aptxTree }; // future possibility to load in
// several trees simultaneously
- return new ArchaeopteryxFrame(aptxTrees);
+ return createAptxFrame(aptxTrees);
}
- public static ArchaeopteryxFrame createInstance(
+ public static MainFrame createInstance(
TreeBuilder calculatedTree)
{
ArchaeopteryxTreeBuilder aptxTreeBuilder = new ArchaeopteryxTreeBuilder();
Phylogeny[] aptxTrees = { aptxTree }; // future possibility to load in
// several trees simultaneously
- return new ArchaeopteryxFrame(aptxTrees);
+ return createAptxFrame(aptxTrees);
}
- private ArchaeopteryxFrame(Phylogeny[] aptxTrees)
+ private static MainFrame createAptxFrame(Phylogeny[] aptxTrees)
{
MainFrame aptxApp = Archaeopteryx.createApplication(aptxTrees,
"_aptx_jalview_configuration_file", null);
- bindFrameToJalview(aptxApp);
-
+ return bindFrameToJalview(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)
+
+ private static MainFrame bindFrameToJalview(MainFrame aptxApp)
{
int width = 400;
int height = 550;
Desktop.addInternalFrame(aptxApp, "Archaeopteryx Tree View", true,
width, height, true, true);
+ return aptxApp;
+
}
import jalview.api.analysis.ScoreModelI;
import jalview.api.analysis.SimilarityParamsI;
import jalview.datamodel.SequenceGroup;
-import jalview.ext.archaeopteryx.ArchaeopteryxFrame;
+import jalview.ext.archaeopteryx.ArchaeopteryxInit;
import jalview.util.MessageManager;
import java.awt.BorderLayout;
TreeModel tree = new TreeModel(calculatedTree);
openTreePanel(tree, treeAlgo, substitutionMatrix);
- ArchaeopteryxFrame.createInstance(calculatedTree);
+ ArchaeopteryxInit.createInstance(calculatedTree);
import jalview.gui.JvOptionPane;
+import org.forester.archaeopteryx.MainFrame;
import org.forester.phylogeny.Phylogeny;
import org.forester.phylogeny.PhylogenyNode;
import org.testng.annotations.BeforeClass;
@Test(groups = "Functional")
public void testShowingTree()
{
- ArchaeopteryxFrame.createInstance(phy);
+ MainFrame aptx = ArchaeopteryxInit.createInstance(phy);
}