Added full names to the tree algorithm enum
authorkjvdheide <kjvanderheide@dundee.ac.uk>
Thu, 26 Oct 2017 14:46:08 +0000 (15:46 +0100)
committerkjvdheide <kjvanderheide@dundee.ac.uk>
Thu, 26 Oct 2017 14:46:08 +0000 (15:46 +0100)
src/jalview/analysis/TreeAlgorithm.java
src/jalview/gui/CalculationChooser.java

index 55175f2..7aaa913 100644 (file)
@@ -2,13 +2,30 @@ package jalview.analysis;
 
 public enum TreeAlgorithm
 {
-  NEIGHBOUR_JOINING("NJ"), AVERAGE_DISTANCE("AV"), MAXIMUM_PARSIMONY("MP"),
-  MAXIMUM_LIKELIHOOD("ML"), BAYESIAN("BY");
+  NEIGHBOUR_JOINING("NJ", "Neighbour Joining"),
+  AVERAGE_DISTANCE("AV", "Average Distance (UPGMA)"),
+  MAXIMUM_PARSIMONY("MP", ("Maximum Parsimony")),
+  MAXIMUM_LIKELIHOOD("ML", "Maximum Likelihood"),
+  BAYESIAN("BY", "Bayesian Inference");
 
   private final String abbreviation;
 
-  TreeAlgorithm(String abbreviatedAlgorithm)
+  private final String name;
+
+  TreeAlgorithm(String abbreviatedName, String fullName)
+  {
+    this.abbreviation = abbreviatedName;
+    this.name = fullName;
+  }
+
+  public String getAbbreviation()
   {
-    this.abbreviation = abbreviatedAlgorithm;
+    return abbreviation;
   }
+
+  public String getName()
+  {
+    return name;
+  }
+
 }
index 8b4c212..ebb12b9 100644 (file)
@@ -483,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);
+
+
 
 
     }