use of de.jaret.util.swt.FontManager in project translationstudio8 by heartsome.
the class CellRendererBase method getFont.
/**
* Retrieve the font accrding to the cell style.
*
* @param style cell style
* @param printing true for printing
* @param defaultFont a default font used if no font can be retrieved
* @return font according to style or default font
*/
protected Font getFont(ICellStyle style, boolean printing, Font defaultFont) {
Device device = printing ? _printer : Display.getCurrent();
FontManager fm = FontManager.getFontManager(device);
Font f = style.getFont() != null ? fm.getFont(style.getFont()) : defaultFont;
return f;
}
Aggregations