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


Java JTableOperator.clickOnCell方法代码示例

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


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

示例1: testInvokeWindow

import org.netbeans.jemmy.operators.JTableOperator; //导入方法依赖的package包/类
public void testInvokeWindow() {
    new Action("Window|Other|Application Actions",null).perform();  // NOI18N
    waitAMoment();

    // invoke edit dialog for first action in table
    JTableOperator tableOp = new JTableOperator(getTopComponent());
    tableOp.clickOnCell(1, 1);   // select first row in table

    // invoke edit dialog
    new JButtonOperator(getTopComponent(), "Edit Action").pushNoBlock();  // NOI18N
    waitAMoment();

    
    // closing edit dialog
    new JButtonOperator(new NbDialogOperator("Edit Action Properties"), "OK").pushNoBlock();  // NOI18N
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:17,代码来源:ApplicationActionsTest.java

示例2: selectPlugins

import org.netbeans.jemmy.operators.JTableOperator; //导入方法依赖的package包/类
/** 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);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:16,代码来源:PluginsOperator.java

示例3: 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

示例4: 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.clickOnCell方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。