public CompositeControl click() { log.debug(MessageFormat.format("Clicking on {0}", SWTUtils.getText(widget))); waitForEnabled(); notify(SWT.MouseEnter); notify(SWT.MouseMove); notify(SWT.Activate); notify(SWT.FocusIn); notify(SWT.MouseDown); notify(SWT.MouseUp); notify(SWT.Selection); notify(SWT.MouseHover); notify(SWT.MouseMove); notify(SWT.MouseExit); notify(SWT.Deactivate); notify(SWT.FocusOut); log.debug(MessageFormat.format("Clicked on {0}", SWTUtils.getText(widget))); return this; }
public void addSDK(final File home) throws IOException { final SDKInfo info = SDKInfo.loadSDK(home); UIThreadRunnable.asyncExec( SWTUtils.display(), new VoidResult() { @Override public void run() { SDKTableWidget w = (SDKTableWidget) sdks.widget.getData("org.eclipse.swtbot.widget.owner"); CheckboxTableViewer v = w.getViewer(); v.add(info); } }); }
public List<Composite> run() { Composite parent = (Composite) getWidget(); ControlFinder cf = new ControlFinder(); List<Composite> findControls = cf.findControls(parent, matcher, true); List<Composite> tabs = new ArrayList<Composite>(); for (int i = 0; i < findControls.size(); i++) { Composite c = findControls.get(i); String className = SWTUtils.toString(c); if (className.startsWith("TabbedPropertyList$ListElement")) { tabs.add(c); } } return tabs; }
/** * Constructs an instance of this object with the given button (Toggle) * * @param w the widget. * @param description the description of the widget, this will be reported by {@link #toString()} * @throws WidgetNotFoundException if the widget is <code>null</code> or widget has been disposed. * @since 1.0 */ public SWTBotToggleButton(Button w, SelfDescribing description) throws WidgetNotFoundException { super(w, description); Assert.isTrue(SWTUtils.hasStyle(w, SWT.TOGGLE), "Expecting a toggle button."); // $NON-NLS-1$ }
/** * Constructs an instance of this object with the given button (Checkbox) * * @param w the widget. * @param description the description of the widget, this will be reported by {@link #toString()} * @throws WidgetNotFoundException if the widget is <code>null</code> or widget has been disposed. * @since 1.0 */ public SWTBotCheckBox(Button w, SelfDescribing description) throws WidgetNotFoundException { super(w, description); Assert.isTrue(SWTUtils.hasStyle(w, SWT.CHECK), "Expecting a checkbox."); // $NON-NLS-1$ }