|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object prefuse.util.FontLib
public class FontLib
Library maintaining a cache of fonts and other useful font computation routines.
Constructor Summary | |
---|---|
FontLib()
|
Method Summary | |
---|---|
static void |
clearCache()
Clear the Font object cache. |
static int |
getCacheLookupCount()
Get the number of cache lookups to the Font object cache. |
static int |
getCacheMissCount()
Get the number of cache misses to the Font object cache. |
static java.awt.Font |
getFont(java.lang.String name,
double size)
Get a Font instance with the given font family name and size. |
static java.awt.Font |
getFont(java.lang.String name,
int style,
double size)
Get a Font instance with the given font family name, style, and size |
static java.awt.Font |
getFont(java.lang.String name,
int style,
int size)
Get a Font instance with the given font family name, style, and size |
static java.awt.Font |
getIntermediateFont(java.awt.Font f1,
java.awt.Font f2,
double frac)
Interpolate between two font instances. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FontLib()
Method Detail |
---|
public static java.awt.Font getFont(java.lang.String name, double size)
name
- the font name. Any font installed on your system should
be valid. Common examples include "Arial", "Verdana", "Tahoma",
"Times New Roman", "Georgia", and "Courier New".size
- the size, in points, of the font
public static java.awt.Font getFont(java.lang.String name, int style, double size)
name
- the font name. Any font installed on your system should
be valid. Common examples include "Arial", "Verdana", "Tahoma",
"Times New Roman", "Georgia", and "Courier New".style
- the font style, such as bold or italics. This field
uses the same style values as the Java Font
class.size
- the size, in points, of the font
public static java.awt.Font getFont(java.lang.String name, int style, int size)
name
- the font name. Any font installed on your system should
be valid. Common examples include "Arial", "Verdana", "Tahoma",
"Times New Roman", "Georgia", and "Courier New".style
- the font style, such as bold or italics. This field
uses the same style values as the Java Font
class.size
- the size, in points, of the font
public static int getCacheMissCount()
public static int getCacheLookupCount()
public static void clearCache()
public static java.awt.Font getIntermediateFont(java.awt.Font f1, java.awt.Font f2, double frac)
f1
- the starting fontf2
- the target fontfrac
- a fraction between 0 and 1.0 controlling the interpolation
amount.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |