|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jidesoft.swing.FontUtils
public class FontUtils
This is a global class to keep a record of Font so that we can improve the performance and memory usage in various scenarios like StyledLabel.
In this class, we have a global map of font and derived font. It probably could be huge after running a long time. In that case, you need explicitly clear the font cache in this class by usingclearDerivedFontCache()
.
Constructor Summary | |
---|---|
FontUtils()
|
Method Summary | |
---|---|
static void |
clearDerivedFontCache()
Clear cache whenever needed. |
static Font |
getCachedDerivedFont(Font font,
int style,
int size)
Get derived font by font, style and size. |
static int |
getDerivedFontCacheSize()
Gets the derived font cache size. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FontUtils()
Method Detail |
---|
public static int getDerivedFontCacheSize()
public static void clearDerivedFontCache()
public static Font getCachedDerivedFont(Font font, int style, int size)
font
- the original fontstyle
- the font stylesize
- the font size
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |