Package org.netbeans.jemmy

Examples of org.netbeans.jemmy.WindowWaiter


     * Searches for a window which contains JPopupMenu.
     * @param chooser a component chooser specifying criteria for JPopupMenu.
     * @return a window containing JPopupMenu.
     */
    public static Window findJPopupWindow(ComponentChooser chooser) {
  return((new WindowWaiter()).getWindow(new JPopupWindowFinder(chooser)));
    }
View Full Code Here


     * @return a window containing JPopupMenu.
     * @throws TimeoutExpiredException
     */
    public static Window waitJPopupWindow(ComponentChooser chooser) {
  try {
      return((new WindowWaiter()).waitWindow(new JPopupWindowFinder(chooser)));
  } catch(InterruptedException e) {
      return(null);
  }
    }
View Full Code Here

     * @param popupChooser a component chooser specifying criteria for JPopupMenu.
     * @return a JPopupMenu fitting the criteria.
     */
    public static JPopupMenuOperator waitJPopupMenu(final ComponentChooser popupChooser) {
  try {
      WindowOperator wind = new WindowOperator(new WindowWaiter().waitWindow(new ComponentChooser() {
        public boolean checkComponent(Component comp) {
      ComponentSearcher searcher = new ComponentSearcher((Container)comp);
      searcher.setOutput(JemmyProperties.getCurrentOutput().createErrorOutput());
      return(searcher.findComponent(popupChooser) != null);
        }
View Full Code Here

     * @return a subwindow
     */
    public Window waitSubWindow(ComponentChooser chooser, int index) {
        getOutput().printLine("Waiting for \"" + chooser.getDescription() +
                              "\" subwindow");
        WindowWaiter ww = new WindowWaiter();
        ww.setOutput(getOutput());
        ww.setTimeouts(getTimeouts());
  try {
      return(ww.waitWindow((Window)getSource(), chooser, index));
  } catch (InterruptedException e) {
      throw(new JemmyException("Waiting for \"" + chooser.getDescription() +
             "\" window has been interrupted", e));
  }
    }
View Full Code Here

     * @return Component instance or null if component was not found.
     */
    protected static Window waitWindow(ComponentChooser chooser, int index,
               Timeouts timeouts, TestOut output) {
  try {
      WindowWaiter waiter = new WindowWaiter();
      waiter.setTimeouts(timeouts);
      waiter.setOutput(output);
      return(waiter.waitWindow(chooser, index));
  } catch(InterruptedException e) {
      output.printStackTrace(e);
      return(null);
  }
    }
View Full Code Here

     * @return Component instance or null if component was not found.
     */
    protected static Window waitWindow(Window owner, ComponentChooser chooser, int index,
               Timeouts timeouts, TestOut output) {
  try {
      WindowWaiter waiter = new WindowWaiter();
      waiter.setTimeouts(timeouts);
      waiter.setOutput(output);
      return(waiter.waitWindow(owner, chooser, index));
  } catch(InterruptedException e) {
      JemmyProperties.getCurrentOutput().printStackTrace(e);
      return(null);
  }
    }
View Full Code Here

     * Searches for a window which contains JPopupMenu.
     * @param chooser a component chooser specifying criteria for JPopupMenu.
     * @return a window containing JPopupMenu.
     */
    public static Window findJPopupWindow(ComponentChooser chooser) {
  return((new WindowWaiter()).getWindow(new JPopupWindowFinder(chooser)));
    }
View Full Code Here

     * @return a window containing JPopupMenu.
     * @throws TimeoutExpiredException
     */
    public static Window waitJPopupWindow(ComponentChooser chooser) {
  try {
      return((new WindowWaiter()).waitWindow(new JPopupWindowFinder(chooser)));
  } catch(InterruptedException e) {
      return(null);
  }
    }
View Full Code Here

     * @param popupChooser a component chooser specifying criteria for JPopupMenu.
     * @return a JPopupMenu fitting the criteria.
     */
    public static JPopupMenuOperator waitJPopupMenu(final ComponentChooser popupChooser) {
  try {
      WindowOperator wind = new WindowOperator(new WindowWaiter().waitWindow(new ComponentChooser() {
        public boolean checkComponent(Component comp) {
      ComponentSearcher searcher = new ComponentSearcher((Container)comp);
      searcher.setOutput(JemmyProperties.getCurrentOutput().createErrorOutput());
      return(searcher.findComponent(popupChooser) != null);
        }
View Full Code Here

     * @return a subwindow
     */
    public Window waitSubWindow(ComponentChooser chooser, int index) {
        getOutput().printLine("Waiting for \"" + chooser.getDescription() +
                              "\" subwindow");
        WindowWaiter ww = new WindowWaiter();
        ww.setOutput(getOutput());
        ww.setTimeouts(getTimeouts());
  try {
      return(ww.waitWindow((Window)getSource(), chooser, index));
  } catch (InterruptedException e) {
      throw(new JemmyException("Waiting for \"" + chooser.getDescription() +
             "\" window has been interrupted", e));
  }
    }
View Full Code Here

TOP

Related Classes of org.netbeans.jemmy.WindowWaiter

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.