From eab172160ce8e1f0d3ca95c1c273124a194e13e4 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Wed, 14 Sep 2005 11:52:06 +0000 Subject: [PATCH] Use getTreeFont instead of getFont --- src/jalview/gui/FontChooser.java | 6 +++--- src/jalview/gui/Jalview2XML.java | 10 +++++----- src/jalview/gui/TreePanel.java | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/jalview/gui/FontChooser.java b/src/jalview/gui/FontChooser.java index 98d3ecb..ddaf4aa 100755 --- a/src/jalview/gui/FontChooser.java +++ b/src/jalview/gui/FontChooser.java @@ -50,7 +50,7 @@ public class FontChooser extends GFontChooser public FontChooser(TreePanel tp) { this.tp = tp; - oldFont = tp.getFont(); + oldFont = tp.getTreeFont(); defaultButton.setVisible(false); init(); } @@ -139,7 +139,7 @@ public class FontChooser extends GFontChooser } else if(tp!=null) { - tp.setFont(oldFont); + tp.setTreeFont(oldFont); } fontName.setSelectedItem(oldFont.getName()); fontSize.setSelectedItem(oldFont.getSize() + ""); @@ -169,7 +169,7 @@ public class FontChooser extends GFontChooser } else if(tp != null) { - tp.setFont(newFont); + tp.setTreeFont(newFont); } } diff --git a/src/jalview/gui/Jalview2XML.java b/src/jalview/gui/Jalview2XML.java index bb95476..a901741 100755 --- a/src/jalview/gui/Jalview2XML.java +++ b/src/jalview/gui/Jalview2XML.java @@ -221,9 +221,9 @@ public class Jalview2XML tree.setThreshold(tp.treeCanvas.threshold); tree.setFitToWindow(tp.fitToWindow.getState()); - tree.setFontName(tp.getFont().getName()); - tree.setFontSize(tp.getFont().getSize()); - tree.setFontStyle(tp.getFont().getStyle()); + tree.setFontName(tp.getTreeFont().getName()); + tree.setFontSize(tp.getTreeFont().getSize()); + tree.setFontStyle(tp.getTreeFont().getStyle()); tree.setMarkUnlinked(tp.placeholdersMenu.getState()); tree.setShowBootstrap(tp.bootstrapMenu.getState()); tree.setShowDistances(tp.distanceMenu.getState()); @@ -790,11 +790,11 @@ public class Jalview2XML tp.fitToWindow_actionPerformed(null); if(tree.getFontName()!=null) - tp.setFont(new java.awt.Font(tree.getFontName(), + tp.setTreeFont(new java.awt.Font(tree.getFontName(), tree.getFontStyle(), tree.getFontSize())); else - tp.setFont(new java.awt.Font(view.getFontName(), + tp.setTreeFont(new java.awt.Font(view.getFontName(), view.getFontStyle(), tree.getFontSize())); diff --git a/src/jalview/gui/TreePanel.java b/src/jalview/gui/TreePanel.java index 603a80f..f086162 100755 --- a/src/jalview/gui/TreePanel.java +++ b/src/jalview/gui/TreePanel.java @@ -311,15 +311,15 @@ public class TreePanel extends GTreePanel return; } - FontChooser fontchooser = new FontChooser(this); + new FontChooser(this); } - public Font getFont() + public Font getTreeFont() { - return treeCanvas.font; + return treeCanvas.font; } - public void setFont(Font font) + public void setTreeFont(Font font) { if(treeCanvas!=null) treeCanvas.setFont(font); -- 1.7.10.2