From 3bb3bf052916ca69a915a48324a122b0e3f20651 Mon Sep 17 00:00:00 2001 From: jprocter Date: Wed, 14 Sep 2011 13:54:23 +0100 Subject: [PATCH] JAL-934 - standard label font functions --- src/jalview/gui/JvSwingUtils.java | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/jalview/gui/JvSwingUtils.java b/src/jalview/gui/JvSwingUtils.java index 812353e..2650eae 100644 --- a/src/jalview/gui/JvSwingUtils.java +++ b/src/jalview/gui/JvSwingUtils.java @@ -148,4 +148,27 @@ public final class JvSwingUtils jLabel.setToolTipText(tooltip); } + /** + * standard font for labels and check boxes in dialog boxes + * @return + */ + + public static Font getLabelFont() + { + return getLabelFont(false,false); + } + public static Font getLabelFont(boolean bold, boolean italic) + { + return new java.awt.Font("Verdana", (!bold && !italic) ? Font.PLAIN : (bold ? Font.BOLD : 0) + (italic ? Font.ITALIC : 0), 11); + } + + /** + * standard font for editable text areas + * @return + */ + public static Font getTextAreaFont() + { + return getLabelFont(false,false); + } + } -- 1.7.10.2