Package de.frankmuenster.mahoe.gui.utils
Class SWTFontUtils
java.lang.Object
de.frankmuenster.mahoe.gui.utils.SWTFontUtils
SWT
font related utility methods.-
Method Summary
Modifier and TypeMethodDescriptionstatic org.eclipse.swt.graphics.Font
Returns the monospaced font for the current display.static org.eclipse.swt.graphics.Font
getMonospacedFont
(org.eclipse.swt.widgets.Display display) Creates a monospaced font for the given display.
-
Method Details
-
getMonospacedFont
Returns the monospaced font for the current display. The font will automatically be disposed once the display is disposed.This method is thread safe.
- Returns:
- The monospaced font for the current display.
- Throws:
IllegalStateException
- If the method is not invoked from a SWT UI thread.AssertionError
IllegalArgumentException
-
getMonospacedFont
public static org.eclipse.swt.graphics.Font getMonospacedFont(org.eclipse.swt.widgets.Display display) throws AssertionError Creates a monospaced font for the given display. The font will automatically be disposed once the display is disposed.This method is thread safe.
- Parameters:
display
- The display for which to create a monospaced font.- Returns:
- A monospaced font for the given display.
- Throws:
AssertionError
IllegalArgumentException
-