Package org.netbeans.jemmy

Examples of org.netbeans.jemmy.ComponentSearcher.findComponent()


        JMenuItemOperator result;
        // isVisible() on items returns false on mac, so we need a special searcher.
        if(System.getProperty("os.name").toLowerCase().indexOf("mac") > -1) { // NOI18N
            ComponentSearcher searcher = new ComponentSearcher((Container)menuCont.getSource());
            searcher.setOutput(output);
            Component c = searcher.findComponent(new JMenuItemOperator.JMenuItemByLabelFinder(path[path.length-1], getComparator()));
            result = new JMenuItemOperator((JMenuItem)c);
        } else {
            result = new JMenuItemOperator(menuCont, path[path.length - 1]);
        }
        result.copyEnvironment(this);
View Full Code Here


                              "\" subcomponent");
        final ComponentSearcher searcher = new ComponentSearcher((Container)getSource());
        searcher.setOutput(getOutput().createErrorOutput());
  Waiter waiter = new Waiter(new Waitable() {
    public Object actionProduced(Object obj) {
                    return(searcher.findComponent(chooser, index));
    }
    public String getDescription() {
        return("Wait for \"" + chooser.getDescription() +
         "\" subcomponent to be displayed");
    }
View Full Code Here

               comp instanceof Window &&
               ((Window)comp).isVisible()) {
                ComponentSearcher searcher =
                    new ComponentSearcher((Container)comp);
                searcher.setOutput(output);
                return(searcher.findComponent(subChooser) != null);
            } else {
                return(false);
            }
        }
  public String getDescription() {
View Full Code Here

  }
  public boolean checkComponent(Component comp) {
      if(comp.isShowing() && comp instanceof Window) {
    ComponentSearcher cs = new ComponentSearcher((Container)comp);
    cs.setOutput(JemmyProperties.getCurrentOutput().createErrorOutput());
    return(cs.findComponent(ppFinder)
           != null);
      }
      return(false);
  }
  public String getDescription() {
View Full Code Here

  }
    }
    public Component getTitlePane(ComponentOperator operator) {
  ComponentSearcher cs = new ComponentSearcher((Container)operator.getSource());
  cs.setOutput(operator.getOutput().createErrorOutput());
  return(cs.findComponent(new ComponentChooser() {
          public boolean checkComponent(Component comp) {
              if(System.getProperty("java.version").startsWith("1.2")) {
            return(comp.getClass().getName().endsWith("InternalFrameTitlePane"));
              } else {
            return(comp instanceof BasicInternalFrameTitlePane);
View Full Code Here

                              "\" subcomponent");
        final ComponentSearcher searcher = new ComponentSearcher((Container)getSource());
        searcher.setOutput(getOutput().createErrorOutput());
  Waiter waiter = new Waiter(new Waitable() {
    public Object actionProduced(Object obj) {
                    return(searcher.findComponent(chooser, index));
    }
    public String getDescription() {
        return("Wait for \"" + chooser.getDescription() +
         "\" subcomponent to be displayed");
    }
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.