X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FCalculationChooser.java;h=bd6c5ee5e011780b4dbda61ce9b3e91d35189a42;hb=53b99b41ed7f26f2724f3ed87d524eb83c5208f4;hp=f2d65e54f1e54bdcffa6d9730f303f7eaf157e22;hpb=90ae01c1c1504e0ae42817f78116f1d35b317c47;p=jalview.git diff --git a/src/jalview/gui/CalculationChooser.java b/src/jalview/gui/CalculationChooser.java index f2d65e5..bd6c5ee 100644 --- a/src/jalview/gui/CalculationChooser.java +++ b/src/jalview/gui/CalculationChooser.java @@ -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); } /**