Examples of VoidResult


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

   * @param rowIndex the zero-based index of the row to be selected.
   */
  public void select(final int rowIndex) {
    checkEnabled();
    assertIsLegalRowIndex(rowIndex);
    asyncExec(new VoidResult() {
      public void run() {
        if (log.isDebugEnabled())
          log.debug("Selecting row [" + rowIndex + "] " + getControl().getItem(rowIndex).getText() + " in " + widget);
        getControl().setSelection(rowIndex);
      }
View Full Code Here

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

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

   * @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

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

   * @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

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

   * @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

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

  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

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

  }

  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

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

   * 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

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

      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

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

      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
TOP
Copyright © 2018 www.massapi.com. 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.