use of org.eclipse.swt.graphics.FontData in project tdi-studio-se by Talend.
the class DataBusinessItemNameEditPart method refreshFont.
/**
* @generated
*/
protected void refreshFont() {
FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
use of org.eclipse.swt.graphics.FontData in project tdi-studio-se by Talend.
the class ActionBusinessItemNameEditPart method refreshFont.
/**
* @generated
*/
protected void refreshFont() {
FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
use of org.eclipse.swt.graphics.FontData in project tdi-studio-se by Talend.
the class TerminalBusinessItemNameEditPart method refreshFont.
/**
* @generated
*/
protected void refreshFont() {
FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
use of org.eclipse.swt.graphics.FontData in project tdi-studio-se by Talend.
the class ListBusinessItemNameEditPart method refreshFont.
/**
* @generated
*/
protected void refreshFont() {
FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
use of org.eclipse.swt.graphics.FontData in project tdi-studio-se by Talend.
the class SWTResourceManager method getFont.
/**
* Returns a font based on its name, height and style
*
* @param name String The name of the font
* @param height int The height of the font
* @param style int The style of the font
* @return Font The font matching the name, height and style
*/
public static Font getFont(String name, int height, int style) {
String fontName = name + '|' + height + '|' + style;
Font font = m_FontMap.get(fontName);
if (font == null) {
FontData fontData = new FontData(name, height, style);
font = new Font(Display.getCurrent(), fontData);
m_FontMap.put(fontName, font);
}
return font;
}
Aggregations