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


Java JTableOperator.getRowCount方法代码示例

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


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

示例1: testViewsSources

import org.netbeans.jemmy.operators.JTableOperator; //导入方法依赖的package包/类
public void testViewsSources() {        
    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.sourcesViewTitle);
    JTableOperator jTableOperator = new JTableOperator(new TopComponentOperator(Utilities.sourcesViewTitle));
    String debugAppSource = "debugTestProject" + java.io.File.separator + "src (Project debugTestProject)";
    boolean jdk = false, project = false;
    for (int i=0;i < jTableOperator.getRowCount();i++) {
        String src = Utilities.removeTags(jTableOperator.getValueAt(i,0).toString());
        if (src.endsWith("src.zip")) {
            jdk=true;
        } else if (src.endsWith(debugAppSource)) {
            project = true;
        }
    }
    assertTrue("JDK source root is not shown in threads view", jdk);
    assertTrue("MemoryView source root is not shown in threads view", project);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:22,代码来源:ViewsTest.java

示例2: 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);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:30,代码来源:Property.java

示例3: unassignAlternativeShortcutToAction

import org.netbeans.jemmy.operators.JTableOperator; //导入方法依赖的package包/类
public boolean unassignAlternativeShortcutToAction(String actionName, String shortcutStr) {
    System.out.println("[TEST_DEBUG]");
    System.out.println("[TEST_DEBUG] ### Unassigning alternative shortcut for " + actionName + " - Started");
    String tmpStr = actionSearchByName().getText();
    searchActionName(actionName);
    JTableOperator tab = actionsTable();
    TableModel tm = tab.getModel();
    String _str;
    System.out.println("[TEST_DEBUG]  Found " + tab.getRowCount() + " actions matching action pattern: " + actionName);
    for (int i = 0; i < tab.getRowCount(); i++) {
        _str = tm.getValueAt(i, 0).toString();
        System.out.println("[TEST_DEBUG]  Examining action " + _str + ", which is no. " + (i + 1) + "in the table...");
        if (_str.toLowerCase().startsWith(actionName.toLowerCase()) && tm.getValueAt(i, 1).toString().toLowerCase().equals(shortcutStr.toLowerCase())) {
            System.out.println("[TEST_DEBUG]  Action " + actionName + "was found");
            JListOperator jli = clickShortcutEllipsisButton(tab, i);
            jli.clickOnItem("Clear");
            sleep(100);
            System.out.println("[TEST_DEBUG] ### Unassigning alternative shortcut for " + actionName + " - OK");
            break;
        }
    }
    searchActionName(tmpStr);
    return true;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:25,代码来源:KeyMapOperator.java

示例4: deleteAllBreakpoints

import org.netbeans.jemmy.operators.JTableOperator; //导入方法依赖的package包/类
public static void deleteAllBreakpoints() {
    showDebuggerView(breakpointsViewTitle);
    JTableOperator jTableOperator = new JTableOperator(new TopComponentOperator(breakpointsViewTitle));
    if (jTableOperator.getRowCount() > 0) {
        new JPopupMenuOperator(jTableOperator.callPopupOnCell(0, 0)).pushMenu(Bundle.getString("org.netbeans.modules.debugger.ui.models.Bundle", "CTL_BreakpointAction_DeleteAll_Label"));
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:8,代码来源:Utilities.java

示例5: deleteAllWatches

import org.netbeans.jemmy.operators.JTableOperator; //导入方法依赖的package包/类
public static void deleteAllWatches() {
    showDebuggerView(watchesViewTitle);
    JTableOperator jTableOperator = new JTableOperator(new TopComponentOperator(watchesViewTitle));
    if (jTableOperator.getRowCount() > 0) {
        new JPopupMenuOperator(jTableOperator.callPopupOnCell(0, 0)).pushMenu(Bundle.getString("org.netbeans.modules.debugger.ui.models.Bundle", "CTL_WatchAction_DeleteAll"));
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:8,代码来源:Utilities.java

示例6: endAllSessions

import org.netbeans.jemmy.operators.JTableOperator; //导入方法依赖的package包/类
public static void endAllSessions() {
    showDebuggerView(sessionsViewTitle);
    JTableOperator jTableOperator = new JTableOperator(new TopComponentOperator(sessionsViewTitle));
    if (jTableOperator.getRowCount() > 0) {
        new JPopupMenuOperator(jTableOperator.callPopupOnCell(0, 0)).pushMenu(Bundle.getString("org.netbeans.modules.debugger.ui.models.Bundle", "CTL_SessionAction_FinishAll_Label"));
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:8,代码来源:Utilities.java

示例7: 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()+"\"");
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:12,代码来源:Property.java

示例8: 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;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:13,代码来源:CodeTemplatesOperator.java

示例9: CheckDownloaded

import org.netbeans.jemmy.operators.JTableOperator; //导入方法依赖的package包/类
public void CheckDownloaded( )
{
  startTest( );

  // Open
  new JMenuBarOperator(MainWindowOperator.getDefault()).pushMenuNoBlock("Tools|Plugins");

  JDialogOperator jdPlugins = new JDialogOperator( "Plugins" );

  JTabbedPaneOperator jtTabs = new JTabbedPaneOperator( jdPlugins, 0 );
  jtTabs.setSelectedIndex( jtTabs.findPage( "Downloaded" ) );

  // Check buttons
  JButtonOperator jbAdd = new JButtonOperator( jdPlugins, "Add Plugins..." );
  JButtonOperator jbInstall = new JButtonOperator( jdPlugins, "Install" );

  // Check table
  JTableOperator jtTable = new JTableOperator( jdPlugins, 0 );
  int iOriginalRows = jtTable.getRowCount( );

  // Close by button
  JButtonOperator jbClose = new JButtonOperator( jdPlugins, "Close" );
  jbClose.push( );
  jdPlugins.waitClosed( );

  endTest( );
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:28,代码来源:Autoupdate.java

示例10: assignShortcutToAction

import org.netbeans.jemmy.operators.JTableOperator; //导入方法依赖的package包/类
public boolean assignShortcutToAction(String actionName, boolean ctrl, boolean shift, boolean alt, int Key, boolean expectedAlreadyAssigned, boolean reassign) {
    System.out.println("[TEST_DEBUG]");
    System.out.println("[TEST_DEBUG] ### Reassigning shortcut for " + actionName + " - Started");
    int mask = buildKeyModifierMask(ctrl, alt, shift);
    String tmpStr = actionSearchByName().getText();
    searchActionName(actionName);
    JTableOperator tab = actionsTable();
    TableModel tm = tab.getModel();
    String _str;
    System.out.println("[TEST_DEBUG]  Found " + tab.getRowCount() + " actions matching action pattern: " + actionName);
    for (int i = 0; i < tab.getRowCount(); i++) {
        _str = tm.getValueAt(i, 0).toString();
        System.out.println("[TEST_DEBUG]  Examining action \"" + _str + "\", which is no. " + (i + 1) + " in the table...");
        if (_str.toLowerCase().equals(actionName.toLowerCase())) {
            System.out.println("[TEST_DEBUG]  -> action \"" + _str + "\" (" + actionName + ") was found");
            sleep(100);
            tab.clickForEdit(i, 1);
            sleep(100);
            injectKeyBinding(tab, Key, mask);
            if (expectedAlreadyAssigned) {
                if (reassign) {
                    new NbDialogOperator("Conflicting Shortcut Dialog").yes();
                } else {
                    new NbDialogOperator("Conflicting Shortcut Dialog").cancel();
                }
            }
            sleep(100);
            break;
        }
    }
    searchActionName(tmpStr);
    System.out.println("[TEST_DEBUG] ### Reassigning shortcut for " + actionName + " - OK");
    return true;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:35,代码来源:KeyMapOperator.java

示例11: assignAlternativeShortcutToAction

import org.netbeans.jemmy.operators.JTableOperator; //导入方法依赖的package包/类
public boolean assignAlternativeShortcutToAction(String actionName, boolean ctrl, boolean shift, boolean alt, int Key, boolean expectedAlreadyAssigned, boolean reassign) {
    boolean retval = false;
    System.out.println("[TEST_DEBUG]");
    System.out.println("[TEST_DEBUG] ### Assigning alternative shortcut for " + actionName + " - Started");
    int mask = buildKeyModifierMask(ctrl, alt, shift);
    String tmpStr = actionSearchByName().getText();
    searchActionName(actionName);
    JTableOperator tab = actionsTable();
    TableModel tm = tab.getModel();
    String _str;
    System.out.println("[TEST_DEBUG]  Found " + tab.getRowCount() + " actions matching action pattern: " + actionName);
    for (int i = 0; i < tab.getRowCount(); i++) {
        _str = tm.getValueAt(i, 0).toString();
        System.out.println("[TEST_DEBUG]  Examining action " + _str + ", which is no. " + (i + 1) + "in the table...");
        if (_str.toLowerCase().equals(actionName.toLowerCase())) {
            System.out.println("[TEST_DEBUG]  Action " + actionName + "was found");
            JListOperator jli = clickShortcutEllipsisButton(tab, i);
            retval = true;
            try {
                jli.clickOnItem("Add Alternative");
            } catch (Exception e) {
                retval = false;
            }
            sleep(100);
            injectKeyBinding(tab, Key, mask);
            if (expectedAlreadyAssigned) {
                if (reassign) {
                    new NbDialogOperator("Conflicting Shortcut Dialog").yes();
                } else {
                    new NbDialogOperator("Conflicting Shortcut Dialog").cancel();
                }
            }
            sleep(100);
            System.out.println("[TEST_DEBUG] ### Assigning alternative shortcut for " + actionName + " - OK");
            break;
        }
    }
    searchActionName(tmpStr);
    return retval;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:41,代码来源:KeyMapOperator.java

示例12: CheckInstalled

import org.netbeans.jemmy.operators.JTableOperator; //导入方法依赖的package包/类
public void CheckInstalled( )
{
  startTest( );

  // Open
  new JMenuBarOperator(MainWindowOperator.getDefault()).pushMenuNoBlock("Tools|Plugins");

  JDialogOperator jdPlugins = new JDialogOperator( "Plugins" );

  JTabbedPaneOperator jtTabs = new JTabbedPaneOperator( jdPlugins, 0 );
  jtTabs.setSelectedIndex( jtTabs.findPage( "Installed" ) );

  // HERE THE TESTS

  // Click reload and wait results
  JButtonOperator jbReload = new JButtonOperator( jdPlugins, "Reload Catalog" );
  jbReload.push( );
  Sleep( 5000 );
  boolean bRedo = true;
  int iCount = 0;
  while( bRedo )
  {
    try
    {
      Sleep( 1000 );
      new JLabelOperator( jdPlugins, "Checking for updates in " );
      if( 60 <= ++iCount )
        fail( "Reloading is too long." );
    }
    catch( JemmyException ex )
    {
      bRedo = false;
    }
  }

  // Check buttons
  JButtonOperator jbUninstall = new JButtonOperator( jdPlugins, "Uninstall" );

  // Check table
  JTableOperator jtTable = new JTableOperator( jdPlugins, 0 );
  int iOriginalRows = jtTable.getRowCount( );

  for( int i = 0; i < 10; i++ )
  {
    // Check uninstall disabled
    if( jbUninstall.isEnabled( ) )
      fail( "Uninstall button enabled without selection." );
    // Click first column
    jtTable.clickOnCell( i, 0 );
    // Check uninstall enabled
    if( !jbUninstall.isEnabled( ) )
      fail( "Uninstall button disabled with selection." );

    // Check 
      // ToDo

    // Click first column
    jtTable.clickOnCell( i, 0 );
    // Check uninstall disabled
    if( jbUninstall.isEnabled( ) )
      fail( "Uninstall button enabled without selection." );
  }

  // Close by button
  JButtonOperator jbClose = new JButtonOperator( jdPlugins, "Close" );
  jbClose.push( );
  jdPlugins.waitClosed( );

  endTest( );
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:71,代码来源:Autoupdate.java

示例13: CheckAvailablePlugins

import org.netbeans.jemmy.operators.JTableOperator; //导入方法依赖的package包/类
public void CheckAvailablePlugins( )
{
  startTest( );

  // Open
  new JMenuBarOperator(MainWindowOperator.getDefault()).pushMenuNoBlock("Tools|Plugins");

  JDialogOperator jdPlugins = new JDialogOperator( "Plugins" );

  JTabbedPaneOperator jtTabs = new JTabbedPaneOperator( jdPlugins, 0 );
  jtTabs.setSelectedIndex( jtTabs.findPage( "Available Plugins" ) );

  Sleep( 1000 );

  // Check buttons
  JButtonOperator jbReload = new JButtonOperator( jdPlugins, "Reload Catalog" );
  JButtonOperator jbInstall = new JButtonOperator( jdPlugins, "Install" );

  // Check table
  JTableOperator jtTable = new JTableOperator( jdPlugins, 0 );
  int iOriginalRows = jtTable.getRowCount( );

  for( int i = 0; i < iOriginalRows; i++ )
  {
    // Check install disabled
    if( jbInstall.isEnabled( ) )
      fail( "Install button enabled without selection." );
    // Click first column
    jtTable.clickOnCell( i, 0 );
    // Check install enabled
    if( !jbInstall.isEnabled( ) )
      fail( "Install button disabled with selection." );

    // Check 
      // ToDo

    // Click first column
    jtTable.clickOnCell( i, 0 );
    // Check install disabled
    if( jbInstall.isEnabled( ) )
      fail( "Install button enabled without selection." );
  }

  // Close by button
  JButtonOperator jbClose = new JButtonOperator( jdPlugins, "Close" );
  jbClose.push( );
  jdPlugins.waitClosed( );
  endTest( );
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:50,代码来源:Autoupdate.java


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