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

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


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


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

   * are scrolled until the item is visible.
   *
   * @return This {@link SWTBotCTabItem}.
   */
  public SWTBotCTabItem show() {
    syncExec(new VoidResult() {
      public void run() {
        parent.showItem(widget);
      }
    });
    return this;
View Full Code Here

   */
  public SWTBotCTabItem activate() throws TimeoutException {
    log.trace(MessageFormat.format("Activating {0}", this)); //$NON-NLS-1$
    assertEnabled();
    // this runs in sync because tabFolder.setSelection() does not send a notification, and so should not block.
    asyncExec(new VoidResult() {
      public void run() {
        widget.getParent().setSelection(widget);
        log.debug(MessageFormat.format("Activated {0}", this)); //$NON-NLS-1$
      }
    });
View Full Code Here

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

  }

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

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

      }
    });
  }

  private void notifySelect() {
    syncExec(new VoidResult() {
      public void run() {
        table.notifyListeners(SWT.Selection, createSelectionEvent());
      }
    });
  }
View Full Code Here

        return new Object[] { SWTBotEvents.toString(createEvent), AbstractSWTBot.this.toString() };
      }
    });

    log.trace(MessageFormat.format("Enquing event {0} on {1}", result)); //$NON-NLS-1$
    asyncExec(new VoidResult() {
      public void run() {
        if ((widget == null) || widget.isDisposed()) {
          log.trace(MessageFormat.format("Not notifying {0} is null or has been disposed", AbstractSWTBot.this)); //$NON-NLS-1$
          return;
        }
        if (!isEnabledInternal()) {
          log.warn(MessageFormat.format("Widget is not enabled: {0}", AbstractSWTBot.this)); //$NON-NLS-1$
          return;
        }
        log.trace(MessageFormat.format("Sending event {0} to {1}", result)); //$NON-NLS-1$
        widget.notifyListeners(eventType, createEvent);
        log.debug(MessageFormat.format("Sent event {0} to {1}", result)); //$NON-NLS-1$
      }
    });

    UIThreadRunnable.syncExec(new VoidResult() {
      public void run() {
        // do nothing, just wait for sync.
      }
    });
View Full Code Here

   * @since 1.2
   */
  public void setFocus() {
    assertEnabled();
    log.debug(MessageFormat.format("Attempting to set focus on {0}", this));
    syncExec(new VoidResult() {
      public void run() {
        if (widget instanceof Control) {
          Control control = (Control) widget;
          if (hasFocus(control))
            return;
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.