SettingDialogManager.getInstance().setConfigDlg(this);
- SettingDialogOptionPage settingPage = new SettingDialogOptionPage(
+ optionPage = new SettingDialogOptionPage(
tabView.getContentComposite(), SWT.NONE);
- tabView.addView(settingPage, false);
+ tabView.addView(optionPage, false);
- DABaseComposite binarySettings = new SettingDialogBinarySettingsPage(
- tabView.getContentComposite(), SWT.NONE);
- tabView.addView(binarySettings, false);
+// comment : HIDDEN BINARY SETTING PAGE
+// DABaseComposite binarySettings = new SettingDialogBinarySettingsPage(
+// tabView.getContentComposite(), SWT.NONE);
+// tabView.addView(binarySettings, false);
// button composite
buttonContentsComp = new Composite(shell, SWT.NONE);
e.gc.drawLine(0, 1, rect.width-1, 1);
}
});
-
- // comment : HIDDEN BINARY SETTING PAGE
+
+ optionPage.addListener(SWT.Hide, new Listener() {
+
+ @Override
+ public void handleEvent(Event event) {
+ Logger.debug("options page hide");
+ if (!optionPage.isValidInputValue()) {
+ doWarningMessage();
+ optionPage.revertInputValue();
+ }
+ }
+ });
+
- // binarySettings tab is selected, the close button will be shown.
- // ok and cancel button is hidden
- binarySettings.addListener(SWT.Show, new Listener() {
-
- @Override
- public void handleEvent(Event event) {
- Logger.debug("binary settings show");
- cancelButton.setText(WidgetLabels.CLOSE);
- FormData data = (FormData) okButton.getLayoutData();
- data.width = 0;
-
- buttonContentsComp.layout();
- }
- });
-
- binarySettings.addListener(SWT.Hide, new Listener() {
-
- @Override
- public void handleEvent(Event event) {
- Logger.debug("binary settings hide");
- cancelButton.setText(WidgetLabels.CANCEL);
- FormData data = (FormData) okButton.getLayoutData();
- data.width = 100;
-
- buttonContentsComp.layout();
- }
- });
++//comment : HIDDEN BINARY SETTING PAGE
++// // binarySettings tab is selected, the close button will be shown.
++// // ok and cancel button is hidden
+// binarySettings.addListener(SWT.Show, new Listener() {
+//
+// @Override
+// public void handleEvent(Event event) {
- // FormData data = (FormData) applyButton.getLayoutData();
- // data.width = 0;
- //
- // data = (FormData) revertButton.getLayoutData();
++// Logger.debug("binary settings show");
++// cancelButton.setText(WidgetLabels.CLOSE);
++// FormData data = (FormData) okButton.getLayoutData();
+// data.width = 0;
+//
+// buttonContentsComp.layout();
+// }
+// });
+//
+// binarySettings.addListener(SWT.Hide, new Listener() {
+//
+// @Override
+// public void handleEvent(Event event) {
- // FormData data = (FormData) applyButton.getLayoutData();
- // data.width = 100;
- //
- // data = (FormData) revertButton.getLayoutData();
++// Logger.debug("binary settings hide");
++// cancelButton.setText(WidgetLabels.CANCEL);
++// FormData data = (FormData) okButton.getLayoutData();
+// data.width = 100;
+//
+// buttonContentsComp.layout();
+// }
+// });
-
- closeButton = new DAButton(buttonContentsComp, SWT.NONE);
- closeButton.addClickListener(closeButtonListener);
- closeButton.setText(WidgetLabels.CLOSE);
- closeButton.setButtonFont(FontResources.DIALOG_BUTTON_FONT);
+ cancelButton = new DAButton(buttonContentsComp, SWT.NONE);
+ cancelButton.addClickListener(cancelButtonListener);
+ cancelButton.setText(WidgetLabels.CANCEL);
+ cancelButton.setButtonFont(FontResources.DIALOG_BUTTON_FONT);
FormData buttonData = new FormData();
buttonData.right = new FormAttachment(100, -9);
buttonData.top = new FormAttachment(0, 11);