當前位置: 首頁>>代碼示例>>Java>>正文


Java StringComparator類代碼示例

本文整理匯總了Java中org.netbeans.jemmy.operators.Operator.StringComparator的典型用法代碼示例。如果您正苦於以下問題:Java StringComparator類的具體用法?Java StringComparator怎麽用?Java StringComparator使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


StringComparator類屬於org.netbeans.jemmy.operators.Operator包,在下文中一共展示了StringComparator類的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: selectCategory

import org.netbeans.jemmy.operators.Operator.StringComparator; //導入依賴的package包/類
/** Selects a category with given name.
 * @param name name of category to be selected
 */
public void selectCategory(final String name) {
    new EventTool().waitNoEvent(300);  // prevent clicking on category button when panel not initialized
    final StringComparator comparator = this.getComparator();
    new JLabelOperator(this, new ComponentChooser() {
        public boolean checkComponent(Component comp) {
            if(comp.getClass().getName().equals("org.netbeans.modules.options.OptionsPanel$CategoryButton")||// NOI18N
                    comp.getClass().getName().equals("org.netbeans.modules.options.OptionsPanel$NimbusCategoryButton")) { // NOI18N
                if(((JLabel)comp).getText() != null) {
                    return comparator.equals(((JLabel)comp).getText(), name);
                }
            }
            return false;
        }
        public String getDescription() {
            return "OptionsPanel$CategoryButton with text "+name; // NOI18N
        }
    }).clickMouse();
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:22,代碼來源:OptionsOperator.java

示例2: testCompletionDot

import org.netbeans.jemmy.operators.Operator.StringComparator; //導入依賴的package包/類
public void testCompletionDot() throws Exception {
    eo.makeComponentVisible();
    eo.typeKey('.');

    CompletionJListOperator lrComplOp = new CompletionJListOperator();
    lrComplOp.getCompletionItems();

    lrComplOp.clickOnItem("println()", new StringComparator() {

        @Override
        public boolean equals(String caption, String match) {
            return caption.contains(match);
        }
    }, 2); //doubleclick

    assertTrue("The line does not contain the clicked item from CompletionList!",
            eo.contains("System.out.println()"));

}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:20,代碼來源:CompletionJListOperatorTest.java

示例3: testCompletionInvoke

import org.netbeans.jemmy.operators.Operator.StringComparator; //導入依賴的package包/類
public void testCompletionInvoke() throws Exception {
    eo.makeComponentVisible();
    eo.insert(".");

    CompletionJListOperator lrComplOp = CompletionJListOperator.showCompletion();
    lrComplOp.getCompletionItems();

    lrComplOp.clickOnItem("println()", new StringComparator() {

        @Override
        public boolean equals(String caption, String match) {
            return caption.contains(match);
        }
    }, 2); //doubleclick

    assertTrue("The line does not contain the clicked item from CompletionList!",
            eo.contains("System.out.println()"));
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:19,代碼來源:CompletionJListOperatorTest.java

示例4: testCompletionCtrlSpace

import org.netbeans.jemmy.operators.Operator.StringComparator; //導入依賴的package包/類
public void testCompletionCtrlSpace() throws Exception {
    eo.insert(".");

    eo.requestFocus();
    eo.txtEditorPane().pushKey(KeyEvent.VK_SPACE, InputEvent.CTRL_MASK); //press ctrl+space

    CompletionJListOperator lrComplOp = new CompletionJListOperator();
    lrComplOp.getCompletionItems();

    lrComplOp.clickOnItem("println()", new StringComparator() {

        @Override
        public boolean equals(String caption, String match) {
            return caption.contains(match);
        }
    }, 2); //doubleclick

    assertTrue("The line does not contain the clicked item from CompletionList!",
            eo.contains("System.out.println()"));
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:21,代碼來源:CompletionJListOperatorTest.java

示例5: buildProject

import org.netbeans.jemmy.operators.Operator.StringComparator; //導入依賴的package包/類
/**
 * Build project and wait for finish
 * @param project
 */
public static void buildProject(String project) {
    JavaProjectRootNode prn = JavaProjectsTabOperator.invoke().getJavaProjectRootNode(project);
    prn.buildProject();
    StringComparator sc = MainWindowOperator.getDefault().getComparator();        
    MainWindowOperator.getDefault().setComparator(new Operator.DefaultStringComparator(false, true));
    MainWindowOperator.getDefault().waitStatusText("Finished building "); // NOI18N
    MainWindowOperator.getDefault().setComparator(sc);
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:13,代碼來源:CommonUtilities.java

示例6: getComparator

import org.netbeans.jemmy.operators.Operator.StringComparator; //導入依賴的package包/類
/**
 * Gets comparator set for this action instance.
 *
 * @return comparator set for this action instance.
 */
public StringComparator getComparator() {
    if (comparator == null) {
        comparator = defaultComparator;
    }
    return comparator;
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:12,代碼來源:Action.java

示例7: ToolbarButtonChooser

import org.netbeans.jemmy.operators.Operator.StringComparator; //導入依賴的package包/類
public ToolbarButtonChooser(String buttonTooltip, StringComparator comparator) {
    this.buttonTooltip = buttonTooltip;
    this.comparator = comparator;
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:5,代碼來源:OverflowToolbarOperator.java

示例8: AccessibleDescriptionChooser

import org.netbeans.jemmy.operators.Operator.StringComparator; //導入依賴的package包/類
public AccessibleDescriptionChooser(String description, StringComparator comparator) {
    this.description = description;
    this.comparator = comparator;
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:5,代碼來源:AccessibleDescriptionChooser.java

示例9: AccessibleNameChooser

import org.netbeans.jemmy.operators.Operator.StringComparator; //導入依賴的package包/類
public AccessibleNameChooser(String name, StringComparator comparator) {
    this.name = name;
    this.comparator = comparator;
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:5,代碼來源:AccessibleNameChooser.java

示例10: StringPropChooser

import org.netbeans.jemmy.operators.Operator.StringComparator; //導入依賴的package包/類
/**
 * Constructs a StringPropChooser object.
 *
 * @param propNames Names of methods/fields
 * @param params Parameters values for methods. <BR>
 * @param classes Parameters classes.
 * @param results Objects to compare converted to String method/field values
 * to.
 * @param comparator Defines string comparision criteria.
 */
public StringPropChooser(String[] propNames,
        Object[][] params,
        Class<?>[][] classes,
        String[] results,
        StringComparator comparator) {
    super(propNames, params, classes, results);
    this.comparator = comparator;
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:19,代碼來源:StringPropChooser.java

示例11: setComparator

import org.netbeans.jemmy.operators.Operator.StringComparator; //導入依賴的package包/類
/**
 * Sets comparator fot this action. Comparator is used for all actions after
 * this method is called.
 *
 * @param comparator new comparator to be set (e.g. new
 * Operator.DefaultStringComparator(true, true); to search string item
 * exactly and case sensitive)
 */
public void setComparator(StringComparator comparator) {
    this.comparator = comparator;
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:12,代碼來源:Action.java


注:本文中的org.netbeans.jemmy.operators.Operator.StringComparator類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。