Use getTreeFont instead of getFont
authoramwaterhouse <Andrew Waterhouse>
Wed, 14 Sep 2005 11:52:06 +0000 (11:52 +0000)
committeramwaterhouse <Andrew Waterhouse>
Wed, 14 Sep 2005 11:52:06 +0000 (11:52 +0000)
src/jalview/gui/FontChooser.java
src/jalview/gui/Jalview2XML.java
src/jalview/gui/TreePanel.java

index 98d3ecb..ddaf4aa 100755 (executable)
@@ -50,7 +50,7 @@ public class FontChooser extends GFontChooser
     public FontChooser(TreePanel tp)\r
     {\r
       this.tp = tp;\r
-      oldFont = tp.getFont();\r
+      oldFont = tp.getTreeFont();\r
       defaultButton.setVisible(false);\r
       init();\r
     }\r
@@ -139,7 +139,7 @@ public class FontChooser extends GFontChooser
         }\r
         else if(tp!=null)\r
         {\r
-          tp.setFont(oldFont);\r
+          tp.setTreeFont(oldFont);\r
         }\r
         fontName.setSelectedItem(oldFont.getName());\r
         fontSize.setSelectedItem(oldFont.getSize() + "");\r
@@ -169,7 +169,7 @@ public class FontChooser extends GFontChooser
       }\r
       else if(tp != null)\r
       {\r
-        tp.setFont(newFont);\r
+        tp.setTreeFont(newFont);\r
       }\r
     }\r
 \r
index bb95476..a901741 100755 (executable)
@@ -221,9 +221,9 @@ public class Jalview2XML
                   tree.setThreshold(tp.treeCanvas.threshold);\r
 \r
                   tree.setFitToWindow(tp.fitToWindow.getState());\r
-                  tree.setFontName(tp.getFont().getName());\r
-                  tree.setFontSize(tp.getFont().getSize());\r
-                  tree.setFontStyle(tp.getFont().getStyle());\r
+                  tree.setFontName(tp.getTreeFont().getName());\r
+                  tree.setFontSize(tp.getTreeFont().getSize());\r
+                  tree.setFontStyle(tp.getTreeFont().getStyle());\r
                   tree.setMarkUnlinked(tp.placeholdersMenu.getState());\r
                   tree.setShowBootstrap(tp.bootstrapMenu.getState());\r
                   tree.setShowDistances(tp.distanceMenu.getState());\r
@@ -790,11 +790,11 @@ public class Jalview2XML
                     tp.fitToWindow_actionPerformed(null);\r
 \r
                     if(tree.getFontName()!=null)\r
-                      tp.setFont(new java.awt.Font(tree.getFontName(),\r
+                      tp.setTreeFont(new java.awt.Font(tree.getFontName(),\r
                                           tree.getFontStyle(),\r
                                           tree.getFontSize()));\r
                     else\r
-                      tp.setFont(new java.awt.Font(view.getFontName(),\r
+                      tp.setTreeFont(new java.awt.Font(view.getFontName(),\r
                                             view.getFontStyle(),\r
                                             tree.getFontSize()));\r
 \r
index 603a80f..f086162 100755 (executable)
@@ -311,15 +311,15 @@ public class TreePanel extends GTreePanel
             return;\r
         }\r
 \r
-        FontChooser fontchooser = new FontChooser(this);\r
+        new FontChooser(this);\r
     }\r
 \r
-    public Font getFont()\r
+    public Font getTreeFont()\r
     {\r
-      return treeCanvas.font;\r
+        return treeCanvas.font;\r
     }\r
 \r
-    public void setFont(Font font)\r
+    public void setTreeFont(Font font)\r
     {\r
       if(treeCanvas!=null)\r
       treeCanvas.setFont(font);\r