重寫ApplicationWorkbenchWindowAdvisor類的postWindowOpen方法
public void postWindowOpen() {
//窗口居中
Shell shell = getWindowConfigurer().getWindow().getShell();
Rectangle screenSize = Display.getDefault().getClientArea();
Rectangle frameSize = shell.getBounds();
shell.setLocation((screenSize.width - frameSize.width)/2, (screenSize.height - frameSize.height)/2);
}
posted on 2008-12-05 23:40
Ke 閱讀(389)
評論(0) 編輯 收藏 所屬分類:
eclipse RCP