/*
@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方法就行了。
本文介绍如何在Eclipse的SWT和JFace中通过覆盖getDialogBoundsSettings方法来设置对话框的边界。这种方法可以应用于各种对话框,确保它们的位置和大小能够被正确保存和恢复。
875

被折叠的 条评论
为什么被折叠?



