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

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


  /**
   * Unselect all selections.
   */
  public void unselect() {
    assertEnabled();
    asyncExec(new VoidResult() {
      public void run() {
        log.debug(MessageFormat.format("Unselecting all in {0}", widget)); //$NON-NLS-1$
        widget.deselectAll();
      }
    });
View Full Code Here


  /**
   * Does not clear previous selections.
   */
  private void additionalSelectAndNotify(final int j) {
    assertIsLegalRowIndex(j);
    asyncExec(new VoidResult() {
      public void run() {
        lastSelectionItem = widget.getItem(j);
        widget.select(j);
      }
    });
View Full Code Here

   */
  public void click(final int row, final int column) {
    assertIsLegalCell(row, column);
    // for some reason, it does not work without setting selection first
    select(row);
    asyncExec(new VoidResult() {
      public void run() {
        TableItem item = widget.getItem(row);
        Rectangle cellBounds = item.getBounds(column);
        clickXY(cellBounds.x + (cellBounds.width / 2), cellBounds.y + (cellBounds.height / 2));
      }
View Full Code Here

   * @param column the column in the table.
   * @since 1.2
   */
  public void doubleClick(final int row, final int column) {
    assertIsLegalCell(row, column);
    asyncExec(new VoidResult() {
      public void run() {
        TableItem item = widget.getItem(row);
        Rectangle cellBounds = item.getBounds(column);
        // for some reason, it does not work without setting selection first
        widget.setSelection(row);
View Full Code Here

    assertEnabled();
    if (!isChecked()) {
      log.debug(MessageFormat.format("Widget {0} already deselected, not deselecting again.", this)); //$NON-NLS-1$
      return;
    }
    asyncExec(new VoidResult() {
      public void run() {
        log.debug(MessageFormat.format("Deselecting {0}", this)); //$NON-NLS-1$
        widget.setSelection(false);
      }
    });
View Full Code Here

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

  /**
   * Toggle the checkbox.
   */
  protected void toggle() {
    assertEnabled();
    asyncExec(new VoidResult() {
      public void run() {
        log.debug(MessageFormat.format("Toggling state on {0}. Setting state to {1}", widget, (!widget.getSelection() ? "selected" //$NON-NLS-1$ //$NON-NLS-2$
            : "unselected"))); //$NON-NLS-1$
        widget.setSelection(!widget.getSelection());
      }
View Full Code Here

  public void setText(final String text) {
    log.debug(MessageFormat.format("Setting text on widget {0} to {1}", this, text)); //$NON-NLS-1$
    assertEnabled();
    if (hasStyle(widget, SWT.READ_ONLY))
      throw new RuntimeException("This combo box is read-only."); //$NON-NLS-1$
    asyncExec(new VoidResult() {
      public void run() {
        widget.setText(text);
      }
    });
    notify(SWT.Modify);
View Full Code Here

    select(indexOf);
  }

  private void select(final int indexOf) {
    asyncExec(new VoidResult() {
      public void run() {
        widget.select(indexOf);
      }
    });
    notify(SWT.Selection);
View Full Code Here

   */
  public void 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

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.