- // fmWidth = fm.charsWidth(displayChar.toCharArray(), 0,
- // displayChar.length());
- //
- // if (scaleColLabel)
- // {
- // justify the label and scale to fit in column
- if (fmWidth > charWidth)
- {
- // scale only if the current font isn't already small enough
- fmScaling = charWidth;
- fmScaling /= fmWidth;
- if (Jalview.isJS())
- {
- gg.setFont(ofont);
- gg.transform(AffineTransform.getScaleInstance(fmScaling,
- 1.0));
- }
- else
- {
- g.setFont(ofont.deriveFont(AffineTransform
- .getScaleInstance(fmScaling, 1.0)));
- }
- // and update the label's width to reflect the scaling.
- fmWidth = charWidth;
- }
- // }