|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.emf.ecp.view.test.common.swt.SWTTestUtil
public final class SWTTestUtil
Util class for SWT Tests.
| Method Summary | ||
|---|---|---|
static void |
clickButton(org.eclipse.swt.widgets.Button button)
Simulates a click on the given Button. |
|
static
|
findControl(org.eclipse.swt.widgets.Control control,
int index,
Class<T> clazz)
Iterates over the hierarchy of the given Control and looks for a control of the given class. |
|
static org.eclipse.swt.custom.StackLayout |
findStackLayout(org.eclipse.swt.widgets.Control control,
int index)
Iterates over the hierarchy of the given Control and looks for a Composite with a
StackLayout. |
|
static void |
pressAndReleaseKey(org.eclipse.swt.widgets.Control control,
int keyCode)
Simulates a key down and key up event on the given Control. |
|
static void |
selectWidget(org.eclipse.swt.widgets.Widget widget)
Selects the given widget. |
|
static void |
typeAndFocusOut(org.eclipse.swt.widgets.Text text,
String string)
Sets the given string on the Text and simulates a focus out event. |
|
static void |
waitForUIThread()
Waits for the ui thread to complete its work. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static org.eclipse.swt.custom.StackLayout findStackLayout(org.eclipse.swt.widgets.Control control,
int index)
throws NoSuchElementException
Iterates over the hierarchy of the given Control and looks for a Composite with a
StackLayout. The index specifies which composite with a stack layout should be returned.
This method uses a depth-first-search.
control - the parent controlindex - the index of the layout
NoSuchElementException - if no layout with the index can be found
public static <T extends org.eclipse.swt.widgets.Control> T findControl(org.eclipse.swt.widgets.Control control,
int index,
Class<T> clazz)
throws NoSuchElementException
Iterates over the hierarchy of the given Control and looks for a control of the given class. The index
specifies which control should be returned.
This method uses a depth-first-search.
T - the type of the control to findcontrol - the parent controlindex - the index of the control to findclazz - the class of the control to find
NoSuchElementException - if no control with the index can be foundpublic static void waitForUIThread()
public static void clickButton(org.eclipse.swt.widgets.Button button)
Button.
button - the button to presspublic static void selectWidget(org.eclipse.swt.widgets.Widget widget)
widget - the control to select.
public static void pressAndReleaseKey(org.eclipse.swt.widgets.Control control,
int keyCode)
Control.
control - the controlkeyCode - the key code
public static void typeAndFocusOut(org.eclipse.swt.widgets.Text text,
String string)
Text and simulates a focus out event.
text - the textstring - the string to enter in the text
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||