本文整理汇总了Java中org.netbeans.jemmy.operators.JTableOperator.getValueAt方法的典型用法代码示例。如果您正苦于以下问题:Java JTableOperator.getValueAt方法的具体用法?Java JTableOperator.getValueAt怎么用?Java JTableOperator.getValueAt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.netbeans.jemmy.operators.JTableOperator
的用法示例。
在下文中一共展示了JTableOperator.getValueAt方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: newWatch
import org.netbeans.jemmy.operators.JTableOperator; //导入方法依赖的package包/类
/**
* Tests that it is possible to add watches.
*/
public void newWatch() throws IllegalAccessException, InvocationTargetException, InvalidExpressionException {
Node projectNode = new ProjectsTabOperator().getProjectRootNode(DEBUG_TEST_PROJECT_ANT);
Node testFile = new Node(new SourcePackagesNode(projectNode), "advanced|VariablesTest.java");
new OpenAction().perform(testFile);
EditorOperator eo = new EditorOperator("VariablesTest.java");
eo.setCaretPositionToLine(49);
new ToggleBreakpointAction().perform();
MainWindowOperator.StatusTextTracer stt = MainWindowOperator.getDefault().getStatusTextTracer();
stt.start();
new DebugJavaFileAction().perform(testFile);
stt.waitText("Thread main stopped at VariablesTest.java:49");
stt.stop();
new ActionNoBlock("Debug|New Watch...", null).perform();
NbDialogOperator newWatchDialog = new NbDialogOperator("New Watch");
new JEditorPaneOperator(newWatchDialog, 0).setText("n");
newWatchDialog.ok();
TopComponentOperator variablesView = new TopComponentOperator(new ContainerOperator(MainWindowOperator.getDefault(), VIEW_CHOOSER), "Variables");
JTableOperator variablesTable = new JTableOperator(variablesView);
assertEquals("n", variablesTable.getValueAt(0, 0).toString());
org.openide.nodes.Node.Property property = (org.openide.nodes.Node.Property) variablesTable.getValueAt(0, 2);
assertEquals("50", property.getValue());
JPopupMenuOperator menu = new JPopupMenuOperator(variablesTable.callPopupOnCell(0, 0));
menu.pushMenu("Delete All");
}
示例2: assertValue
import org.netbeans.jemmy.operators.JTableOperator; //导入方法依赖的package包/类
/**
* Tests that table contains required value in cell with given coordinates.
*
* @param table Table to be used for the search.
* @param row Row of the cell.
* @param column Column of the cell.
* @param value Value to be searched for.
*/
private void assertValue(JTableOperator table, int row, int column, String value) throws IllegalAccessException, InvocationTargetException, InvalidExpressionException {
org.openide.nodes.Node.Property property = null;
for (int i = 0; i < 10; i++) {
property = (org.openide.nodes.Node.Property) table.getValueAt(row, column);
if (property != null)
if (!"Evaluating...".equals(property.getValue())) break;
new EventTool().waitNoEvent(1000);
}
assertNotNull(property);
if (property.getValue() instanceof ObjectVariable) {
assertEquals(value, ((ObjectVariable) property.getValue()).getToStringValue());
} else {
assertEquals(value, property.getValue().toString());
}
}
示例3: testViewsSessions
import org.netbeans.jemmy.operators.JTableOperator; //导入方法依赖的package包/类
public void testViewsSessions() {
EditorOperator eo = new EditorOperator("MemoryView.java");
new EventTool().waitNoEvent(500);
Utilities.toggleBreakpoint(eo, 92);
Utilities.startDebugger();
Utilities.checkConsoleLastLineForText("Thread main stopped at MemoryView.java:92");
Utilities.showDebuggerView(Utilities.sessionsViewTitle);
JTableOperator jTableOperator = new JTableOperator(new TopComponentOperator(Utilities.sessionsViewTitle));
assertEquals("examples.advanced.MemoryView", Utilities.removeTags(jTableOperator.getValueAt(0,0).toString()));
try {
org.openide.nodes.Node.Property property = (org.openide.nodes.Node.Property)jTableOperator.getValueAt(0,1);
assertEquals("Stopped", Utilities.removeTags(property.getValue().toString()));
property = (org.openide.nodes.Node.Property)jTableOperator.getValueAt(0,2);
assertEquals("org.netbeans.api.debugger.Session localhost:examples.advanced.MemoryView", Utilities.removeTags(property.getValue().toString()));
} catch (Exception ex) {
ex.printStackTrace();
assertTrue(ex.getClass()+": "+ex.getMessage(), false);
}
}
示例4: waitProperty
import org.netbeans.jemmy.operators.JTableOperator; //导入方法依赖的package包/类
/** Waits for property with given name in specified property sheet.
* @param propSheetOper PropertySheetOperator where to find property.
* @param name property display name
*/
private Node.Property waitProperty(final PropertySheetOperator propSheetOper, final String name) {
try {
Waiter waiter = new Waiter(new Waitable() {
public Object actionProduced(Object param) {
Node.Property property = null;
JTableOperator table = propSheetOper.tblSheet();
for(int row=0;row<table.getRowCount();row++) {
if(table.getValueAt(row, 1) instanceof Node.Property) {
property = (Node.Property)table.getValueAt(row, 1);
if(propSheetOper.getComparator().equals(property.getDisplayName(), name)) {
return property;
}
}
}
return null;
}
public String getDescription() {
return("Wait property "+name);
}
});
return (Node.Property)waiter.waitAction(null);
} catch (InterruptedException e) {
throw new JemmyException("Interrupted.", e);
}
}
示例5: testLocalVariablesValues
import org.netbeans.jemmy.operators.JTableOperator; //导入方法依赖的package包/类
/**
*
*/
public void testLocalVariablesValues() throws Throwable {
EditorOperator eo = new EditorOperator("MemoryView.java"); //NOI18N
new EventTool().waitNoEvent(500);
Utilities.toggleBreakpoint(eo, 104);
new EventTool().waitNoEvent(500);
Utilities.startDebugger();
Utilities.checkConsoleLastLineForText("Thread main stopped at MemoryView.java:104.");
expandNodes();
Utilities.showDebuggerView(Utilities.variablesViewTitle);
JTableOperator jTableOperator = new JTableOperator(new TopComponentOperator(Utilities.variablesViewTitle));
try {
org.openide.nodes.Node.Property property;
property = (org.openide.nodes.Node.Property)jTableOperator.getValueAt(25, 2);
long free = Long.parseLong(property.getValue().toString());
property = (org.openide.nodes.Node.Property)jTableOperator.getValueAt(26, 2);
long total = Long.parseLong(property.getValue().toString());
property = (org.openide.nodes.Node.Property)jTableOperator.getValueAt(27, 2);
long taken = Long.parseLong(property.getValue().toString());
assertTrue("Local varaibles values does not seem to be correct (total != free + taken) - "+total+" != "+free+" + "+taken, (total == free + taken));
} catch (java.lang.IllegalAccessException e1) {
assertTrue(e1.getMessage(), false);
} catch (java.lang.reflect.InvocationTargetException e2) {
assertTrue(e2.getMessage(), false);
}
}
示例6: getRow
import org.netbeans.jemmy.operators.JTableOperator; //导入方法依赖的package包/类
public int getRow() {
JTableOperator table = this.propertySheetOper.tblSheet();
for(int row=0;row<table.getRowCount();row++) {
if(table.getValueAt(row, 1) instanceof Node.Property) {
if(this.property == (Node.Property)table.getValueAt(row, 1)) {
return row;
}
}
}
throw new JemmyException("Cannot determine row number of property \""+getName()+"\"");
}
示例7: dumpTemplatesTable
import org.netbeans.jemmy.operators.JTableOperator; //导入方法依赖的package包/类
public List<String[]> dumpTemplatesTable() {
List<String[]> res = new LinkedList<>();
JTableOperator tableOperator = getTemplatesTable();
for (int i = 0; i < tableOperator.getRowCount(); i++) {
String[] items = new String[3];
for (int j = 0; j < 3; j++) {
items[j] = (String) tableOperator.getValueAt(i, j);
}
res.add(items);
}
return res;
}
示例8: getSelectedTemplate
import org.netbeans.jemmy.operators.JTableOperator; //导入方法依赖的package包/类
public String getSelectedTemplate() {
JTableOperator tableOperator = getTemplatesTable();
int selectedRow = tableOperator.getSelectedRow();
if(selectedRow<0) return null;
return (String) tableOperator.getValueAt(selectedRow, 0);
}