cern::gp::beans::editors::support::CachedFont Class Reference

Collaboration diagram for cern::gp::beans::editors::support::CachedFont:
Collaboration graph
[legend]

List of all members.

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()

Detailed Description

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

Author:
Vito Baggiolini
Version:
Revision
1.2

,

Date
2006/09/25 08:52:36

,

Author
acaproni
Since:
2.0.6

Constructor & Destructor Documentation

cern::gp::beans::editors::support::CachedFont::CachedFont ( Font  original  )  [inline]

a constructor with the first font used, (must not be plain)

Parameters:
original,must be non-null

References derivedFonts, and getStyleKey().


Member Function Documentation

Font cern::gp::beans::editors::support::CachedFont::getOriginal (  )  [inline]
Returns:
Returns the original font passed in the constructor.

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()

Parameters:
style 
Returns:
a (cached) instance of the font

References derivedFonts, getStyleKey(), and original.


Member Data Documentation

Referenced by CachedFont(), and getWithStyle().

Referenced by getOriginal(), and getWithStyle().


The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2