/*\r
* Jalview - A Sequence Alignment Editor and Viewer\r
- * Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle\r
+ * Copyright (C) 2006 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle\r
*\r
* This program is free software; you can redistribute it and/or\r
* modify it under the terms of the GNU General Public License\r
\r
public void drawText(SequenceI seq, int start, int end, int y1)\r
{\r
+ Font boldFont = null;\r
+ boolean bold = false;\r
+ if(av.upperCasebold)\r
+ {\r
+ boldFont = new Font(av.getFont().getName(), Font.BOLD, av.charHeight);\r
+\r
+ graphics.setFont(av.getFont());\r
+ }\r
\r
y1 += av.charHeight - av.charHeight / 5; // height/5 replaces pady\r
\r
}\r
}\r
\r
+ if (av.upperCasebold)\r
+ {\r
+ fm = graphics.getFontMetrics();\r
+ if ('A' <= s && s <= 'Z')\r
+ {\r
+ if(!bold)\r
+ {\r
+\r
+ graphics.setFont(boldFont);\r
+ }\r
+ bold = true;\r
+ }\r
+ else if(bold)\r
+ {\r
+ graphics.setFont(av.font);\r
+ bold = false;\r
+ }\r
+\r
+ }\r
+\r
charOffset = (av.charWidth - fm.charWidth(s)) / 2;\r
graphics.drawString(String.valueOf(s),\r
charOffset + av.charWidth * (i - start),\r