
Public Member Functions | |
| CachedFont (Font original) | |
| Font | getWithStyle (int style) |
| Font | getOriginal () |
Private Member Functions | |
| final String | getStyleKey (int style) |
Private Attributes | |
| final Font | original |
| HashMap | derivedFonts = new HashMap() |
A small helper class that caches derived fonts, instead of creating a new Font every time the method java.awt.Font#deriveFont(int) is called
,
,
| cern::gp::beans::editors::support::CachedFont::CachedFont | ( | Font | original | ) | [inline] |
a constructor with the first font used, (must not be plain)
| original,must | be non-null |
References derivedFonts, and getStyleKey().
| Font cern::gp::beans::editors::support::CachedFont::getOriginal | ( | ) | [inline] |
References original.
| final String cern::gp::beans::editors::support::CachedFont::getStyleKey | ( | int | style | ) | [inline, private] |
Referenced by CachedFont(), and getWithStyle().
| Font cern::gp::beans::editors::support::CachedFont::getWithStyle | ( | int | style | ) | [inline] |
return a font with the style applied, such as defined in Font#getStyle()
| style |
References derivedFonts, getStyleKey(), and original.
HashMap cern::gp::beans::editors::support::CachedFont::derivedFonts = new HashMap() [private] |
Referenced by CachedFont(), and getWithStyle().
final Font cern::gp::beans::editors::support::CachedFont::original [private] |
Referenced by getOriginal(), and getWithStyle().
1.6.2