1、刷新页面,返回登录框(设置按钮加监听):
button.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
JSExecutor.executeJS("location.reload();");
}
});
button.setText("Logout");
2、选择table,已选择的table立即消失:
table.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
if(e.item!=null){
table_4.deselectAll();
table_5.deselectAll();
}
}
});
3、点击按钮,使用JSExecutor打开指定的页面:
caseButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
JSExecutor.executeJS("window.open('https://fred.netgear.com/');");
}
});
4、点击table中的某一行,显示该行的数据的详细信息:
table.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
String str= table.getSelection()[0].getText(2);//获得第3个字段的数据
table.setToolTipText(str);
}
});
5、双击table中的某一行,显示该行的详细信息
String str0=table.getSelection()[0].getText(0); //取值
DashBoard_DetailsDlg dlg=new DashBoard_DetailsDlg(compo.getShell(),str0);//以对话框的形式展示
dlg.open();