Package org.netbeans.jemmy

Examples of org.netbeans.jemmy.Waitable


     * Waits for the component to be enabled.
     * @throws TimeoutExpiredException
     * @throws InterruptedException
     */
    public void waitComponentEnabled() throws InterruptedException{
  Waiter waiter = new Waiter(new Waitable() {
      public Object actionProduced(Object obj) {
    if(((Component)obj).isEnabled()) {
        return(obj);
    } else {
        return(null);
View Full Code Here


     */
    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() {
    return("Wait component has focus");
View Full Code Here

     * @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);
    } else {
View Full Code Here

  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;
           
      public Object actionProduced(Object obj) {
View Full Code Here

     * @param state a ComponentChooser defining the state criteria.
     * @throws TimeoutExpiredException if the state has not
     * achieved in a value defined by <code>"ComponentOperator.WaitStateTimeout"</code>
     */
    public void waitState(final ComponentChooser state) {
  Waiter stateWaiter = new Waiter(new Waitable() {
    public Object actionProduced(Object obj) {
        return(state.checkComponent(getSource()) ?
         "" : null);
    }
    public String getDescription() {
View Full Code Here

  output.printLine("Wait \"" + chooser.getDescription() +
       "\" value in progressbar\n    : " +
       toStringSource());
  output.printGolden("Wait \"" + chooser.getDescription() +
       "\" value in progressbar");
  Waiter wt = new Waiter(new Waitable() {
    public Object actionProduced(Object obj) {
        return(chooser.checkValue(((JProgressBar)getSource()).getValue()) ?
         "" : null);
    }
    public String getDescription() {
View Full Code Here

    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() +
View Full Code Here

    //End of mapping                                      //
    ////////////////////////////////////////////////////////

    private void waitPainted(int index) {
  Waiter drawingWaiter = new Waiter(new Waitable() {
    public Object actionProduced(Object param) {
        JList list = getFileList();
        int last_one = list.getModel().getSize() - 1;
        if(last_one == -1) {
      return("");
View Full Code Here

           }
       }, index));
    }

    private int findFileIndex(final String file, final StringComparator comparator) {
        Waiter fileWaiter = new Waiter(new Waitable() {
                public Object actionProduced(Object obj) {
                    File[] files = getFiles();
                    for(int i = 0; i < files.length; i++) {
                        if(comparator.equals(files[i].getName(),
                                             file)) {
View Full Code Here

        }
        return(result);
    }

    private JMenuItem runAction(final OneReleaseAction action, ComponentOperator env, long waitingTime, final String description) {
        Waiter waiter = new Waiter(new Waitable() {
                public Object actionProduced(Object param) {
                    return(queueTool.invokeSmoothly(action));
                }
                public String getDescription() {
                    return(description);
View Full Code Here

TOP

Related Classes of org.netbeans.jemmy.Waitable

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.