|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.graphstream.ui.swingViewer.util.FontCache
public class FontCache
A cache for fonts.
This cache allows to avoid reloading fonts and allows to quickly lookup a font based on its name, its style (bold, italic) and its size.
Field Summary | |
---|---|
static FontCache |
defaultFontCache
The default font cache. |
Constructor Summary | |
---|---|
FontCache()
New empty font cache. |
Method Summary | |
---|---|
static FontCache |
defaultFontCache()
Default singleton instance for shared font cache. |
Font |
getDefaultFont()
The default font. |
Font |
getDefaultFont(StyleConstants.TextStyle style,
int size)
|
Font |
getFont(String name,
StyleConstants.TextStyle style,
int size)
Lookup a font, and if not found, try to load it, if still not available, return the default font. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static FontCache defaultFontCache
Constructor Detail |
---|
public FontCache()
Method Detail |
---|
public Font getDefaultFont()
public static FontCache defaultFontCache()
public Font getDefaultFont(StyleConstants.TextStyle style, int size)
public Font getFont(String name, StyleConstants.TextStyle style, int size)
name
- The font name.style
- A style, taken from the styles available in the style sheets.size
- The font size in points.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |