ITeye博客

保存dialog的位置和大小

xmind · 2015-09-08 11:04 · Eclipse 插件 · 编程语言 · Markdown

/*
	@Override
	protected IDialogSettings getDialogBoundsSettings() {
		IDialogSettings dialogSettings = Activator.getDefault().getDialogSettings();
		String dialogKey = EventSearchDialog.class.getCanonicalName();
		IDialogSettings boundsSettings = dialogSettings.getSection(dialogKey);
		if (boundsSettings == null) {
			boundsSettings = dialogSettings.addNewSection(dialogKey);
		}
		return boundsSettings;
	}
*/

 

不管使用JFace的dialog,或者SWT的dialog。覆盖getDialogBoundsSettings方法就行了。

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。