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

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


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

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

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

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

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

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

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

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

   * 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

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

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

TOP

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

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.