[Japi-cvs] SF.net SVN: japi: [592] progs/jeduca/trunk/src/net/sf/japi/progs/jeduca/ swing/list/Act
Status: Beta
Brought to you by:
christianhujer
From: <chr...@us...> - 2007-08-23 11:19:27
|
Revision: 592 http://japi.svn.sourceforge.net/japi/?rev=592&view=rev Author: christianhujer Date: 2007-08-23 04:19:24 -0700 (Thu, 23 Aug 2007) Log Message: ----------- Removed magic number. Modified Paths: -------------- progs/jeduca/trunk/src/net/sf/japi/progs/jeduca/swing/list/ActionListCellRenderer.java Modified: progs/jeduca/trunk/src/net/sf/japi/progs/jeduca/swing/list/ActionListCellRenderer.java =================================================================== --- progs/jeduca/trunk/src/net/sf/japi/progs/jeduca/swing/list/ActionListCellRenderer.java 2007-08-23 10:49:24 UTC (rev 591) +++ progs/jeduca/trunk/src/net/sf/japi/progs/jeduca/swing/list/ActionListCellRenderer.java 2007-08-23 11:19:24 UTC (rev 592) @@ -40,6 +40,9 @@ */ public class ActionListCellRenderer extends JButton implements ListCellRenderer { + /** The factor to multiply the font with to derive a slightly larger font. */ + private static final double FONT_SCALE = 4.0 / 3.0; + /** Serial Version. */ @SuppressWarnings({"AnalyzingVariableNaming"}) private static final long serialVersionUID = 1L; @@ -53,7 +56,7 @@ setHorizontalAlignment(CENTER); setBorder(new EmptyBorder(3, 3, 3, 3)); final Font f = getFont(); - setFont(f.deriveFont( BOLD, (float) (f.getSize2D() * (4.0/3.0)) )); + setFont(f.deriveFont(BOLD, (float) (f.getSize2D() * FONT_SCALE))); } /** {@inheritDoc} */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |