- // if (aa.annotations[column].value==0) {
- // g.setFont(ofont.deriveFont(AffineTransform.getScaleInstance(wdth,
- // (ht2=(aa.graphHeight*0.1/av.charHeight)))));
- // ht = y2-(int)ht2;
- // } else {
- g.setFont(ofont.deriveFont(AffineTransform.getScaleInstance(
- wdth, (ht2 = (htn * ((double) profl[c++]) / 100.0))
- / av.charHeight)));
- lm = g.getFontMetrics().getLineMetrics(dc, 0, 1, g);
- // htn -=ht2;
- // }
- g.setColor(profcolour.findColour(dc[0])); // (av.globalColourScheme!=null)
- // ? );// try to get a
- // colourscheme for the
- // group(aa.groupRef.cs==null)
- // ? av.textColour2 :
- // cs.findColour(dc));
- //System.out.println(dc[0]);
- g.drawChars(dc, 0, 1, x * av.charWidth,
- (int) (ht + lm.getHeight()));
- // ht+=g.getFontMetrics().getAscent()-g.getFontMetrics().getDescent();
+ dc = new char[1];
+ }
+
+ LineMetrics lm;
+ for (int c = 1; profl != null && c < profl[0];)
+ {
+ dc[0] = (char) profl[c++];
+
+ if (aa.label.startsWith("StrucConsensus"))
+ {
+ dc[1] = 'A';
+ }
+
+ wdth = av.charWidth;
+ wdth /= (float) fm.charsWidth(dc, 0, dc.length);
+
+ if (c > 2)
+ {
+ ht += (int) ht2;
+ }
+ {
+ // if (aa.annotations[column].value==0) {
+ // g.setFont(ofont.deriveFont(AffineTransform.getScaleInstance(wdth,
+ // (ht2=(aa.graphHeight*0.1/av.charHeight)))));
+ // ht = y2-(int)ht2;
+ // } else {
+ g.setFont(ofont.deriveFont(AffineTransform.getScaleInstance(
+ wdth, (ht2 = (htn * ((double) profl[c++]) / 100.0))
+ / av.charHeight)));
+ lm = g.getFontMetrics().getLineMetrics(dc, 0, 1, g);
+ // htn -=ht2;
+ // }
+ g.setColor(profcolour.findColour(dc[0])); // (av.globalColourScheme!=null)
+ // ? );// try to get a
+ // colourscheme for the
+ // group(aa.groupRef.cs==null)
+ // ? av.textColour2 :
+ // cs.findColour(dc));
+ // System.out.println(dc[0]);
+
+ g.drawChars(dc, 0, dc.length, x * av.charWidth,
+ (int) (ht + lm.getHeight()));
+
+ // ht+=g.getFontMetrics().getAscent()-g.getFontMetrics().getDescent();
+ }