upperCaseBold
authoramwaterhouse <Andrew Waterhouse>
Tue, 3 Oct 2006 09:17:40 +0000 (09:17 +0000)
committeramwaterhouse <Andrew Waterhouse>
Tue, 3 Oct 2006 09:17:40 +0000 (09:17 +0000)
src/jalview/appletgui/AlignViewport.java

index 87753f4..fc46386 100755 (executable)
@@ -50,6 +50,7 @@ public class AlignViewport
   boolean showConservation = true;\r
   boolean showQuality = true;\r
   boolean showConsensus = true;\r
+  boolean upperCasebold = false;\r
 \r
   boolean colourAppliesToAllGroups = true;\r
   ColourSchemeI globalColourScheme = null;\r
@@ -79,7 +80,7 @@ public class AlignViewport
 \r
   // The following vector holds the features which are\r
  // currently visible, in the correct order or rendering\r
-  Hashtable featuresDisplayed;\r
+  public Hashtable featuresDisplayed;\r
 \r
   boolean hasHiddenColumns = false;\r
   boolean hasHiddenRows = false;\r
@@ -147,6 +148,14 @@ public class AlignViewport
       {\r
         showConsensus = Boolean.valueOf(param).booleanValue();\r
       }\r
+\r
+      param = applet.getParameter("upperCase");\r
+      if (param != null)\r
+      {\r
+        if(param.equalsIgnoreCase("bold"))\r
+          upperCasebold = true;\r
+      }\r
+\r
     }\r
     // We must set conservation and consensus before setting colour,\r
     // as Blosum and Clustal require this to be done\r
@@ -493,6 +502,13 @@ public class AlignViewport
     java.awt.FontMetrics fm = nullFrame.getGraphics().getFontMetrics(font);\r
     setCharHeight(fm.getHeight());\r
     charWidth = fm.charWidth('M');\r
+\r
+    if(upperCasebold)\r
+    {\r
+      Font f2 = new Font(f.getName(), Font.BOLD, f.getSize());\r
+      fm = nullFrame.getGraphics().getFontMetrics(f2);\r
+      charWidth = fm.stringWidth("MMMMMMMMMMM") / 10;\r
+    }\r
   }\r
 \r
   public Font getFont()\r