當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。