From b1e47fe0d3fed7ed7cd9040ba570db121502ba96 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Tue, 3 Oct 2006 09:17:40 +0000 Subject: [PATCH] upperCaseBold --- src/jalview/appletgui/AlignViewport.java | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/jalview/appletgui/AlignViewport.java b/src/jalview/appletgui/AlignViewport.java index 87753f4..fc46386 100755 --- a/src/jalview/appletgui/AlignViewport.java +++ b/src/jalview/appletgui/AlignViewport.java @@ -50,6 +50,7 @@ public class AlignViewport boolean showConservation = true; boolean showQuality = true; boolean showConsensus = true; + boolean upperCasebold = false; boolean colourAppliesToAllGroups = true; ColourSchemeI globalColourScheme = null; @@ -79,7 +80,7 @@ public class AlignViewport // The following vector holds the features which are // currently visible, in the correct order or rendering - Hashtable featuresDisplayed; + public Hashtable featuresDisplayed; boolean hasHiddenColumns = false; boolean hasHiddenRows = false; @@ -147,6 +148,14 @@ public class AlignViewport { showConsensus = Boolean.valueOf(param).booleanValue(); } + + param = applet.getParameter("upperCase"); + if (param != null) + { + if(param.equalsIgnoreCase("bold")) + upperCasebold = true; + } + } // We must set conservation and consensus before setting colour, // as Blosum and Clustal require this to be done @@ -493,6 +502,13 @@ public class AlignViewport java.awt.FontMetrics fm = nullFrame.getGraphics().getFontMetrics(font); setCharHeight(fm.getHeight()); charWidth = fm.charWidth('M'); + + if(upperCasebold) + { + Font f2 = new Font(f.getName(), Font.BOLD, f.getSize()); + fm = nullFrame.getGraphics().getFontMetrics(f2); + charWidth = fm.stringWidth("MMMMMMMMMMM") / 10; + } } public Font getFont() -- 1.7.10.2