1 19 package org.netbeans.test.utilities.operators; 20 21 import java.awt.Component ; 22 import org.netbeans.jellytools.TopComponentOperator; 23 import org.netbeans.jellytools.actions.Action; 24 import org.netbeans.jemmy.ComponentChooser; 25 import org.netbeans.jemmy.operators.JToggleButtonOperator; 26 import org.netbeans.test.utilities.actions.SearchResultsViewAction; 27 28 32 public class SearchResultsOperator extends TopComponentOperator { 33 34 private static final Action invokeAction = new SearchResultsViewAction(); 35 36 39 public SearchResultsOperator() { 40 45 super(waitTopComponent(null, null, 0, resultsSubchooser)); 46 } 47 48 55 public static SearchResultsOperator invoke() { 56 invokeAction.perform(); 57 return new SearchResultsOperator(); 58 } 59 60 64 private static final ComponentChooser resultsSubchooser = new ComponentChooser() { 65 public boolean checkComponent(Component comp) { 66 return comp.getClass().getName().endsWith("ResultView"); } 68 public String getDescription() { 69 return "component instanceof org.netbeans.modules.search.ResultView"; } 71 }; 72 } 73 | Popular Tags |