保存dialog的位置和大小

/*
	@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方法就行了。

猜你喜欢

转载自xmind.iteye.com/blog/2241579