Examples of BoolResult


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

  public InUIThread(Matcher<?> matcher) {
    this.matcher = matcher;
  }

  protected boolean doMatch(final Object obj) {
    return UIThreadRunnable.syncExec(new BoolResult() {
      public Boolean run() {
        return matcher.matches(obj);
      }
    });
  }
View Full Code Here

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

   *
   * @return <code>true</code> if the tree has any items, <code>false</code> otherwise.
   * @since 1.0
   */
  public boolean hasItems() {
    return syncExec(new BoolResult() {
      public Boolean run() {
        return widget.getItemCount() > 0;
      }
    });
  }
View Full Code Here

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

   * @return <code>true</code> if the widget has the specified style bit set. Otherwise <code>false</code>.
   */
  public static boolean hasStyle(final Widget w, final int style) {
    if ((w == null) || w.isDisposed())
      return false;
    return UIThreadRunnable.syncExec(w.getDisplay(), new BoolResult() {
      public Boolean run() {
        return (w.getStyle() & style) != 0;
      }
    });
  }
View Full Code Here

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

   * @return <code>true</code> if the screenshot was created and saved, <code>false</code> otherwise.
   * @since 1.0
   */
  public static boolean captureScreenshot(final String fileName) {
    new ImageFormatConverter().imageTypeOf(fileName.substring(fileName.lastIndexOf('.') + 1));
    return UIThreadRunnable.syncExec(new BoolResult() {
      public Boolean run() {
        return captureScreenshotInternal(fileName);
      }
    });
  }
View Full Code Here

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

   * Gets if the checkbox button is checked.
   *
   * @return <code>true</code> if the checkbox is checked. Otherwise <code>false</code>.
   */
  public boolean isChecked() {
    return syncExec(new BoolResult() {
      public Boolean run() {
        return widget.getSelection();
      }
    });
  }
View Full Code Here

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

  /**
   * @return <code>true</code> if the tab item is active, <code>false</code> otherwise.
   */
  public boolean isActive() {
    return syncExec(new BoolResult() {
      public Boolean run() {
        return tabFolder().getSelection()[0] == widget;
      }
    });
  }
View Full Code Here

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

    });
  }

  @Override
  public boolean isEnabled() {
    return syncExec(new BoolResult() {
      public Boolean run() {
        return widget.getParent().isEnabled();
      }
    });
  }
View Full Code Here

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

   * @return <code>true</code> if the widget is enabled.
   * @see Control#isEnabled()
   */
  public boolean isEnabled() {
    if (widget instanceof Control)
      return syncExec(new BoolResult() {
        public Boolean run() {
          return isEnabledInternal();
        }
      });
    return false;
View Full Code Here

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

   *
   * @return <code>true</code> if the widget is visible, <code>false</code> otherwise.
   * @since 1.0
   */
  public boolean isVisible() {
    return syncExec(new BoolResult() {
      public Boolean run() {
        if (widget instanceof Control)
          return ((Control) widget).isVisible();
        return true;
      }
View Full Code Here

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

    if (!(widget instanceof Control))
      throw new UnsupportedOperationException("Can only traverse widgets of type Control. You're traversing a widget of type: " //$NON-NLS-1$
          + widget.getClass().getName());

    return syncExec(new BoolResult() {
      public Boolean run() {
        return ((Control) widget).traverse(traverse.type);
      }
    });
  }
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.