Package net.sf.swtbot.finder.UIThreadRunnable

Examples of net.sf.swtbot.finder.UIThreadRunnable.BoolResult


  /**
   * @return <code>true</code> if the item is expanded, <code>false</code> otherwise.
   */
  public boolean isExpanded() {
    return syncExec(new BoolResult() {
      public boolean run() {
        return expandItem.getExpanded();
      }
    });
  }
View Full Code Here


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

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

   *
   * @since 1.2
   */
  public void setFocus() {
    checkEnabled();
    boolean focusSet = syncExec(new BoolResult() {
      public boolean run() {
        if (widget instanceof Control)
          return ((Control) widget).setFocus();
        return true;
      }
View Full Code Here

    if (log.isDebugEnabled())
      log.debug("Clicked on " + SWTUtils.getText(widget));
  }

  public boolean isEnabled() {
    return syncExec(new BoolResult() {
      public boolean run() {
        return ((ToolItem) widget).isEnabled();
      }
    });
  }
View Full Code Here

  protected IMatcher getMatcher() {
    return null;
  }

  public boolean isEnabled() {
    return syncExec(new BoolResult() {
      public boolean run() {
        return ((MenuItem) widget).isEnabled();
      }
    });
  }
View Full Code Here

   * @return <code>true</code> if the menu is checked, <code>false</code> otherwise.
   * @see MenuItem#getSelection()
   * @since 1.2
   */
  public boolean isChecked() {
    return syncExec(new BoolResult() {
      public boolean run() {
        return ((MenuItem) widget).getSelection();
      }
    });
  }
View Full Code Here

   * Checks if the shell is open.
   *
   * @return <code>true</code> if the shell is visible, <code>false</code> otherwise.
   */
  public boolean isOpen() {
    return syncExec(new BoolResult() {
      public boolean run() {
        return !getShell().isDisposed() && getShell().isVisible();
      }
    });
  }
View Full Code Here

   * Checks if the shell is active.
   *
   * @return <code>true</code> if the shell is active, <code>false</code> otherwise.
   */
  public boolean isActive() {
    return syncExec(new BoolResult() {
      public boolean run() {
        return display.getActiveShell() == widget;
      }
    });
  }
View Full Code Here

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

TOP

Related Classes of net.sf.swtbot.finder.UIThreadRunnable.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.