public class SWTUtil extends Object
| Constructor and Description |
|---|
SWTUtil() |
| Modifier and Type | Method and Description |
|---|---|
static int |
getButtonWidthHint(org.eclipse.swt.widgets.Button button)
Returns a width hint for a button control.
|
static org.eclipse.swt.widgets.Shell |
getShell(org.eclipse.swt.widgets.Widget widget)
Returns the shell for the given widget.
|
static org.eclipse.swt.widgets.Display |
getStandardDisplay()
Returns the standard display to use.
|
static int |
getTableHeightHint(org.eclipse.swt.widgets.Table table,
int rows) |
static org.eclipse.swt.layout.GridLayout |
newLayoutNoMargins(int columns) |
static void |
setAccessibilityText(org.eclipse.swt.widgets.Control control,
String text)
Adds an accessibility listener returning the given fixed name.
|
static void |
setButtonDimensionHint(org.eclipse.swt.widgets.Button button)
Sets width and height hint for the button control.
Note: This is a NOP if the button's layout data is not an instance of GridData. |
public static org.eclipse.swt.widgets.Display getStandardDisplay()
Display.getCurrent(). If so, this display is returned. Otherwise the method returns
the Display.getDefault() display. If any Display's are available, Display.getDefault()
will create a new Display.null if any Displays found and a new one can not
be created. Creating a new Display under Mac from within a non-main thread is not allowed.public static org.eclipse.swt.widgets.Shell getShell(org.eclipse.swt.widgets.Widget widget)
null is returned.widget - the widgetpublic static int getButtonWidthHint(org.eclipse.swt.widgets.Button button)
button - the buttonpublic static void setButtonDimensionHint(org.eclipse.swt.widgets.Button button)
GridData.button - the button for which to set the dimension hintpublic static int getTableHeightHint(org.eclipse.swt.widgets.Table table,
int rows)
public static void setAccessibilityText(org.eclipse.swt.widgets.Control control,
String text)
control - the control to add the accessibility support totext - the namepublic static org.eclipse.swt.layout.GridLayout newLayoutNoMargins(int columns)
Copyright © 2016. All Rights Reserved.