Package net.sf.swtbot.finder.UIThreadRunnable

Examples of net.sf.swtbot.finder.UIThreadRunnable.VoidResult


   * @return the tree item, after expanding it.
   */
  public SWTBotTreeItem expand() {
    checkEnabled();
    preExpandNotify();
    syncExec(new VoidResult() {
      public void run() {
        getTreeItem().setExpanded(true);
      }
    });
    postExpandNotify();
View Full Code Here


   * @return the current node.
   * @since 1.0
   */
  public SWTBotTreeItem select() {
    checkEnabled();
    syncExec(new VoidResult() {
      public void run() {
        getTree().setFocus();
        getTree().setSelection(getTreeItem());
      }
    });
View Full Code Here

  public SWTBotTreeItem select(final String[] items) {
    checkEnabled();
    final List nodes = Arrays.asList(items);
    Assert.isTrue(getNodes().containsAll(nodes));

    syncExec(new VoidResult() {
      public void run() {
        TreeItem[] treeItems = getTreeItem().getItems();
        ArrayList selection = new ArrayList();

        for (int i = 0; i < treeItems.length; i++) {
View Full Code Here

   *
   * @param text the text to set.
   */
  public void setText(final String text) {
    checkEnabled();
    asyncExec(new VoidResult() {
      public void run() {
        getControl().setText(text);
      }
    });
  }
View Full Code Here

  public void navigateTo(final int line, final int column) {
    if (log.isDebugEnabled())
      log.debug("Enquing navigation to location " + line + ", " + column + " in " + SWTUtils.toString(widget));
    checkEnabled();
    setFocus();
    asyncExec(new VoidResult() {
      public void run() {
        if (log.isDebugEnabled())
          log.debug("Navigating to location " + line + ", " + column + " in " + widget);
        getControl().setSelection(offset(line, column));
      }
View Full Code Here

   *
   * @param text the text to be inserted at the location of the caret.
   */
  public void insertText(final String text) {
    checkEnabled();
    syncExec(new VoidResult() {
      public void run() {
        getControl().insert(text);
      }
    });
  }
View Full Code Here

   * @param column the column number.
   * @param length the length of the selection.
   */
  public void selectRange(final int line, final int column, final int length) {
    checkEnabled();
    asyncExec(new VoidResult() {
      public void run() {
        int offset = offset(line, column);
        getControl().setSelection(offset, offset + length);
      }
    });
View Full Code Here

      public String getFailureMessage() {
        return "Timed out waiting for " + SWTUtils.toString(widget) + " to get activated";
      }

      public boolean test() throws Exception {
        syncExec(new VoidResult() {
          public void run() {
            getShell().forceActive();
            getShell().forceFocus();
          }
        });
View Full Code Here

   *
   * @throws TimeoutException if the shell does not close.
   */
  public void close() throws TimeoutException {
    notify(SWT.Close);
    asyncExec(new VoidResult() {
      public void run() {
        getShell().close();
      }
    });
    new SWTBot().waitUntil(new DefaultCondition() {
View Full Code Here

      return;
    }
    checkEnabled();
    if (log.isDebugEnabled())
      log.debug("Clicking on " + SWTUtils.getText(widget));
    asyncExec(new VoidResult() {
      public void run() {
        deselectOtherRadioButtons();
        if (log.isDebugEnabled())
          log.debug("Clicking on " + widget);
        ((Button) widget).setSelection(true);
View Full Code Here

TOP

Related Classes of net.sf.swtbot.finder.UIThreadRunnable.VoidResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.