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


Java JPopupMenuOperator.pushMenuNoBlock方法代码示例

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


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

示例1: testNewSizeOfGap

import org.netbeans.jemmy.operators.JPopupMenuOperator; //导入方法依赖的package包/类
public void testNewSizeOfGap() {
    opDesigner = new FormDesignerOperator(FILE_NAME);
    ComponentInspectorOperator cio = new ComponentInspectorOperator();
    Node inspectorRootNode = new Node(cio.treeComponents(), FRAME_ROOT);
    inspectorRootNode.select();
    inspectorRootNode.expand();
    
    Node buttonNode = new Node(inspectorRootNode, "jButton1 [JButton]");
    buttonNode.callPopup();
    
    JPopupMenuOperator jpmo= new JPopupMenuOperator();
    waitNoEvent(500);
    jpmo.pushMenuNoBlock("Edit Layout Space...");
    waitNoEvent(500);
    
    EditLayoutSpaceOperator elso = new EditLayoutSpaceOperator();
    elso.setSizeOfGapTop("800");
    waitNoEvent(500);

    findInCode(".addContainerGap(800, Short.MAX_VALUE)", opDesigner);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:22,代码来源:GapsTest.java

示例2: testViewsHeapWalker2

import org.netbeans.jemmy.operators.JPopupMenuOperator; //导入方法依赖的package包/类
public void testViewsHeapWalker2() {
    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.classesViewTitle);

    TopComponentOperator tco = new TopComponentOperator(Utilities.classesViewTitle);
    JTableOperator jTableOperator = new JTableOperator(tco);
    JComboBoxOperator filter = new JComboBoxOperator(tco);
    JPopupMenuOperator popup = new JPopupMenuOperator(jTableOperator.callPopupOnCell(0, 0));
    popup.pushMenuNoBlock("Show in Instances View");
    filter.clearText();
    filter.pushKey(KeyEvent.VK_ENTER);
    new EventTool().waitNoEvent(500);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:18,代码来源:ViewsTest.java

示例3: performTomcatServerAction

import org.netbeans.jemmy.operators.JPopupMenuOperator; //导入方法依赖的package包/类
private static Node performTomcatServerAction(String action) {
    Node asNode = getTomcatServerNode();
    asNode.select();
    new EventTool().waitNoEvent(10000);
    String serverIDEName = asNode.getText();
    log("ServerNode name = "+serverIDEName);
    JPopupMenuOperator popup = asNode.callPopup();
    if (popup == null) {
        throw new Error("Cannot get context menu for Tomcat server node ");
    }
    boolean startEnabled = popup.showMenuItem(action).isEnabled();
    if(startEnabled) {
        popup.pushMenuNoBlock(action);
    }
    return asNode;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:17,代码来源:CommonUtilities.java

示例4: performPopup

import org.netbeans.jemmy.operators.JPopupMenuOperator; //导入方法依赖的package包/类
/**
 * performs action through popup menu
 *
 * @param component component to be action performed on
 * @throws UnsupportedOperationException when action does not support popup
 * mode
 */
@Override
public void performPopup(ComponentOperator component) {
    if (popupPath == null) {
        throw new UnsupportedOperationException(getClass().toString() + " does not define popup path");
    }
    // Need to wait here to be more reliable.
    // TBD - It can be removed after issue 23663 is solved.
    new EventTool().waitNoEvent(500);
    component.clickForPopup();
    JPopupMenuOperator popup = new JPopupMenuOperator(component);
    popup.setComparator(getComparator());
    popup.pushMenuNoBlock(popupPath, "|");
    try {
        Thread.sleep(AFTER_ACTION_WAIT_TIME);
    } catch (Exception e) {
        throw new JemmyException("Sleeping interrupted", e);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:26,代码来源:ActionNoBlock.java

示例5: testpopUpDialogInvoke

import org.netbeans.jemmy.operators.JPopupMenuOperator; //导入方法依赖的package包/类
public void testpopUpDialogInvoke() {
    opDesigner = new FormDesignerOperator(FILE_NAME);
    opDesigner.clickForPopup(400, 70);
    JPopupMenuOperator jpmo= new JPopupMenuOperator();
    waitNoEvent(500);
    jpmo.pushMenuNoBlock("Edit Layout Space...");
    waitNoEvent(500);
    EditLayoutSpaceOperator elso = new EditLayoutSpaceOperator();
    
    elso.Ok();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:12,代码来源:GapsTest.java

示例6: testpopUpDialogOnButton

import org.netbeans.jemmy.operators.JPopupMenuOperator; //导入方法依赖的package包/类
public void testpopUpDialogOnButton() {
    opDesigner = new FormDesignerOperator(FILE_NAME);
    
    ComponentInspectorOperator cio = new ComponentInspectorOperator();
    Node inspectorRootNode = new Node(cio.treeComponents(), FRAME_ROOT);
    inspectorRootNode.select();
    inspectorRootNode.expand();
    
    Node buttonNode = new Node(inspectorRootNode, "jButton1 [JButton]");
    buttonNode.callPopup();
    
    JPopupMenuOperator jpmo= new JPopupMenuOperator();
    waitNoEvent(500);
    jpmo.pushMenuNoBlock("Edit Layout Space...");
    waitNoEvent(500);
    
    
    
    EditLayoutSpaceOperator elso = new EditLayoutSpaceOperator();
    
    elso.verify();
    
    assertEquals("default small", (String) elso.cbBottom().getItemAt(0));
    assertEquals("default medium", (String) elso.cbBottom().getItemAt(1));
    assertEquals("default large", (String) elso.cbBottom().getItemAt(2));
    
    assertEquals("default", (String) elso.cbLeft().getItemAt(0));
    elso.Cancel();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:30,代码来源:GapsTest.java

示例7: performPopupActionNoBlock

import org.netbeans.jemmy.operators.JPopupMenuOperator; //导入方法依赖的package包/类
/**
 * Performs popup action on this widget and no block further execution.
 *
 * @param popupPath path of popup menu item (e.g. 'Go|Next')
 */
public void performPopupActionNoBlock(String popupPath) {
    Point center = getCenter();
    getViewOperator().clickForPopup(center.x, center.y);
    JPopupMenuOperator popupOper = new JPopupMenuOperator();
    popupOper.setComparator(getComparator());
    popupOper.pushMenuNoBlock(popupPath, "|", getComparator());
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:13,代码来源:WidgetOperator.java

示例8: AddItInternal

import org.netbeans.jemmy.operators.JPopupMenuOperator; //导入方法依赖的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

示例9: performPopupNoBlock

import org.netbeans.jemmy.operators.JPopupMenuOperator; //导入方法依赖的package包/类
/** Performs popup menu on specified row and no block further execution.
 * @param row row number to be selected (starts from 0)
 * @param popupPath popup menu path
 */
public void performPopupNoBlock(int row, String popupPath) {
    tabFiles().selectCell(row, 0);
    JPopupMenuOperator popup = new JPopupMenuOperator(tabFiles().callPopupOnCell(row, 0));
    popup.pushMenuNoBlock(popupPath);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:10,代码来源:VersioningOperator.java

示例10: pushFindPopup

import org.netbeans.jemmy.operators.JPopupMenuOperator; //导入方法依赖的package包/类
/**
 * Pushes Tools|Create Junit tests over a node
 * @param n the node where the action will be invoked
 */
public static void pushFindPopup(Node n) {
    JPopupMenuOperator jpmo = n.callPopup();
    jpmo.pushMenuNoBlock(Bundle.getString(UTILITIES_BUNDLE,
            "TEXT_TITLE_CUSTOMIZE"));
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:10,代码来源:Utilities.java

示例11: performPopupNoBlock

import org.netbeans.jemmy.operators.JPopupMenuOperator; //导入方法依赖的package包/类
/**
 * Performs popup menu on specified row and no block further execution.
 *
 * @param row row number to be selected (starts from 0)
 * @param popupPath popup menu path
 */
public void performPopupNoBlock(int row, String popupPath) {
    tabFiles().selectCell(row, 0);
    JPopupMenuOperator popup = new JPopupMenuOperator(tabFiles().callPopupOnCell(row, 0));
    popup.pushMenuNoBlock(popupPath);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:12,代码来源:VersioningOperator.java


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