Added TreeBuilder as parameter to the converter constructor
[jalview.git] / src / jalview / gui / CalculationChooser.java
index 83445b4..ebb12b9 100644 (file)
@@ -108,6 +108,11 @@ public class CalculationChooser extends JPanel
 
   List<String> tips = new ArrayList<>();
 
+  /*
+   * the most recently opened PCA results panel
+   */
+  private PCAPanel pcaPanel;
+
   /**
    * Constructor
    * 
@@ -478,11 +483,13 @@ public class CalculationChooser extends JPanel
               substitutionMatrix, params);
       TreeBuilder calculatedTree = treeCalculator
               .makeTree(af.getViewport());
-      TreeModel tree = new TreeModel(calculatedTree);
 
-      openTreePanel(tree, treeAlgo, substitutionMatrix);
       ArchaeopteryxInit.createInstance(calculatedTree);
 
+      TreeModel tree = new TreeModel(calculatedTree);
+      openTreePanel(tree, treeAlgo, substitutionMatrix);
+
+
 
 
     }
@@ -565,7 +572,7 @@ public class CalculationChooser extends JPanel
               JvOptionPane.WARNING_MESSAGE);
       return;
     }
-    new PCAPanel(af.alignPanel, modelName, params);
+    pcaPanel = new PCAPanel(af.alignPanel, modelName, params);
   }
 
   /**
@@ -607,7 +614,6 @@ public class CalculationChooser extends JPanel
      */
     boolean matchGap = doPCA ? false : treeMatchGaps;
 
-
     return new SimilarityParams(includeGapGap, matchGap, includeGapResidue,
             matchOnShortestLength);
   }
@@ -624,4 +630,9 @@ public class CalculationChooser extends JPanel
     {
     }
   }
+
+  public PCAPanel getPcaPanel()
+  {
+    return pcaPanel;
+  }
 }