本文整理汇总了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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
示例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);
}
}