ShowDistances, placeHolders and bootstraps have their own methods
authoramwaterhouse <Andrew Waterhouse>
Mon, 19 Sep 2005 12:49:14 +0000 (12:49 +0000)
committeramwaterhouse <Andrew Waterhouse>
Mon, 19 Sep 2005 12:49:14 +0000 (12:49 +0000)
src/jalview/gui/TreePanel.java

index c6c9b53..fea4704 100755 (executable)
@@ -75,8 +75,7 @@ public class TreePanel extends GTreePanel
       initTreePanel(av, seqVector, type, pwtype, s, e, null);\r
 \r
       // We know this tree has distances. JBPNote TODO: prolly should add this as a userdefined default\r
-      treeCanvas.setShowDistances(true);\r
-      distanceMenu.setSelected(true);\r
+      showDistances(true);\r
     }\r
 \r
     /**\r
@@ -148,11 +147,8 @@ public class TreePanel extends GTreePanel
         {\r
           // Must be outside run(), as Jalview2XML tries to\r
           // update distance/bootstrap visibility at the same time\r
-          treeCanvas.setShowBootstrap(newtree.HasBootstrap());\r
-          bootstrapMenu.setSelected(newtree.HasBootstrap());\r
-\r
-          treeCanvas.setShowDistances(newtree.HasDistances());\r
-          distanceMenu.setSelected(newtree.HasDistances());\r
+          showBootstrap(newtree.HasBootstrap());\r
+          showDistances(newtree.HasDistances());\r
         }\r
       }\r
 \r
@@ -172,6 +168,26 @@ public class TreePanel extends GTreePanel
       }\r
     }\r
 \r
+    public void showDistances(boolean b)\r
+    {\r
+      treeCanvas.setShowDistances(b);\r
+      distanceMenu.setSelected(b);\r
+    }\r
+\r
+    public void showBootstrap(boolean b)\r
+    {\r
+      treeCanvas.setShowBootstrap(b);\r
+      bootstrapMenu.setSelected(b);\r
+    }\r
+\r
+    public void showPlaceholders(boolean b)\r
+    {\r
+      placeholdersMenu.setState(b);\r
+      treeCanvas.setMarkPlaceholders(b);\r
+    }\r
+\r
+\r
+\r
 \r
     /**\r
      * DOCUMENT ME!\r