Package org.netbeans.jemmy

Examples of org.netbeans.jemmy.Timeout.sleep()


  Point pnt = new Point(0, 0);
  drag(oper, pnt);
  Timeout sleepTime = oper.getTimeouts().create("Waiter.TimeDelta");
  while(((JScrollBarOperator)oper).getValue() >
        ((JScrollBarOperator)oper).getMinimum()) {
      sleepTime.sleep();
  }
  drop(oper, pnt);
    }

    public void scrollToMaximum(ComponentOperator oper, int orientation) {
View Full Code Here


  drag(oper, pnt);
  Timeout sleepTime = oper.getTimeouts().create("Waiter.TimeDelta");
  while(((JScrollBarOperator)oper).getValue() >
        (((JScrollBarOperator)oper).getMaximum() -
         ((JScrollBarOperator)oper).getVisibleAmount())) {
      sleepTime.sleep();
  }
  drop(oper, pnt);
    }

    protected void step(ComponentOperator oper, ScrollAdjuster adj) {
View Full Code Here

  int orientation = adj.getScrollOrientation();
  if(direction != adj.DO_NOT_TOUCH_SCROLL_DIRECTION) {
      Timeout delta = getScrollDeltaTimeout(oper);
      startPushAndWait(oper, direction, orientation);
      while(adj.getScrollDirection() == direction) {
    delta.sleep();
      }
      stopPushAndWait(oper, direction, orientation);
  }
    }
View Full Code Here

  KeyDriver kdriver = DriverManager.getKeyDriver(oper);
  Timeout pushTime = oper.getTimeouts().create("ComponentOperator.PushKeyTimeout");
  Timeout betweenTime = getBetweenTimeout(oper);
  while(getCaretPosition(oper) > 0) {
      kdriver.typeKey(oper, KeyEvent.VK_BACK_SPACE, (char)KeyEvent.VK_BACK_SPACE, 0, pushTime);
      betweenTime.sleep();
  }
  while(getText(oper).length() > 0) {
      kdriver.pushKey(oper, KeyEvent.VK_DELETE, 0, pushTime);
      betweenTime.sleep();
  }
View Full Code Here

      kdriver.typeKey(oper, KeyEvent.VK_BACK_SPACE, (char)KeyEvent.VK_BACK_SPACE, 0, pushTime);
      betweenTime.sleep();
  }
  while(getText(oper).length() > 0) {
      kdriver.pushKey(oper, KeyEvent.VK_DELETE, 0, pushTime);
      betweenTime.sleep();
  }
    }
    public void typeText(ComponentOperator oper, String text, int caretPosition) {
  changeCaretPosition(oper, caretPosition);
  KeyDriver kDriver = DriverManager.getKeyDriver(oper);
View Full Code Here

  Timeout pushTime = oper.getTimeouts().create("ComponentOperator.PushKeyTimeout");
  Timeout betweenTime = getBetweenTimeout(oper);
  char[] crs = text.toCharArray();
  for(int i = 0; i < crs.length; i++) {
      kDriver.typeKey(oper, map.getCharKey(crs[i]), crs[i], map.getCharModifiers(crs[i]), pushTime);
      betweenTime.sleep();
  }
    }
    public void changeText(ComponentOperator oper, String text) {
  clearText(oper);
  typeText(oper, text, 0);
View Full Code Here

  KeyDriver kdriver = DriverManager.getKeyDriver(oper);
  Timeout pushTime = oper.getTimeouts().create("ComponentOperator.PushKeyTimeout");
  Timeout betweenTime = getBetweenTimeout(oper);
  while(getCaretPosition(oper) > 0) {
      kdriver.typeKey(oper, KeyEvent.VK_BACK_SPACE, (char)KeyEvent.VK_BACK_SPACE, 0, pushTime);
      betweenTime.sleep();
  }
  while(getText(oper).length() > 0) {
      kdriver.pushKey(oper, KeyEvent.VK_DELETE, 0, pushTime);
      betweenTime.sleep();
  }
View Full Code Here

      kdriver.typeKey(oper, KeyEvent.VK_BACK_SPACE, (char)KeyEvent.VK_BACK_SPACE, 0, pushTime);
      betweenTime.sleep();
  }
  while(getText(oper).length() > 0) {
      kdriver.pushKey(oper, KeyEvent.VK_DELETE, 0, pushTime);
      betweenTime.sleep();
  }
    }
    public void typeText(ComponentOperator oper, String text, int caretPosition) {
  changeCaretPosition(oper, caretPosition);
  KeyDriver kDriver = DriverManager.getKeyDriver(oper);
View Full Code Here

  Timeout pushTime = oper.getTimeouts().create("ComponentOperator.PushKeyTimeout");
  Timeout betweenTime = getBetweenTimeout(oper);
  char[] crs = text.toCharArray();
  for(int i = 0; i < crs.length; i++) {
      kDriver.typeKey(oper, map.getCharKey(crs[i]), crs[i], map.getCharModifiers(crs[i]), pushTime);
      betweenTime.sleep();
  }
    }
    public void changeText(ComponentOperator oper, String text) {
  clearText(oper);
  typeText(oper, text, 0);
View Full Code Here

        long lastChanded = System.currentTimeMillis();
  if(direction != adj.DO_NOT_TOUCH_SCROLL_DIRECTION) {
      Timeout delta = getScrollDeltaTimeout(oper);
      startPushAndWait(oper, direction, orientation);
      while(adj.getScrollDirection() == direction) {
    delta.sleep();
                int curPosition = position(oper, orientation);
                if(curPosition != position) {
                    position = curPosition;
                    lastChanded = System.currentTimeMillis();
                } else {
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.