Class Utils
java.lang.Object
org.eclipse.nebula.widgets.ganttchart.Utils
public class Utils
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description Utils()
-
Method Summary
Modifier and Type Method 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.
-
Constructor Details
-
Utils
public Utils()
-
-
Method Details
-
applyBoldFont
public static org.eclipse.swt.graphics.Font applyBoldFont(org.eclipse.swt.graphics.Font font)Takes a font and gives it a bold typeface.- Parameters:
font
- Font to modify- Returns:
- Font with bold typeface
-
applyFontData
public 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.- Parameters:
font
- Font to modifystyle
- the new style for the given font (e.g. SWT.BOLD|SWT.ITALIC)size
- New font size- Returns:
- Font with the given typeface and size
-
applyFontSize
public static org.eclipse.swt.graphics.Font applyFontSize(org.eclipse.swt.graphics.Font font, int size)Applies a certain font size to a font.- Parameters:
font
- Font to modifysize
- New font size- Returns:
- Font with new font size
-
centerDialogOnScreen
public static void centerDialogOnScreen(org.eclipse.swt.widgets.Shell shell)Centers a dialog (Shell) on the primary (active) display.- Parameters:
shell
- Shell to center on screen- See Also:
Shell
-