public void testGlobalActionDoesNotSurviveFocusChange() throws Exception {
myGlobalAction.setEnabled( true );
final org.openide.nodes.Node n = new org.openide.nodes.AbstractNode (org.openide.nodes.Children.LEAF);
tc.setActivatedNodes(new Node[0]);
KeyEvent e = new KeyEvent( tc, KeyEvent.KEY_TYPED, 0, 0, 0 );
assertTrue( tc.processKeyBinding( KEY_STROKE, e, JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, true ) );
assertTrue( MyContextAwareAction.globalActionWasPerformed );
assertFalse( MyContextAwareAction.contextActionWasPerformed );
}
ContextAwareActionInTopComponentTest.java 文件源码
java
阅读 36
收藏 0
点赞 0
评论 0
项目:incubator-netbeans
作者:
评论列表
文章目录