当前位置: 首页>>代码示例>>Java>>正文


Java JTreeOperator.getRowCount方法代码示例

本文整理汇总了Java中org.netbeans.jemmy.operators.JTreeOperator.getRowCount方法的典型用法代码示例。如果您正苦于以下问题:Java JTreeOperator.getRowCount方法的具体用法?Java JTreeOperator.getRowCount怎么用?Java JTreeOperator.getRowCount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.netbeans.jemmy.operators.JTreeOperator的用法示例。


在下文中一共展示了JTreeOperator.getRowCount方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testAvailableGettersSetters

import org.netbeans.jemmy.operators.JTreeOperator; //导入方法依赖的package包/类
public void testAvailableGettersSetters() {
    openSourceFile("org.netbeans.test.java.editor.codegeneration", "CreateGetterSetter");
    editor = new EditorOperator("CreateGetterSetter");
    txtOper = editor.txtEditorPane();
    try {
        editor.requestFocus();
        editor.setCaretPosition(11, 1);
        GenerateCodeOperator.openDialog(GenerateCodeOperator.GENERATE_GETTER_SETTER,editor);
        GenerateGettersAndSettersOperator ggso = new GenerateGettersAndSettersOperator(GenerateGettersAndSettersOperator.GETTERS_AND_SETTERS);
        JTreeOperator jto = ggso.treeTreeView$ExplorerTree();
        int rowCount = jto.getRowCount();
        ggso.cancel();
        assertEquals("Wrong number of rows",5,rowCount);
        
    } finally {
        editor.close(false);
    }        
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:19,代码来源:CreateGetterSetterTest.java

示例2: testAvailableGetters

import org.netbeans.jemmy.operators.JTreeOperator; //导入方法依赖的package包/类
public void testAvailableGetters() {
    openSourceFile("org.netbeans.test.java.editor.codegeneration", "CreateGetterSetter");
    editor = new EditorOperator("CreateGetterSetter");
    txtOper = editor.txtEditorPane();
    try {
        editor.requestFocus();
        editor.setCaretPosition(11, 1);
        GenerateCodeOperator.openDialog(GenerateCodeOperator.GENERATE_GETTER, editor);
        GenerateGettersAndSettersOperator ggso = new GenerateGettersAndSettersOperator(GenerateGettersAndSettersOperator.GETTERS_ONLY);
        JTreeOperator jto = ggso.treeTreeView$ExplorerTree();
        int rowCount = jto.getRowCount();
        ggso.cancel();
        assertEquals("Wrong number of rows",6,rowCount);
    } finally {
        editor.close(false);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:18,代码来源:CreateGetterSetterTest.java

示例3: testAvailableSetters

import org.netbeans.jemmy.operators.JTreeOperator; //导入方法依赖的package包/类
public void testAvailableSetters() {
    openSourceFile("org.netbeans.test.java.editor.codegeneration", "CreateGetterSetter");
    editor = new EditorOperator("CreateGetterSetter");
    txtOper = editor.txtEditorPane();
    try {
        editor.requestFocus();
        editor.setCaretPosition(11, 1);
        GenerateCodeOperator.openDialog(GenerateCodeOperator.GENERATE_SETTER,editor);
        GenerateGettersAndSettersOperator ggso = new GenerateGettersAndSettersOperator(GenerateGettersAndSettersOperator.SETTERS_ONLY);
        JTreeOperator jto = ggso.treeTreeView$ExplorerTree();
        int rowCount = jto.getRowCount();
        ggso.cancel();
        assertEquals("Wrong number of rows",6,rowCount);
    } finally {
        editor.close(false);
    }        
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:18,代码来源:CreateGetterSetterTest.java

示例4: selectHintNode

import org.netbeans.jemmy.operators.JTreeOperator; //导入方法依赖的package包/类
protected void selectHintNode(JTreeOperator jto, String category, String hintName) {
    int i = 0;
    for (i = 0; i < jto.getRowCount(); i++) {
        jto.selectRow(i);
        jto.collapseRow(i);            
        Object lastSelectedPathComponent = jto.getLastSelectedPathComponent();
        Object userObject = ((DefaultMutableTreeNode) lastSelectedPathComponent).getUserObject();
        String fileName = ((FileObject) userObject).getName();            
        if (fileName.equals(category)) {
            break;
        }
    }
    assertTrue("Category "+category+" not found", i < jto.getRowCount());
    jto.expandRow(i);
    Object root = jto.getLastSelectedPathComponent();
    for(int j = 0;j<jto.getChildCount(root);j++) {
        DefaultMutableTreeNode child = (DefaultMutableTreeNode)jto.getChild(root, j);
        String displayName = ((AbstractHint) child.getUserObject()).getDisplayName();
        if(displayName.equals(hintName)) {
            jto.selectRow(i + j + 1);
            return;
        }
    }
    assertTrue("Hint "+hintName+" not found", false);     
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:26,代码来源:HintsTestCase.java

示例5: collapseAll

import org.netbeans.jemmy.operators.JTreeOperator; //导入方法依赖的package包/类
/**
 * Collapse all nodes.
 */
public void collapseAll() {
    JTreeOperator tree = tree();
    for (int i = tree.getRowCount() - 1; i >= 0; i--) {
        tree.collapseRow(i);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:10,代码来源:FavoritesOperator.java


注:本文中的org.netbeans.jemmy.operators.JTreeOperator.getRowCount方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。