Package org.netbeans.jemmy

Examples of org.netbeans.jemmy.ClassReference


            String[] newArgv = new String[argv.length -1];
            for(int i = 1; i < argv.length; i++) {
                newArgv[i-1] = argv[i];
            }
            try {
                new ClassReference(argv[0]).startApplication(newArgv);
            } catch (ClassNotFoundException e) {
                e.printStackTrace();
                return;
            } catch (InvocationTargetException e) {
                e.printStackTrace();
View Full Code Here


  String operatorPackage;
  for(int i = 0; i < operatorPkgs.size(); i++) {
      operatorPackage = (String)operatorPkgs.get(i);
      try {
    return((ComponentOperator)
           new ClassReference(operatorPackage + "." +
            className + "Operator").
           newInstance(params, param_classes));
      } catch(ClassNotFoundException e) {
      } catch(InvocationTargetException e) {
      } catch(NoSuchMethodException e) {
View Full Code Here

    public boolean isFocused() {
        if(System.getProperty("java.specification.version").compareTo("1.3") > 0) {
            return(runMapping(new MapBooleanAction("isFocused") {
                    public boolean map() {
                        try {
                            return(((Boolean)new ClassReference(getSource()).
                                    invokeMethod("isFocused", null, null)).booleanValue());
                        } catch(InvocationTargetException e) {
                            return(false);
                        } catch(NoSuchMethodException e) {
                            return(false);
View Full Code Here

    public boolean isActive() {
        if(System.getProperty("java.specification.version").compareTo("1.3") > 0) {
            return(runMapping(new MapBooleanAction("isActive") {
                    public boolean map() {
                        try {
                            return(((Boolean)new ClassReference(getSource()).
                                    invokeMethod("isActive", null, null)).booleanValue());
                        } catch(InvocationTargetException e) {
                            return(false);
                        } catch(NoSuchMethodException e) {
                            return(false);
View Full Code Here

    public boolean isFocused() {
        if(System.getProperty("java.specification.version").compareTo("1.3") > 0) {
            return(runMapping(new MapBooleanAction("isFocused") {
                    public boolean map() {
                        try {
                            return(((Boolean)new ClassReference(getSource()).
                                    invokeMethod("isFocused", null, null)).booleanValue());
                        } catch(InvocationTargetException e) {
                            return(false);
                        } catch(NoSuchMethodException e) {
                            return(false);
View Full Code Here

    public boolean isActive() {
        if(System.getProperty("java.specification.version").compareTo("1.3") > 0) {
            return(runMapping(new MapBooleanAction("isActive") {
                    public boolean map() {
                        try {
                            return(((Boolean)new ClassReference(getSource()).
                                    invokeMethod("isActive", null, null)).booleanValue());
                        } catch(InvocationTargetException e) {
                            return(false);
                        } catch(NoSuchMethodException e) {
                            return(false);
View Full Code Here

        }
    }
   
    private void doInitRobot() {
        try {
            ClassReference robotClassReverence = new ClassReference("java.awt.Robot");
            robotReference = new ClassReference(robotClassReverence.newInstance(null, null));
            robotReference.invokeMethod("setAutoDelay",
                    new Object[] {new Integer((int)((autoDelay != null) ?
                        autoDelay.getValue() :
                        0))},
                    new Class[] {Integer.TYPE});
View Full Code Here

        if(caption == null) {
            return(false);
        }
        if(System.getProperty("java.specification.version").compareTo("1.3") > 0) {
            try {
                Object result = new ClassReference("java.util.regex.Pattern").
                    invokeMethod("matches",
                                 new Object[] {match, (caption == null) ? "" : caption},
                                 new Class[]  {String.class, Class.forName("java.lang.CharSequence")});
                return(((Boolean)result).booleanValue());
            } catch(InvocationTargetException e) {
View Full Code Here

    public boolean checkComponent(Component comp) {
  try {
      String propName = null;
      Object value;
      ClassReference disp = new ClassReference(comp);
      for(int i = 0; i < propNames.length; i++) {
    propName = propNames[i];
    if(propName != null) {
        if(isField(comp, propName, classes[i])) {
      try {
          value = disp.getField(propName);
      } catch(IllegalStateException e) {
          output.printStackTrace(e);
          return(false);
      } catch(NoSuchFieldException e) {
          output.printStackTrace(e);
          return(false);
      } catch(IllegalAccessException e) {
          output.printStackTrace(e);
          return(false);
      }
        } else {
      try {
          value = disp.invokeMethod(propName, params[i], classes[i]);
      } catch(InvocationTargetException e) {
          output.printStackTrace(e);
          return(false);
      } catch(IllegalStateException e) {
          output.printStackTrace(e);
View Full Code Here

            String[] newArgv = new String[argv.length -1];
            for(int i = 1; i < argv.length; i++) {
                newArgv[i-1] = argv[i];
            }
            try {
                new ClassReference(argv[0]).startApplication(newArgv);
            } catch (ClassNotFoundException e) {
                e.printStackTrace();
                return;
            } catch (InvocationTargetException e) {
                e.printStackTrace();
View Full Code Here

TOP

Related Classes of org.netbeans.jemmy.ClassReference

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.