Examples of VoidResult


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

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

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

  public void select(final String item) {
    log.debug(MessageFormat.format("Set selection {0} to text {1}", this, item)); //$NON-NLS-1$
    assertEnabled();
    final int indexOf = indexOf(item);
    Assert.isTrue(indexOf != -1, "Item `" + item + "' not found in list."); //$NON-NLS-1$ //$NON-NLS-2$
    asyncExec(new VoidResult() {
      public void run() {
        widget.setSelection(indexOf);
      }
    });
    notifySelect();
View Full Code Here

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

    log.debug(MessageFormat.format("Set selection {0} to index {1}", this, index)); //$NON-NLS-1$
    assertEnabled();
    int itemCount = itemCount();
    Assert.isTrue(index <= itemCount, java.text.MessageFormat.format(
        "The index ({0}) is more than the number of items ({1}) in the list.", index, itemCount)); //$NON-NLS-1$
    asyncExec(new VoidResult() {
      public void run() {
        widget.setSelection(index);
      }
    });
    notifySelect();
View Full Code Here

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

   * @param indices the indices to select in the list.
   */
  public void select(final int[] indices) {
    log.debug(MessageFormat.format("Set selection {0} to indices {1}]", this, StringUtils.join(indices, ", "))); //$NON-NLS-1$ //$NON-NLS-2$
    assertEnabled();
    asyncExec(new VoidResult() {
      public void run() {
        widget.setSelection(indices);
      }

    });
View Full Code Here

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

   * @param items the items to select in the list.
   */
  public void select(final String[] items) {
    log.debug(MessageFormat.format("Set selection {0} to items [{1}]", this, StringUtils.join(items, ", "))); //$NON-NLS-1$ //$NON-NLS-2$
    assertEnabled();
    asyncExec(new VoidResult() {
      public void run() {
        widget.deselectAll();
        for (String item : items) {
          int index = widget.indexOf(item);
          if (index != -1)
View Full Code Here

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

  /**
   * Unselects everything.
   */
  public void unselect() {
    asyncExec(new VoidResult() {
      public void run() {
        widget.deselectAll();
      }
    });
    notifySelect();
View Full Code Here

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

   * @param toSet the date to set into the control.
   */
  public void setDate(final Date toSet) {
    log.debug(MessageFormat.format("Setting date on control: {0} to {1}", this, toSet)); //$NON-NLS-1$
    assertEnabled();
    syncExec(new VoidResult() {
      @SuppressWarnings("deprecation")
      public void run() {
        widget.setYear(toSet.getYear() + 1900);
        widget.setDay(toSet.getDate());
        widget.setMonth(toSet.getMonth());
View Full Code Here

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

  /**
   * Toggle the selection of the checkbox if applicable.
   */
  private void toggleSelection() {
    syncExec(new VoidResult() {
      public void run() {
        if (hasStyle(widget, SWT.CHECK) | hasStyle(widget, SWT.RADIO))
          widget.setSelection(!widget.getSelection());
      }
    });
View Full Code Here

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

   * @param value the value to set into the slider.
   */
  public void setSelection(final int value) {
    log.debug(MessageFormat.format("Setting selection on {0} to {1}", this, value)); //$NON-NLS-1$
    assertEnabled();
    asyncExec(new VoidResult() {
      public void run() {
        widget.setSelection(value);
      }
    });
    notify(SWT.Selection);
View Full Code Here

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

   *
   * @param text the text to set.
   */
  public void setText(final String text) {
    assertEnabled();
    asyncExec(new VoidResult() {
      public void run() {
        widget.setText(text);
      }
    });
  }
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.