Package org.netbeans.jemmy.operators

Examples of org.netbeans.jemmy.operators.ChoiceOperator$ChoiceFinder


    public ChoiceDriver() {
  super(new String[] {"org.netbeans.jemmy.operators.ChoiceOperator"});
    }

    public void selectItem(ComponentOperator oper, int index) {
        ChoiceOperator coper = (ChoiceOperator)oper;
        Point pointToClick = getClickPoint(oper);
  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 {
            int current = ((ChoiceOperator)oper).getSelectedIndex();
            int diff = 0;
            int key = 0;
View Full Code Here


    public ChoiceDriver() {
  super(new String[] {"org.netbeans.jemmy.operators.ChoiceOperator"});
    }

    public void selectItem(ComponentOperator oper, int index) {
        ChoiceOperator coper = (ChoiceOperator)oper;
        Point pointToClick = getClickPoint(oper);
  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 {
            int current = ((ChoiceOperator)oper).getSelectedIndex();
            int diff = 0;
            int key = 0;
View Full Code Here

TOP

Related Classes of org.netbeans.jemmy.operators.ChoiceOperator$ChoiceFinder

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.