Package org.netbeans.jemmy

Examples of org.netbeans.jemmy.ComponentSearcher


     * Constructor.
     * @param b Container component.
     */
    public ContainerOperator(Container b) {
  super(b);
        searcher = new ComponentSearcher(b);
  searcher.setOutput(TestOut.getNullOutput());
    }
View Full Code Here


     * @return Component instance.
     */
    public Component waitSubComponent(final ComponentChooser chooser, final int index) {
        getOutput().printLine("Waiting for \"" + chooser.getDescription() +
                              "\" 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

     * Constructor.
     * @param comp a component
     */
    public JFileChooserOperator(JFileChooser comp) {
  super(comp);
  innerSearcher = new ComponentSearcher(comp);
  setTimeouts(JemmyProperties.getProperties().getTimeouts());
  setOutput(JemmyProperties.getProperties().getOutput());
    }
View Full Code Here

  }
  public boolean checkComponent(Component comp) {
            if(comp != null &&
               comp instanceof Window &&
               ((Window)comp).isVisible()) {
                ComponentSearcher searcher =
                    new ComponentSearcher((Container)comp);
                searcher.setOutput(output);
                return(searcher.findComponent(subChooser) != null);
            } else {
                return(false);
            }
        }
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);
  }
View Full Code Here

      }
      ((JInternalFrameOperator)oper).getMaximizeButton().push();
  }
    }
    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

     * Constructor.
     * @param b Container component.
     */
    public ContainerOperator(Container b) {
  super(b);
        searcher = new ComponentSearcher(b);
  searcher.setOutput(TestOut.getNullOutput());
    }
View Full Code Here

     * @return Component instance.
     */
    public Component waitSubComponent(final ComponentChooser chooser, final int index) {
        getOutput().printLine("Waiting for \"" + chooser.getDescription() +
                              "\" 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

Related Classes of org.netbeans.jemmy.ComponentSearcher

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.