/** * 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$ }