Package org.netbeans.jemmy

Examples of org.netbeans.jemmy.Timeout


  typeText(oper, text, 0);
    }
    public void enterText(ComponentOperator oper, String text) {
  changeText(oper, text);
  DriverManager.getKeyDriver(oper).pushKey(oper, KeyEvent.VK_ENTER, 0,
               new Timeout("", 0));
    }
View Full Code Here


  DriverManager.getMouseDriver(oper).
      clickMouse(oper, pointToClick.x, pointToClick.y,
           1, oper.getDefaultMouseButton(), 0,
           oper.getTimeouts().create("ComponentOperator.MouseClickTimeout"));
  KeyDriver kdriver = DriverManager.getKeyDriver(oper);
  Timeout pushTimeout = oper.getTimeouts().create("ComponentOperator.PushKeyTimeout");
        if(System.getProperty("java.specification.version").compareTo("1.3") > 0) {
            while(coper.getSelectedIndex() != index) {
                kdriver.pushKey(oper, (index > coper.getSelectedIndex()) ? KeyEvent.VK_DOWN : KeyEvent.VK_UP, 0, pushTimeout);
            }
        } else {
View Full Code Here

      key = KeyEvent.VK_DOWN;
  } else {
      diff = current - index;
      key = KeyEvent.VK_UP;
  }
  Timeout pushTime = oper.getTimeouts().create("ComponentOperator.PushKeyTimeout");
  for(int i = 0; i < diff; i++) {
      kDriver.pushKey(oper, key, 0, pushTime);
  }
  kDriver.pushKey(oper, KeyEvent.VK_ENTER, 0, pushTime);
    }
View Full Code Here

    }
    public void clearText(ComponentOperator oper) {
  DriverManager.getFocusDriver(oper).giveFocus(oper);
  checkSupported(oper);
  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

    }
    public void typeText(ComponentOperator oper, String text, int caretPosition) {
  changeCaretPosition(oper, caretPosition);
  KeyDriver kDriver = DriverManager.getKeyDriver(oper);
  CharBindingMap map = oper.getCharBindingMap();
  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();
  }
    }
View Full Code Here

  typeText(oper, text, 0);
    }
    public void enterText(ComponentOperator oper, String text) {
  changeText(oper, text);
  DriverManager.getKeyDriver(oper).pushKey(oper, KeyEvent.VK_ENTER, 0,
               new Timeout("", 0));
    }
View Full Code Here

  DriverManager.getMouseDriver(oper).
      clickMouse(oper, pointToClick.x, pointToClick.y,
           1, oper.getDefaultMouseButton(), 0,
           oper.getTimeouts().create("ComponentOperator.MouseClickTimeout"));
  KeyDriver kdriver = DriverManager.getKeyDriver(oper);
  Timeout pushTimeout = oper.getTimeouts().create("ComponentOperator.PushKeyTimeout");
        if(System.getProperty("java.specification.version").compareTo("1.3") > 0) {
            while(coper.getSelectedIndex() != index) {
                kdriver.pushKey(oper, (index > coper.getSelectedIndex()) ? KeyEvent.VK_DOWN : KeyEvent.VK_UP, 0, pushTimeout);
            }
        } else {
View Full Code Here

      key = KeyEvent.VK_DOWN;
  } else {
      diff = current - index;
      key = KeyEvent.VK_UP;
  }
  Timeout pushTime = oper.getTimeouts().create("ComponentOperator.PushKeyTimeout");
  for(int i = 0; i < diff; i++) {
      kDriver.pushKey(oper, key, 0, pushTime);
  }
  kDriver.pushKey(oper, KeyEvent.VK_ENTER, 0, pushTime);
    }
View Full Code Here

    }
    public void enterText(ComponentOperator oper, String text) {
  changeText(oper, text);
  DriverManager.getKeyDriver(oper).
      pushKey(oper, KeyEvent.VK_ENTER, 0,
        new Timeout("", 0));
    }
View Full Code Here

    public void selectItems(final ComponentOperator oper, int[] indices) {
        ((JTreeOperator)oper).clearSelection();
        checkSupported(oper);
        final MouseDriver mdriver = DriverManager.getMouseDriver(oper);
        final JTreeOperator toper = (JTreeOperator)oper;
        final Timeout clickTime = oper.getTimeouts().create("ComponentOperator.MouseClickTimeout");
        for(int i = 0; i < indices.length; i++) {
            final int index = i;
            if(!queueTool.isDispatchThread()) {
                toper.scrollToRow(indices[i]);
            }
View Full Code Here

TOP

Related Classes of org.netbeans.jemmy.Timeout

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.