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

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

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

  /**
   * @return <code>true</code> if the item is selected, <code>false</code> otherwise.
   * @since 2.0
   */
  public boolean isSelected() {
    return UIThreadRunnable.syncExec(new BoolResult() {
      public Boolean run() {
        return Arrays.asList(tree.getSelection()).contains(widget);
      }
    });
  }
View Full Code Here

     *         <code>false</code> otherwise.
     * @since 2.0
     */
    public boolean isExpanded() {
        assertEnabled();
        return UIThreadRunnable.syncExec(new BoolResult() {
            public Boolean run() {
                return widget.getExpanded();
            }
        });
    }
View Full Code Here

      }
    });
  }

  public boolean isEnabled() {
    return syncExec(new BoolResult() {
      public Boolean run() {
        return tree.isEnabled();
      }
    });
  }
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

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.