public class Utils
extends java.lang.Object
Constructor and Description |
---|
Utils() |
Modifier and Type | Method and Description |
---|---|
static org.eclipse.swt.graphics.Font |
applyBoldFont(org.eclipse.swt.graphics.Font font)
Takes a font and gives it a bold typeface.
|
static org.eclipse.swt.graphics.Font |
applyFontData(org.eclipse.swt.graphics.Font font,
int style,
int size)
Takes a font and gives it the typeface of the given style.
|
static org.eclipse.swt.graphics.Font |
applyFontSize(org.eclipse.swt.graphics.Font font,
int size)
Applies a certain font size to a font.
|
static void |
centerDialogOnScreen(org.eclipse.swt.widgets.Shell shell)
Centers a dialog (Shell) on the primary (active) display.
|
public static org.eclipse.swt.graphics.Font applyBoldFont(org.eclipse.swt.graphics.Font font)
font
- Font to modifypublic static org.eclipse.swt.graphics.Font applyFontData(org.eclipse.swt.graphics.Font font, int style, int size)
font
- Font to modifystyle
- the new style for the given font (e.g. SWT.BOLD|SWT.ITALIC)size
- New font sizepublic static org.eclipse.swt.graphics.Font applyFontSize(org.eclipse.swt.graphics.Font font, int size)
font
- Font to modifysize
- New font sizepublic static void centerDialogOnScreen(org.eclipse.swt.widgets.Shell shell)
shell
- Shell to center on screenShell