From f6235770cfcf11c4970e9dbe96ca293966611f24 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Mon, 12 Dec 2005 14:15:03 +0000 Subject: [PATCH] Font size label --- src/jalview/gui/AnnotationLabels.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/jalview/gui/AnnotationLabels.java b/src/jalview/gui/AnnotationLabels.java index 3bc78be..5ae610f 100755 --- a/src/jalview/gui/AnnotationLabels.java +++ b/src/jalview/gui/AnnotationLabels.java @@ -50,6 +50,7 @@ public class AnnotationLabels extends JPanel implements MouseListener, int mouseX; int selectedRow = 0; int scrollOffset = 0; + Font font = new Font("Arial", Font.PLAIN, 11); /** @@ -376,7 +377,11 @@ public class AnnotationLabels extends JPanel implements MouseListener, */ public void drawComponent(Graphics g, int width) { - g.setFont(new Font("Arial", Font.PLAIN, av.getFont().getSize()-3)); + if(av.getFont().getSize()<10) + g.setFont(new Font("Arial", Font.PLAIN, av.getFont().getSize()-1)); + else + g.setFont(font); + FontMetrics fm = g.getFontMetrics(g.getFont()); g.setColor(Color.white); g.fillRect(0, 0, getWidth(), getHeight()); -- 1.7.10.2