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

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


        // click
        click( menuItem );

        // hide
        UIThreadRunnable.syncExec( new VoidResult()
        {
            public void run()
            {
                hide( menuItem.getParent() );
            }
View Full Code Here


        event.time = ( int ) System.currentTimeMillis();
        event.widget = menuItem;
        event.display = menuItem.getDisplay();
        event.type = SWT.Selection;

        UIThreadRunnable.asyncExec( menuItem.getDisplay(), new VoidResult()
        {
            public void run()
            {
                menuItem.notifyListeners( SWT.Selection, event );
            }
View Full Code Here

    }


    public void resetLdapPerspective()
    {
        UIThreadRunnable.syncExec( new VoidResult()
        {
            public void run()
            {
                try
                {
View Full Code Here

   * @param items the items to select.
   * @return this same instance.
   */
  public SWTBotTree select(final String... items) {
    assertEnabled();
    asyncExec(new VoidResult() {
      public void run() {
        TreeItem[] treeItems = widget.getItems();
        List<TreeItem> selection = new ArrayList<TreeItem>();
        for (TreeItem treeItem : treeItems) {
          for (String item : items) {
View Full Code Here

   *
   * @return this same instance.
   */
  public SWTBotTree 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

   * @param indices the indices to select.
   * @return this same instance.
   */
  public SWTBotTree select(final int... indices) {
    assertEnabled();
    asyncExec(new VoidResult() {
      public void run() {
        log.debug(MessageFormat.format("Selecting rows [{0}] in tree{1}", StringUtils.join(indices, ", "), this)); //$NON-NLS-1$ //$NON-NLS-2$
        if (hasStyle(widget, SWT.MULTI) && indices.length > 1)
          log.warn("Tree does not support SWT.MULTI, cannot make multiple selections"); //$NON-NLS-1$
        TreeItem items[] = new TreeItem[indices.length];
View Full Code Here

        return Arrays.asList(items).indexOf(text);
      }
    });
    if (indexOf == -1)
      throw new RuntimeException("Item `" + text + "' not found in combo box."); //$NON-NLS-1$ //$NON-NLS-2$
    asyncExec(new VoidResult() {
      public void run() {
        widget.select(indexOf);
      }
    });
  }
View Full Code Here

    assertEnabled();
    int itemCount = itemCount();
    if (index > itemCount)
      throw new RuntimeException("The index (" + index + ") is more than the number of items (" + itemCount + ") in the combo."); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$

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

    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

   * @param rowIndex the zero-based index of the row to be selected.
   */
  public void select(final int rowIndex) {
    assertEnabled();
    assertIsLegalRowIndex(rowIndex);
    asyncExec(new VoidResult() {
      public void run() {
        TableItem item = widget.getItem(rowIndex);
        log.debug(MessageFormat.format("Selecting row [{0}] {1} in {2}", rowIndex, item.getText(), widget)); //$NON-NLS-1$
        lastSelectionItem = item;
        widget.setSelection(rowIndex);
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.