com.croftsoft.core.awt.font
Class FontLib

java.lang.Object
  extended by com.croftsoft.core.awt.font.FontLib

public final class FontLib
extends Object

Library of static methods for manipulating Fonts.

Since:
2002-03-02
Version:
2003-02-10
Author:
David Wallace Croft

Method Summary
static Rectangle2D getTextLayoutBounds(Component component, String text)
           
static void setMaxFont(Component component, String text, String fontName, int fontStyle, double maxWidth, double maxHeight)
          Sets the Graphics Font size so that it maximizes the bounded text.
static void setMaxFont(Graphics graphics, String text, String fontName, int fontStyle, double maxWidth, double maxHeight)
          Sets the Graphics Font size so that it maximizes the bounded text.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getTextLayoutBounds

public static Rectangle2D getTextLayoutBounds(Component component,
                                              String text)

setMaxFont

public static void setMaxFont(Graphics graphics,
                              String text,
                              String fontName,
                              int fontStyle,
                              double maxWidth,
                              double maxHeight)
Sets the Graphics Font size so that it maximizes the bounded text.


setMaxFont

public static void setMaxFont(Component component,
                              String text,
                              String fontName,
                              int fontStyle,
                              double maxWidth,
                              double maxHeight)
Sets the Graphics Font size so that it maximizes the bounded text.


CroftSoft Javadoc

CroftSoft Core Javadoc (2008-09-28 20:58:02)