Start of creating the objects Archaeopteryx needs
[jalview.git] / src / jalview / gui / CalculationChooser.java
index f2d65e5..bd6c5ee 100644 (file)
@@ -460,26 +460,26 @@ public class CalculationChooser extends JPanel
   protected void calculate_actionPerformed()
   {
     boolean doPCA = pca.isSelected();
-    String modelName = modelNames.getSelectedItem().toString();
+    String substitutionMatrix = modelNames.getSelectedItem().toString();
     SimilarityParamsI params = getSimilarityParameters(doPCA);
 
     if (doPCA)
     {
-      openPcaPanel(modelName, params);
+      openPcaPanel(substitutionMatrix, params);
     }
     else
     {
-      calculateTree();
-      openTreePanel(modelName, params);
+
+      String treeAlgo = determineTreeAlgo();
+      // TreeCalculator calculateTree = new TreeCalculator(treeAlgo,
+      // substitutionMatrix, params);
+
+      openTreePanel(treeAlgo, substitutionMatrix, params);
     }
 
     // closeFrame();
   }
 
-  protected void calculateTree()
-  {
-
-  }
   protected String determineTreeAlgo() // to be modified & expanded
   {
     String treeAlgorithm = neighbourJoining.isSelected()
@@ -509,7 +509,8 @@ public class CalculationChooser extends JPanel
    * Open a new Tree panel on the desktop
    * 
    */
-  protected void openTreePanel(String modelName, SimilarityParamsI params)
+  protected void openTreePanel(String treeType, String substitutionMatrix,
+          SimilarityParamsI params)
   {
     /*
      * gui validation shouldn't allow insufficient sequences here, but leave
@@ -517,9 +518,9 @@ public class CalculationChooser extends JPanel
      */
     checkEnoughSequences(af.getViewport());
 
-    String treeType = determineTreeAlgo();
 
-    af.newTreePanel(treeType, modelName, params);
+
+    af.newTreePanel(treeType, substitutionMatrix, params);
   }
 
   /**