eclipse e4。
双击jface表中的一行,我希望将该行的数据视为对话框。
现有代码
orgTable.addDoubleClickListener(new IDoubleClickListener() {
@Override
public void doubleClick(DoubleClickEvent event) {
System.out.println("Double CLikc works");
}
});
答案 0 :(得分:0)
OrgTable.addDoubleClickListener(new IDoubleClickListener() {
@Override
public void doubleClick(DoubleClickEvent event) {
System.out.println("Double CLikc works");
IStructuredSelection sel = (IStructuredSelection) event.getSelection();
OrgDetails org = (OrgDetails) sel.getFirstElement();
if(org != null){
System.out.println("Double-click on : "+ org.getOrgName()+ " " + org.getTin());
}
System.out.println(orgTable.getElementAt());
}
});