Examples of VoidResult


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

   * @since 1.2
   */
  public void setFocus() {
    assertEnabled();
    log.debug(MessageFormat.format("Attempting to set focus on {0}", this));
    syncExec(new VoidResult() {
      public void run() {
        if (widget instanceof Control) {
          Control control = (Control) widget;
          if (hasFocus(control))
            return;
View Full Code Here

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

   * @param post Whether or not {@link Display#post} should be used
   * @return itself.
   */
  protected AbstractSWTBot<T> click(final int x, final int y, final boolean post) {
    if (post) {
      asyncExec(new VoidResult() {
        public void run() {
          moveMouse(x, y);
          mouseDown(x, y, 1);
          mouseUp(x, y, 1);
        }
View Full Code Here

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

   * @param post Whether or not {@link Display#post} should be used
   * @return itself.
   */
  protected AbstractSWTBot<T> rightClick(final int x, final int y, final boolean post) {
    if (post) {
      syncExec(new VoidResult() {
        public void run() {
          moveMouse(x, y);
          mouseDown(x, y, 3);
          mouseUp(x, y, 3);
        }
View Full Code Here

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

   *
   * @param x the x coordinate
   * @param y the y coordinate
   */
  void moveMouse(final int x, final int y) {
    asyncExec(new VoidResult() {
      public void run() {
        Event event = createMouseEvent(x, y, 0, 0, 0);
        event.type = SWT.MouseMove;
        display.post(event);
      }
View Full Code Here

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

   * @param x the x coordinate
   * @param y the y coordinate
   * @param button the mouse button to be pressed
   */
  private void mouseDown(final int x, final int y, final int button) {
    asyncExec(new VoidResult() {
      public void run() {
        Event event = createMouseEvent(x, y, button, 0, 0);
        event.type = SWT.MouseDown;
        display.post(event);
      }
View Full Code Here

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

   * @param x the x coordinate
   * @param y the y coordinate
   * @param button the mouse button to be pressed
   */
  private void mouseUp(final int x, final int y, final int button) {
    asyncExec(new VoidResult() {
      public void run() {
        Event event = createMouseEvent(x, y, button, 0, 0);
        event.type = SWT.MouseUp;
        display.post(event);
      }
View Full Code Here

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

  public SWTBotToolbarRadioButton click() {
    return toggle();
  }

  private void internalToggle() {
    syncExec(new VoidResult() {
      public void run() {
        widget.setSelection(!widget.getSelection());
      }
    });
  }
View Full Code Here

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

   * @param text the text to be set.
   * @return the same instance.
   */
  public SWTBotText setText(final String text) {
    assertEnabled();
    asyncExec(new VoidResult() {
      public void run() {
        widget.setText(text);
      }
    });
    return this;
View Full Code Here

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

  /**
   * Select the contents of the entire widget.
   * @return the same instance.
   */
  public SWTBotText selectAll() {
    syncExec(new VoidResult() {
      public void run() {
        widget.selectAll();
      }
    });
    return this;
View Full Code Here

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

   * Moves the cursor to the center of the widget
   *
   * @return itself
   */
  protected AbstractSWTBotControl<T> moveMouseToWidget() {
    syncExec(new VoidResult() {
      public void run() {
        Rectangle location = absoluteLocation();
        moveMouse(location.x + location.width / 2, location.y + location.height / 2);
      }
    });
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.