X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fgui%2FCalculationChooser.java;h=fe96eaae318df0caae4ac53b1942afe6ea9b3999;hb=062ebc02980364930ceb26dd6c06448af971fe20;hp=a3878d7390460b200ab153bb0d75eeb387937fc5;hpb=c21989bd32ddf92f7583578b66e3f491643ce775;p=jalview.git diff --git a/src/jalview/gui/CalculationChooser.java b/src/jalview/gui/CalculationChooser.java index a3878d7..fe96eaa 100644 --- a/src/jalview/gui/CalculationChooser.java +++ b/src/jalview/gui/CalculationChooser.java @@ -28,7 +28,7 @@ import jalview.analysis.scoremodels.SimilarityParams; import jalview.api.analysis.ScoreModelI; import jalview.api.analysis.SimilarityParamsI; import jalview.datamodel.SequenceGroup; -import jalview.ext.archaeopteryx.ArchaeopteryxTreeBuilder; +import jalview.ext.archaeopteryx.ArchaeopteryxInit; import jalview.util.MessageManager; import java.awt.BorderLayout; @@ -63,10 +63,6 @@ import javax.swing.JRadioButton; import javax.swing.event.InternalFrameAdapter; import javax.swing.event.InternalFrameEvent; -import org.forester.archaeopteryx.Archaeopteryx; -import org.forester.archaeopteryx.MainFrame; -import org.forester.phylogeny.Phylogeny; - /** * A dialog where a user can choose and action Tree or PCA calculation options */ @@ -112,6 +108,11 @@ public class CalculationChooser extends JPanel List tips = new ArrayList<>(); + /* + * the most recently opened PCA results panel + */ + private PCAPanel pcaPanel; + /** * Constructor * @@ -483,30 +484,20 @@ public class CalculationChooser extends JPanel TreeBuilder calculatedTree = treeCalculator .makeTree(af.getViewport()); TreeModel tree = new TreeModel(calculatedTree); - openTreePanel(tree, treeAlgo, substitutionMatrix); - ArchaeopteryxTreeBuilder aptxTreeBuilder = new ArchaeopteryxTreeBuilder(); - Phylogeny aptxTree = aptxTreeBuilder.buildAptxTree(calculatedTree); - MainFrame aptxFrame = Archaeopteryx.createApplication(aptxTree); + openTreePanel(tree, treeAlgo, substitutionMatrix); + ArchaeopteryxInit.createInstance(calculatedTree); - int width = 400; - int height = 550; - aptxFrame.setMinimumSize(new Dimension(width - 30, height - 50)); // doesn't - // work - // as it - // gets - // overridden - // during - // addInternalFrame? - Desktop.addInternalFrame(aptxFrame, "Archaeopteryx Tree View", - width, height, true); } // closeFrame(); } + + + protected String determineTreeAlgo() // to be modified & expanded { String treeAlgorithm = neighbourJoining.isSelected() @@ -579,7 +570,7 @@ public class CalculationChooser extends JPanel JvOptionPane.WARNING_MESSAGE); return; } - new PCAPanel(af.alignPanel, modelName, params); + pcaPanel = new PCAPanel(af.alignPanel, modelName, params); } /** @@ -638,4 +629,9 @@ public class CalculationChooser extends JPanel { } } + + public PCAPanel getPcaPanel() + { + return pcaPanel; + } }