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


Java JTreeOperator.selectPath方法代码示例

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


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

示例1: testAddLibrary

import org.netbeans.jemmy.operators.JTreeOperator; //导入方法依赖的package包/类
public void testAddLibrary() {
    // useless method while executing this test internally
    // but there is a missing library while executing this test on external IDE
    ProjectRootNode prn = new ProjectsTabOperator().getProjectRootNode(TEST_PROJECT_NAME);
    Node libNode = new Node(prn, "Test Libraries");
    new ActionNoBlock(null,"Add Library").perform(libNode);
    NbDialogOperator libDialog = new NbDialogOperator("Add Library");
    JTreeOperator treeOp = new JTreeOperator(libDialog);
    TreePath tp = treeOp.findPath("Global Libraries|Junit");
    treeOp.selectPath(tp);
    new JButtonOperator(libDialog, "Add Library").push();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:13,代码来源:CreateProjectTest.java

示例2: testAddLibrary

import org.netbeans.jemmy.operators.JTreeOperator; //导入方法依赖的package包/类
public void testAddLibrary() {
    // useless method while executing this test internally
    // but there is a missing libraty while executing this test on external IDE
    ProjectRootNode prn = new ProjectsTabOperator().getProjectRootNode(TEST_PROJECT_NAME);
    Node libNode = new Node(prn, "Test Libraries");
    new ActionNoBlock(null,"Add Library").perform(libNode);
    NbDialogOperator libDialog = new NbDialogOperator("Add Library");
    JTreeOperator treeOp = new JTreeOperator(libDialog);
    TreePath tp = treeOp.findPath("Global Libraries|Junit");
    treeOp.selectPath(tp);
    new JButtonOperator(libDialog, "Add Library").push();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:13,代码来源:CreateProjectTest.java

示例3: addApplicationServer

import org.netbeans.jemmy.operators.JTreeOperator; //导入方法依赖的package包/类
public void addApplicationServer() {
        // FIXME: Make a call of the following method
//        Utilities.addApplicationServer();
       String appServerPath = System.getProperty("com.sun.aas.installRoot");
        
        if (appServerPath == null) {
            throw new Error("Can't add application server. com.sun.aas.installRoot property is not set.");
        }

        String addServerMenuItem = Bundle.getStringTrimmed("org.netbeans.modules.j2ee.deployment.impl.ui.actions.Bundle", "LBL_Add_Server_Instance"); // Add Server...
        String addServerInstanceDialogTitle = Bundle.getStringTrimmed("org.netbeans.modules.j2ee.deployment.impl.ui.wizard.Bundle", "LBL_ASIW_Title"); //"Add Server Instance"
        String glassFishV2ListItem = Bundle.getStringTrimmed("org.netbeans.modules.j2ee.sun.ide.Bundle", "LBL_GlassFishV2");
        String nextButtonCaption = Bundle.getStringTrimmed("org.openide.Bundle", "CTL_NEXT");
        String finishButtonCaption = Bundle.getStringTrimmed("org.openide.Bundle", "CTL_FINISH");

        RuntimeTabOperator rto = RuntimeTabOperator.invoke();        
        JTreeOperator runtimeTree = rto.tree();
        
        long oldTimeout = runtimeTree.getTimeouts().getTimeout("JTreeOperator.WaitNextNodeTimeout");
        runtimeTree.getTimeouts().setTimeout("JTreeOperator.WaitNextNodeTimeout", 60000);
        
        TreePath path = runtimeTree.findPath("Servers");
        runtimeTree.selectPath(path);
        
        new JPopupMenuOperator(runtimeTree.callPopupOnPath(path)).pushMenuNoBlock(addServerMenuItem);
       
        NbDialogOperator addServerInstanceDialog = new NbDialogOperator(addServerInstanceDialogTitle);
        
        new JListOperator(addServerInstanceDialog, 1).selectItem(glassFishV2ListItem);
        
        new JButtonOperator(addServerInstanceDialog,nextButtonCaption).push();
        
        new JTextFieldOperator(addServerInstanceDialog).enterText(appServerPath);
        
        new JButtonOperator(addServerInstanceDialog,finishButtonCaption).push();
        
        runtimeTree.getTimeouts().setTimeout("JTreeOperator.WaitNextNodeTimeout", oldTimeout);
    }
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:39,代码来源:PrepareIDEForEnterpriseComplexMeasurements.java

示例4: AddItInternal

import org.netbeans.jemmy.operators.JTreeOperator; //导入方法依赖的package包/类
protected void AddItInternal(
    int iColumn,
    String sItName,
    String sMenuToAdd,
    String sRadioName,
    String sTypePath,
    String sAddedName
  )
{
  // Swicth to Schema view
  new JMenuBarOperator(MainWindowOperator.getDefault()).pushMenu("View|Editors|Schema");

  // Select first column, Attributes
  SchemaMultiView opMultiView = new SchemaMultiView( JAXB_PACKAGE_NAME + ".xsd" );
  opMultiView.switchToSchema( );
  opMultiView.switchToSchemaColumns( );
  JListOperator opList = opMultiView.getColumnListOperator( iColumn );
  opList.selectItem( sItName );

  // Right click on Reference Schemas
  int iIndex = opList.findItemIndex( sItName );
  Point pt = opList.getClickPoint( iIndex );
  opList.clickForPopup( pt.x, pt.y );

  // Click Add Attribute...
  JPopupMenuOperator popup = new JPopupMenuOperator( );
  popup.pushMenuNoBlock( sMenuToAdd + "..." );

  // Get dialog
  JDialogOperator jadd = new JDialogOperator( sMenuToAdd.replace( "|", " " ) );

  // Set unique name
  JTextFieldOperator txt = new JTextFieldOperator( jadd, 0 );
  txt.setText( sAddedName );

  // Use existing definition
  if( null != sRadioName )
  {
    JRadioButtonOperator jex = new JRadioButtonOperator( jadd, sRadioName );
    jex.setSelected( true );
  }

  // Get tree
  if( null != sTypePath )
  {
    JTreeOperator jtree = new JTreeOperator( jadd, 0 );
    TreePath path = jtree.findPath( sTypePath );
  
    jtree.selectPath( path );
    jtree.clickOnPath( path );
  }

  // Close
  JButtonOperator jOK = new JButtonOperator( jadd, "OK" ); // TODO : OK
  jOK.push( );
  jadd.waitClosed( );

  // Check attribute was added successfully
  opList = opMultiView.getColumnListOperator( iColumn + 1 );
  iIndex = opList.findItemIndex( sAddedName );
  if( -1 == iIndex )
    fail( "It was not added." );

}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:65,代码来源:AcceptanceTestCaseXSD.java

示例5: selectNode

import org.netbeans.jemmy.operators.JTreeOperator; //导入方法依赖的package包/类
public void selectNode(String nodeName) {
JTreeOperator tree = getTreeOperator();
tree.selectPath(BeansTestCase.getTreePath(tree, nodeName, defaultConverter));
   }
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:5,代码来源:BeanInfoOperator.java


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