4142434445464748495051
} public boolean test() throws Exception { try { final SWTBotShell shell = bot.shell(text); return UIThreadRunnable.syncExec(new BoolResult() { public Boolean run() { return shell.widget.isVisible() || shell.widget.isFocusControl(); } }); } catch (WidgetNotFoundException e) {
115116117118119120121122123124125
event.item = widget; return event; } public boolean isActive() { return syncExec(new BoolResult() { public Boolean run() { return parent.getSelection() == widget; } }); }
123124125126127128129130131132133
} }); } public boolean isEnabled() { return syncExec(new BoolResult() { public Boolean run() { return widget.getParent().isEnabled(); } }); }
171172173174175176177178179180181
* * @return <code>true</code> if the checkbox is checked. Otherwise <code>false</code>. */ public boolean isChecked() { assertIsCheck(); return syncExec(new BoolResult() { public Boolean run() { return widget.getChecked(); } }); }
185186187188189190191192193194195
* * @return <code>true</code> if the checkbox is grayed, <code>false</code> otherwise. */ public boolean isGrayed() { assertIsCheck(); return syncExec(new BoolResult() { public Boolean run() { return widget.getGrayed(); } }); }
438439440441442443444445446447448
* @return <code>true</code> if the widget is enabled. * @see Control#isEnabled() */ public boolean isEnabled() { if (widget instanceof Control) return syncExec(new BoolResult() { public Boolean run() { return isEnabledInternal(); } }); return false;
604605606607608609610611612613614
* * @return <code>true</code> if the widget is visible, <code>false</code> otherwise. * @since 1.0 */ public boolean isVisible() { return syncExec(new BoolResult() { public Boolean run() { if (widget instanceof Control) return ((Control) widget).isVisible(); return true; }
652653654655656657658659660661662
if (!(widget instanceof Control)) throw new UnsupportedOperationException("Can only traverse widgets of type Control. You're traversing a widget of type: " //$NON-NLS-1$ + widget.getClass().getName()); return syncExec(new BoolResult() { public Boolean run() { return ((Control) widget).traverse(traverse.type); } }); }
664665666667668669670671672673674
/** * @return <code>true</code> if this widget has focus. * @see Display#getFocusControl() */ public boolean isActive() { return syncExec(new BoolResult() { public Boolean run() { return display.getFocusControl() == widget; } }); }
99100101102103104105106107108109
/** * @return <code>true</code> if the button is checked, <code>false</code> otherwise. */ public boolean isChecked() { return syncExec(new BoolResult() { public Boolean run() { return widget.getSelection(); } }); }