Package com._1c.g5.v8.dt.moxel.ui.editor
Class FontDimensionsCache
- java.lang.Object
-
- com._1c.g5.v8.dt.moxel.ui.editor.FontDimensionsCache
-
- All Implemented Interfaces:
IFontDimensionsCache
public class FontDimensionsCache extends Object implements IFontDimensionsCache
Font dimensions cache implementation
-
-
Constructor Summary
Constructors Constructor Description FontDimensionsCache()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearCache()
Clear cacheInteger
getFontHeightFromCache(Font font)
Get average symbol width of specified font from cacheInteger
getFontWidthFromCache(Font font)
Get average symbol width of specified font from cachevoid
putFontHeightToCache(Font font, Integer height)
Put specified font height to cachevoid
putFontWidthToCache(Font font, Integer width)
Put specified font width to cache
-
-
-
Method Detail
-
putFontHeightToCache
public void putFontHeightToCache(Font font, Integer height)
Description copied from interface:IFontDimensionsCache
Put specified font height to cache- Specified by:
putFontHeightToCache
in interfaceIFontDimensionsCache
- Parameters:
font
- - font
-
putFontWidthToCache
public void putFontWidthToCache(Font font, Integer width)
Description copied from interface:IFontDimensionsCache
Put specified font width to cache- Specified by:
putFontWidthToCache
in interfaceIFontDimensionsCache
- Parameters:
font
- - fontwidth
- - average symbol width of specified font (in units)
-
getFontHeightFromCache
public Integer getFontHeightFromCache(Font font)
Description copied from interface:IFontDimensionsCache
Get average symbol width of specified font from cache- Specified by:
getFontHeightFromCache
in interfaceIFontDimensionsCache
- Parameters:
font
- - font- Returns:
- average symbol width of specified font (in units) or null if not cached yet
-
getFontWidthFromCache
public Integer getFontWidthFromCache(Font font)
Description copied from interface:IFontDimensionsCache
Get average symbol width of specified font from cache- Specified by:
getFontWidthFromCache
in interfaceIFontDimensionsCache
- Parameters:
font
- - font- Returns:
- average symbol width of specified font (in units) or null if not cached yet
-
clearCache
public void clearCache()
Description copied from interface:IFontDimensionsCache
Clear cache- Specified by:
clearCache
in interfaceIFontDimensionsCache
-
-