SWT/Jface TreeViewer、Tree如何实现双击事件
如以下代码所示:
TreeViewer的话 就 getTree() 就可以了
tree直接使用:
tree.addListener (SWT.MouseDoubleClick, new Listener () {
public void handleEvent (Event event) {
Point point = new Point (event.x, event.y);
TreeItem item = tree.getItem (point);
if (item != null) {
System.out.println ("~~~~~~~~~~~~~~~~~~·This is test: " + item);
}
}
});
补充:综合编程 , 其他综合 ,