Class NativeWidgetHelper
- java.lang.Object
-
- org.eclipse.emf.ecp.view.spi.table.celleditor.rcp.NativeWidgetHelper
-
public final class NativeWidgetHelper extends java.lang.Object
Util class for faking native widgets.- Author:
- jfaltermeier
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NativeWidgetHelper.CheckBoxState
Enum describing the state of a checkbox.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.eclipse.swt.graphics.Image
getCheckBoxImage(org.eclipse.swt.widgets.Control control, NativeWidgetHelper.CheckBoxState state)
Returns the image of a checkbox.static void
initCheckBoxImages(org.eclipse.swt.widgets.Control control)
Creates screenshots of the platform's native checkbox in checked and unchecked state.
-
-
-
Method Detail
-
initCheckBoxImages
public static void initCheckBoxImages(org.eclipse.swt.widgets.Control control)
Creates screenshots of the platform's native checkbox in checked and unchecked state. The images can be accessed viagetCheckBoxImage(Control, CheckBoxState)
.- Parameters:
control
- a control which provides theDisplay
andShell
to create the screen shots
-
getCheckBoxImage
public static org.eclipse.swt.graphics.Image getCheckBoxImage(org.eclipse.swt.widgets.Control control, NativeWidgetHelper.CheckBoxState state)
Returns the image of a checkbox. IfinitCheckBoxImages(Control)
was called beforehand this will return images resembling the platform's native widgets. Otherwise a default image (Windows 7) will be returned.- Parameters:
control
- a control which provides theDisplay
to create the imagestate
- the state of the checkbox- Returns:
- the image
-
-