Package org.eclipse.swtbot.swt.finder.results

Examples of org.eclipse.swtbot.swt.finder.results.VoidResult


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


   * @return the tree item, after collapsing it.
   */
  public SWTBotTreeItem collapse() {
    assertEnabled();
    preCollapseNotify();
    asyncExec(new VoidResult() {
      public void run() {
        widget.setExpanded(false);
      }
    });
    postCollapseNotify();
View Full Code Here

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

   * @return the current node.
   * @since 1.2
   */
  public SWTBotTreeItem doubleClick() {
    assertEnabled();
    asyncExec(new VoidResult() {
      public void run() {
        tree.setSelection(widget);
      }
    });
    notifyTree(SWT.Selection);
View Full Code Here

  public SWTBotTreeItem select(final String... items) {
    assertEnabled();
    final List<String> nodes = Arrays.asList(items);
    Assert.isTrue(getNodes().containsAll(nodes));

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

        for (TreeItem treeItem : treeItems) {
View Full Code Here

  }

  private void setChecked(final boolean checked) {
    assertEnabled();
    assertIsCheck();
    syncExec(new VoidResult() {
      public void run() {
        log.debug(MessageFormat.format("Setting state to {0} on: {1}", (checked ? "checked" : "unchecked"), widget.getText())); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
        widget.setChecked(checked);
      }
    });
View Full Code Here

   * notify listeners about checkbox state change.
   *
   * @since 1.3
   */
  private void notifyCheck() {
    syncExec(new VoidResult() {
      public void run() {
        tree.notifyListeners(SWT.Selection, createCheckEvent());
      }
    });
  }
View Full Code Here

      log.debug(MessageFormat.format("Widget {0} is already selected, not clicking again.", this)); //$NON-NLS-1$
      return this;
    }
    assertEnabled();
    log.debug(MessageFormat.format("Clicking on {0}", this)); //$NON-NLS-1$
    asyncExec(new VoidResult() {
      public void run() {
        deselectOtherRadioButtons();
        log.debug(MessageFormat.format("Clicking on {0}", this)); //$NON-NLS-1$
        widget.setSelection(true);
      }
View Full Code Here

      public String getFailureMessage() {
        return "Timed out waiting for " + SWTUtils.toString(widget) + " to get activated"; //$NON-NLS-1$ //$NON-NLS-2$
      }

      public boolean test() throws Exception {
        syncExec(new VoidResult() {
          public void run() {
            widget.forceActive();
            widget.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() {
        // TODO investigate bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=259895
        if (!widget.isDisposed())
          widget.close();
      }
View Full Code Here

TOP

Related Classes of org.eclipse.swtbot.swt.finder.results.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.