From: kjvdheide Date: Thu, 26 Oct 2017 14:46:08 +0000 (+0100) Subject: Added full names to the tree algorithm enum X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=3cd08a9d5d30d45c06b57f494441721979d82932;p=jalview.git Added full names to the tree algorithm enum --- diff --git a/src/jalview/analysis/TreeAlgorithm.java b/src/jalview/analysis/TreeAlgorithm.java index 55175f2..7aaa913 100644 --- a/src/jalview/analysis/TreeAlgorithm.java +++ b/src/jalview/analysis/TreeAlgorithm.java @@ -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; + } + } diff --git a/src/jalview/gui/CalculationChooser.java b/src/jalview/gui/CalculationChooser.java index 8b4c212..ebb12b9 100644 --- a/src/jalview/gui/CalculationChooser.java +++ b/src/jalview/gui/CalculationChooser.java @@ -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); + + }