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

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


    }
  }

  @SuppressWarnings("boxing")
  public static boolean isEclipseShell(final SWTBotShell shell) {
    return UIThreadRunnable.syncExec(new BoolResult() {
      public Boolean run() {
        return PlatformUI.getWorkbench().getActiveWorkbenchWindow()
            .getShell() == shell.widget;
      }
    });
View Full Code Here


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

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

  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

   * 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

  public static boolean hasStyle(final Widget w, final int style) {
    if ((w == null) || w.isDisposed())
      return false;
    if (style == SWT.NONE)
      return true;
    return UIThreadRunnable.syncExec(w.getDisplay(), new BoolResult() {
      public Boolean run() {
        return (w.getStyle() & style) != 0;
      }
    });
  }
View Full Code Here

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

   * @return <code>true</code> if the screenshot was created and saved, <code>false</code> otherwise.
   * @since 2.0
   */
  public static boolean captureScreenshot(final String fileName, final Control control) {
    new ImageFormatConverter().imageTypeOf(fileName.substring(fileName.lastIndexOf('.') + 1));
    return UIThreadRunnable.syncExec(new BoolResult() {
      public Boolean run() {
        if (control instanceof Shell)
          return captureScreenshotInternal(fileName, control.getBounds());
        Display display = control.getDisplay();
        Rectangle bounds = control.getBounds();
View Full Code Here

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

    event.item = widget;
    return event;
  }

  public boolean isActive() {
    return syncExec(new BoolResult() {
      public Boolean run() {
        return parent.getSelection()[0] == widget;
      }
    });
  }
View Full Code Here

TOP

Related Classes of org.eclipse.swtbot.swt.finder.results.BoolResult

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.