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

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


    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

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

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

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

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

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

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

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

   */
  public void navigateTo(final int line, final int column) {
    log.debug(MessageFormat.format("Enquing navigation to location {0}, {1} in {2}", line, column, this)); //$NON-NLS-1$
    assertEnabled();
    setFocus();
    asyncExec(new VoidResult() {
      public void run() {
        log.debug(MessageFormat.format("Navigating to location {0}, {1} in {2}", line, column, widget)); //$NON-NLS-1$
        widget.setSelection(offset(line, column));
      }
    });
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.