Package org.netbeans.jemmy

Examples of org.netbeans.jemmy.Timeouts


         * @param button a Button
         */
  public Mover(JButton button) {
      super();
      bo = new JButtonOperator(button);
      Timeouts times = JemmyProperties.getCurrentTimeouts();
      times.setTimeout("AbstractButton.PushButtonTimeout",
           readCommentTimeout);
      bo.setTimeouts(times);
  }
View Full Code Here


     * Prepares the button to click.
     */
    protected void prepareToClick() {
  output.printLine("Push menu item\n    :" + toStringSource());
  output.printGolden("Push menu item");
  Timeouts times = timeouts.cloneThis();
  times.setTimeout("AbstractButtonOperator.PushButtonTimeout",
       timeouts.getTimeout("JMenuItemOperator.PushMenuTimeout"));
  super.setTimeouts(times);
  super.setOutput(output.createErrorOutput());
    }
View Full Code Here

  Timeouts.initDefault("JSplitPaneOperator.WholeScrollTimeout", WHOLE_SCROLL_TIMEOUT);
    }

    public void setTimeouts(Timeouts timeouts) {
  this.timeouts = timeouts;
  Timeouts times = timeouts;
  times.setTimeout("ComponentOperator.BeforeDragTimeout",
       0);
  times.setTimeout("ComponentOperator.AfterDragTimeout",
       times.getTimeout("JSplitPaneOperator.ScrollClickTimeout"));
  super.setTimeouts(times);
    }
View Full Code Here

  maxButtOperator.copyEnvironment(this);

  minButtOperator.setOutput(output.createErrorOutput());
  maxButtOperator.setOutput(output.createErrorOutput());

  Timeouts times = timeouts.cloneThis();
  times.setTimeout("AbstractButtonOperator.PushButtonTimeout",
       times.getTimeout("JScrollBarOperator.OneScrollClickTimeout"));
 
  minButtOperator.setTimeouts(times);    
  maxButtOperator.setTimeouts(times);    

  minButtOperator.setVisualizer(new EmptyVisualizer());    
View Full Code Here

        }
        public String getDescription() {
      return("Wait " + chooser.getDescription() + " loaded");
        }
    });
      Timeouts times = timeouts.cloneThis();
      times.setTimeout("Waiter.WaitingTime", times.getTimeout("ComponentOperator.WaitComponentTimeout"));
      waiter.setTimeouts(times);
      waiter.setOutput(output);
      return((Component)waiter.waitAction(null));
  } catch(InterruptedException e) {
      return(null);
View Full Code Here

    return("Component enabled: " +
           getSource().getClass().toString());
      }
  });
  waiter.setOutput(output);
  Timeouts times = timeouts.cloneThis();
  times.setTimeout("Waiter.WaitingTime",
       times.getTimeout("ComponentOperator.WaitComponentEnabledTimeout"));
  waiter.setTimeouts(times);
  waiter.waitAction(getSource());
    }
View Full Code Here

    /**
     * Waits for this Component has the keyboard focus.
     * @throws TimeoutExpiredException
     */
    public void waitHasFocus() {
  Timeouts times = timeouts.cloneThis();
  times.setTimeout("Waiter.WaitingTime",
       times.getTimeout("ComponentOperator.WaitFocusTimeout"));
  Waiter focusWaiter = new Waiter(new Waitable() {
      public Object actionProduced(Object obj) {
    return(hasFocus() ? "" : null);
      }
      public String getDescription() {
View Full Code Here

     * Returns the root of the tree.
     * @return tree root.
     * @throws TimeoutExpiredException
     */
    public Object getRoot() {
  Timeouts times = timeouts.cloneThis();
  times.setTimeout("Waiter.WaitingTime", timeouts.getTimeout("JTreeOperator.WaitNodeVisibleTimeout"));
  Waiter rootWaiter = new Waiter(new Waitable() {
      public Object actionProduced(Object obj) {
    Object root = ((TreeModel)getModel()).getRoot();
    if(root == null || root.toString() == null || root.toString().equals("null")) {
        return(null);
View Full Code Here

  output.printGolden("Search for a tree path");
  TreePath rootPath = new TreePath(getRoot());
  if(chooser.checkPath(rootPath, 0)) {
      return(rootPath);
  }
  Timeouts times = timeouts.cloneThis();
  times.setTimeout("Waiter.WaitingTime", timeouts.getTimeout("JTreeOperator.WaitNextNodeTimeout"));
  Waiter loadedWaiter = new Waiter(new Waitable() {
            // fields used in getDescription() method
            TreePath currentPath;
            String requestedPath;
           
View Full Code Here

     * @throws TimeoutExpiredException
     */
    public JList waitList() {
  Waiter pw = new ListWater();
  pw.setOutput(output.createErrorOutput());
  Timeouts times = timeouts.cloneThis();
  times.setTimeout("Waiter.WaitingTime",
       times.getTimeout("JComboBoxOperator.WaitListTimeout"));
  pw.setTimeouts(times);
  try {
      return((JList)pw.waitAction(null));
  } catch(InterruptedException e) {
      output.printStackTrace(e);
View Full Code Here

TOP

Related Classes of org.netbeans.jemmy.Timeouts

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.