Java Code Examples for org.netbeans.jemmy.operators.JTableOperator#findCellRow()

The following examples show how to use org.netbeans.jemmy.operators.JTableOperator#findCellRow() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CodeTemplatesOperator.java    From netbeans with Apache License 2.0 5 votes vote down vote up
public boolean selectTemplate(String abbrev) {
    JTableOperator templatesTable1 = getTemplatesTable();
    int row = templatesTable1.findCellRow(abbrev, 0, 0);
    if(row==-1) return false;
    templatesTable1.selectCell(row, 0);
    return true;                
}
 
Example 2
Source File: PluginsOperator.java    From netbeans with Apache License 2.0 5 votes vote down vote up
/** Selects plugins in the table.
 * @param pluginNames array of plugin names to be selected
 */
public void selectPlugins(String[] pluginNames) {
    JTableOperator tableOper = table();
    for (int i = 0; i < pluginNames.length; i++) {
        String name = pluginNames[i];
        int row = tableOper.findCellRow(name, new DefaultStringComparator(true, true), 1, 0);
        if(row == -1) {
            throw new JemmyException("Plugin "+name+" not found.");
        }
        tableOper.selectCell(row, 1);
        tableOper.clickOnCell(row, 0);
    }
}
 
Example 3
Source File: EditorWindowOperator.java    From netbeans with Apache License 2.0 5 votes vote down vote up
/** Pushes down arrow control button in top right corner intended to 
 * show list of opened documents and selects document with given name
 * in the list.
 */
public static void selectDocument(String name) {
    btDown().push();
    JTableOperator tableOper = new JTableOperator(MainWindowOperator.getDefault());
    int row = tableOper.findCellRow(name);
    if (row > -1) {
        tableOper.selectCell(row, 0);
    } else {
        throw new JemmyException("Cannot select document \"" + name + "\".");
    }
}