public void testRemoveNodeInOutlineView () throws InterruptedException {
StringKeys children = new StringKeys (true);
children.doSetKeys (new String [] {"1", "3", "2"});
Node root = new TestNode (children, "root");
comp = new OutlineViewComponent (root);
ETableColumnModel etcm = (ETableColumnModel) comp.getOutlineView ().getOutline ().getColumnModel ();
ETableColumn etc = (ETableColumn) etcm.getColumn (0); // tree column
etcm.setColumnSorted (etc, true, 1); // ascending order
TreeNode ta = Visualizer.findVisualizer(root);
DialogDescriptor dd = new DialogDescriptor (comp, "", false, null);
Dialog d = DialogDisplayer.getDefault ().createDialog (dd);
d.setVisible (true);
Thread.sleep (1000);
((StringKeys) root.getChildren ()).doSetKeys (new String [] {"1", "2"});
Thread.sleep (1000);
assertEquals ("Node on 0nd position is '1'", "1", ta.getChildAt (0).toString ());
assertEquals ("Node on 1st position is '2'", "2", ta.getChildAt (1).toString ());
d.setVisible (false);
}
OutlineView152857Test.java 文件源码
java
阅读 41
收藏 0
点赞 0
评论 0
项目:incubator-netbeans
作者:
评论列表
文章目录