public class PostWindowOpenCallback implements IExecutionCallback {
@Override
public void execute() {
- if (!SettingDataManager.getInstance().isShowInitial()) {
+// HIDDEN SETTING WIDGET (CHECKBOX, BUTTON)
+// if (!SettingDataManager.getInstance().isShowInitial()) {
final Shell shell = WorkbenchUtil.getWorkbenchWindow().getShell();
WelcomeDialog dialog = new WelcomeDialog(shell); // FIXME
Logger.performance("TEST", "DA Start", "Welcome Dialog");
dialog.open();
- }
+// }
}
public void execute(String[] msg) {
templatePage.createTemplateTitleComposite();
templatePage.createTemplateDescriptionComposite();
- // update setting dialog button
- SettingDialogManager.getInstance().updateSaveButtonStatus(null);
+// HIDDEN SETTING WIDGET (CHECKBOX, BUTTON)
+// // update setting dialog button
+// SettingDialogManager.getInstance().updateSaveButtonStatus(null);
}
shell.dispose(); // close dialog
}
public class SettingDialog extends DAMessageBox {
private static boolean opened = false;
- private DACustomButton applyButton = null;
+ private DACustomButton okButton = null;
+ private DACustomButton cancelButton = null;
+
+// HIDDEN SETTING WIDGET (CHECKBOX, BUTTON)
+// private DACustomButton applyButton = null;
// private DACustomButton revertButton = null;
- private DACustomButton closeButton = null;
+// private DACustomButton closeButton = null;
private SettingDialogTemplatePage templatesPage = null;
SettingDataManager.getInstance(); // read setting information file
}
- private DACustomButtonClickEventListener applyButtonListener = new DACustomButtonClickEventListener() {
+ private DACustomButtonClickEventListener okButtonListener = new DACustomButtonClickEventListener() {
@Override
public void handleClickEvent(DACustomButton button) {
doApply();
- applicableButteon();
- }
- };
- private DACustomButtonClickEventListener revertButtonListener = new DACustomButtonClickEventListener() {
-
- @Override
- public void handleClickEvent(DACustomButton button) {
- doRevert();
- applicableButteon();
+ doRun();
+ shell.close(); // close dialog
}
};
- private DACustomButtonClickEventListener closeButtonListener = new DACustomButtonClickEventListener() {
+ private DACustomButtonClickEventListener cancelButtonListener = new DACustomButtonClickEventListener() {
@Override
public void handleClickEvent(DACustomButton button) {
+ doRevert();
doRun();
- shell.dispose(); // close dialog
+ shell.close(); // close dialog
}
};
-
+
+// HIDDEN SETTING WIDGET (CHECKBOX, BUTTON)
+// private DACustomButtonClickEventListener applyButtonListener = new DACustomButtonClickEventListener() {
+//
+// @Override
+// public void handleClickEvent(DACustomButton button) {
+// doApply();
+// applicableButteon();
+// }
+// };
+// private DACustomButtonClickEventListener revertButtonListener = new DACustomButtonClickEventListener() {
+//
+// @Override
+// public void handleClickEvent(DACustomButton button) {
+// doRevert();
+// applicableButteon();
+// }
+// };
+//
+// private DACustomButtonClickEventListener closeButtonListener = new DACustomButtonClickEventListener() {
+//
+// @Override
+// public void handleClickEvent(DACustomButton button) {
+// doRun();
+// shell.dispose(); // close dialog
+// }
+// };
+
private void doApply() {
Composite selectedComposite = tabView.getTopComposite();
- if (!(selectedComposite instanceof SettingDialogBinarySettingsPage)) {
- // add & remove tab view page
- SettingDialogManager.getInstance().updateTabViewPage();
-
- // add & remove (timeline) chart
- SettingDialogManager.getInstance().updateChartList();
-
- // write setting data
- SettingDataManager.getInstance().applySettingData();
+ if (!(selectedComposite instanceof SettingDialogBinarySettingsPage)) {
+ if (DACommunicator.isRunning() == false) {
+ // add & remove tab view page
+ SettingDialogManager.getInstance().updateTabViewPage();
+
+ // add & remove (timeline) chart
+ SettingDialogManager.getInstance().updateChartList();
+
+ // write setting data
+ SettingDataManager.getInstance().applySettingData();
+ }
} else {
// binary setting page
SettingDialogBinarySettingsPage page = (SettingDialogBinarySettingsPage) selectedComposite;
if (!(selectedComposite instanceof SettingDialogBinarySettingsPage)) {
// rollback setting data
SettingDataManager.getInstance().revertSettingData();
-
- // update template view
- templatesPage.createTemplateTitleComposite();
- templatesPage.createTemplateDescriptionComposite();
- templatesPage.createTargetComposite();
+
+// HIDDEN SETTING WIDGET (CHECKBOX, BUTTON)
+// // update template view
+// templatesPage.createTemplateTitleComposite();
+// templatesPage.createTemplateDescriptionComposite();
+// templatesPage.createTargetComposite();
}
}
// });
- 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);
buttonData.width = 100;
buttonData.height = 28;
- closeButton.setLayoutData(buttonData);
+ cancelButton.setLayoutData(buttonData);
+
+ okButton = new DAButton(buttonContentsComp, SWT.NONE);
+ okButton.addClickListener(okButtonListener);
+ okButton.setText(WidgetLabels.OK);
+ okButton.setButtonFont(FontResources.DIALOG_BUTTON_FONT);
+ buttonData = new FormData();
+ buttonData.right = new FormAttachment(cancelButton, -8);
+ buttonData.top = new FormAttachment(0, 11);
+ buttonData.width = 100;
+ buttonData.height = 28;
+ okButton.setLayoutData(buttonData);
+
+// HIDDEN SETTING WIDGET (CHECKBOX, BUTTON)
+// closeButton = new DAButton(buttonContentsComp, SWT.NONE);
+// closeButton.addClickListener(closeButtonListener);
+// closeButton.setText(WidgetLabels.CLOSE);
+// closeButton.setButtonFont(FontResources.DIALOG_BUTTON_FONT);
+// FormData buttonData = new FormData();
+// buttonData.right = new FormAttachment(100, -9);
+// buttonData.top = new FormAttachment(0, 11);
+// buttonData.width = 100;
+// buttonData.height = 28;
+// closeButton.setLayoutData(buttonData);
+//
// revertButton = new DAButton(buttonContentsComp, SWT.NONE);
// revertButton.addClickListener(revertButtonListener);
// revertButton.setText(WidgetLabels.REVERT);
// buttonData.width = 100;
// buttonData.height = 28;
// revertButton.setLayoutData(buttonData);
-
- applyButton = new DAButton(buttonContentsComp, SWT.NONE);
- applyButton.addClickListener(applyButtonListener);
- applyButton.setText(WidgetLabels.APPLY);
- applyButton.setButtonFont(FontResources.DIALOG_BUTTON_FONT);
- buttonData = new FormData();
+//
+// applyButton = new DAButton(buttonContentsComp, SWT.NONE);
+// applyButton.addClickListener(applyButtonListener);
+// applyButton.setText(WidgetLabels.APPLY);
+// applyButton.setButtonFont(FontResources.DIALOG_BUTTON_FONT);
+// buttonData = new FormData();
// buttonData.right = new FormAttachment(revertButton, -8);
- buttonData.right = new FormAttachment(closeButton, -8);
- buttonData.top = new FormAttachment(0, 11);
- buttonData.width = 100;
- buttonData.height = 28;
- applyButton.setLayoutData(buttonData);
-
- applicableButteon();
+// buttonData.top = new FormAttachment(0, 11);
+// buttonData.width = 100;
+// buttonData.height = 28;
+// applyButton.setLayoutData(buttonData);
+//
+//
+// applicableButteon();
+
shell.addDisposeListener(new DisposeListener() {
@Override
shell.open();
return true;
}
-
- public void applicableButteon() {
- applyButton.setButtonEnabled(false);
+
+// HIDDEN SETTING WIDGET (CHECKBOX, BUTTON)
+// public void applicableButteon() {
+// applyButton.setButtonEnabled(false);
// revertButton.setButtonEnabled(false);
- closeButton.setButtonEnabled(true);
- }
-
- public void editableButteon() {
- if (DACommunicator.isRunning() == false) {
- applyButton.setButtonEnabled(true);
+// closeButton.setButtonEnabled(true);
+// }
+//
+// public void editableButteon() {
+// if (DACommunicator.isRunning() == false) {
+// applyButton.setButtonEnabled(true);
// revertButton.setButtonEnabled(true);
- closeButton.setButtonEnabled(false);
- }
- }
+// closeButton.setButtonEnabled(false);
+// }
+// }
}
}
}
- public void updateSaveButtonStatus(Boolean enable) {
- // change button status
- if (SettingDataManager.getInstance().changedFeatures() == true) {
- if (getConfigDlg() instanceof SettingDialog) {
- SettingDialog dlg = (SettingDialog) getConfigDlg();
- dlg.editableButteon();
- } else {
- WelcomeDialog dlg = (WelcomeDialog) getConfigDlg();
- dlg.editableButteon();
- }
- } else {
- if (getConfigDlg() instanceof SettingDialog) {
- SettingDialog dlg = (SettingDialog) getConfigDlg();
- dlg.applicableButteon();
- } else {
- WelcomeDialog dlg = (WelcomeDialog) getConfigDlg();
- dlg.applicableButteon();
- }
- }
- }
+// HIDDEN SETTING WIDGET (CHECKBOX, BUTTON)
+// public void updateSaveButtonStatus(Boolean enable) {
+// // change button status
+// if (SettingDataManager.getInstance().changedFeatures() == true) {
+// if (getConfigDlg() instanceof SettingDialog) {
+// SettingDialog dlg = (SettingDialog) getConfigDlg();
+// dlg.editableButteon();
+// } else {
+// WelcomeDialog dlg = (WelcomeDialog) getConfigDlg();
+// dlg.editableButteon();
+// }
+// } else {
+// if (getConfigDlg() instanceof SettingDialog) {
+// SettingDialog dlg = (SettingDialog) getConfigDlg();
+// dlg.applicableButteon();
+// } else {
+// WelcomeDialog dlg = (WelcomeDialog) getConfigDlg();
+// dlg.applicableButteon();
+// }
+// }
+// }
public void setFeaturesValueFromTableItemsList(Grid table) {
TargetData target = SettingDataManager.getInstance().getTarget(null);
public static final String ID = SettingDialogOptionPage.class
.getName();
- private DACheckBox showInitialCheckBox = null;
+// HIDDEN SETTING WIDGET (CHECKBOX, BUTTON)
+// private DACheckBox showInitialCheckBox = null;
private DACheckBox autoStopCheckBox = null;
public SettingDialogOptionPage(Composite parent, int style) {
data.left = new FormAttachment(0, 8);
settingLabel.setLayoutData(data);
- // SHOW_INITIAL_FEATURE_SETTING
- showInitialCheckBox = new DACheckBox(this, SWT.NONE);
- data = new FormData();
- data.top = new FormAttachment(settingLabel, 15);
- data.left = new FormAttachment(0, 22);
- data.height = 20;
- data.width = 20;
- showInitialCheckBox.setLayoutData(data);
- showInitialCheckBox.setForeground(ColorResources.BLACK);
- showInitialCheckBox.setBackground(ColorResources.CONFIGURATION_TABLE_COVER_BACKGROUND_COLOR);
- showInitialCheckBox.setText(ConfigureLabels.SETTING_OPTION_SHOW_INITIAL);
- showInitialCheckBox.addSelectionListener(showInitiaRadioButtonListener);
- showInitialCheckBox.setChecked(SettingDataManager.getInstance().isShowInitial());
-
- Label showInitalLabel = new Label(this, SWT.TRANSPARENT);
- showInitalLabel.setText(ConfigureLabels.SETTING_OPTION_SHOW_INITIAL);
- showInitalLabel.setBackground(ColorResources.CONFIGURATION_TABLE_COVER_BACKGROUND_COLOR);
- showInitalLabel.setForeground(ColorResources.BLACK);
- showInitalLabel.setFont(FontResources.CONFIGURATION_TABLE_TITLE_FONT);
- data = new FormData();
- data.top = new FormAttachment(settingLabel, 17);
- data.left = new FormAttachment(0, 42);
- showInitalLabel.setLayoutData(data);
+// HIDDEN SETTING WIDGET (CHECKBOX, BUTTON)
+// showInitialCheckBox = new DACheckBox(this, SWT.NONE);
+// data = new FormData();
+// data.top = new FormAttachment(settingLabel, 15);
+// data.left = new FormAttachment(0, 22);
+// data.height = 20;
+// data.width = 20;
+// showInitialCheckBox.setLayoutData(data);
+// showInitialCheckBox.setForeground(ColorResources.BLACK);
+// showInitialCheckBox.setBackground(ColorResources.CONFIGURATION_TABLE_COVER_BACKGROUND_COLOR);
+// showInitialCheckBox.setText(ConfigureLabels.SETTING_OPTION_SHOW_INITIAL);
+// showInitialCheckBox.addSelectionListener(showInitiaRadioButtonListener);
+// showInitialCheckBox.setChecked(SettingDataManager.getInstance().isShowInitial());
+//
+// Label showInitalLabel = new Label(this, SWT.TRANSPARENT);
+// showInitalLabel.setText(ConfigureLabels.SETTING_OPTION_SHOW_INITIAL);
+// showInitalLabel.setBackground(ColorResources.CONFIGURATION_TABLE_COVER_BACKGROUND_COLOR);
+// showInitalLabel.setForeground(ColorResources.BLACK);
+// showInitalLabel.setFont(FontResources.CONFIGURATION_TABLE_TITLE_FONT);
+// data = new FormData();
+// data.top = new FormAttachment(settingLabel, 17);
+// data.left = new FormAttachment(0, 42);
+// showInitalLabel.setLayoutData(data);
// SHOW_INITIAL_FEATURE_SETTING
autoStopCheckBox = new DACheckBox(this, SWT.NONE);
data = new FormData();
- data.top = new FormAttachment(settingLabel, 42);
+// HIDDEN SETTING WIDGET (CHECKBOX, BUTTON)
+// data.top = new FormAttachment(settingLabel, 42);
+ data.top = new FormAttachment(settingLabel, 15);
data.left = new FormAttachment(0, 22);
- data.height = 20; // 20
+ data.height = 20;
data.width = 20;
autoStopCheckBox.setLayoutData(data);
autoStopCheckBox.setForeground(ColorResources.BLACK);
autoStopLabel.setForeground(ColorResources.BLACK);
autoStopLabel.setFont(FontResources.CONFIGURATION_TABLE_TITLE_FONT);
data = new FormData();
- data.top = new FormAttachment(settingLabel, 44);
+// HIDDEN SETTING WIDGET (CHECKBOX, BUTTON)
+// data.top = new FormAttachment(settingLabel, 44);
+ data.top = new FormAttachment(settingLabel, 15);
data.left = new FormAttachment(0, 42);
autoStopLabel.setLayoutData(data);
}
- private DACheckboxSelectionListener showInitiaRadioButtonListener = new DACheckboxSelectionListener() {
- @Override
- public void handleSelectionEvent(DACheckBox checkbox) {
- if (SettingDataManager.getInstance().isShowInitial()) {
- SettingDataManager.getInstance().setShowInitial(false);
- showInitialCheckBox.setChecked(false);
- } else {
- SettingDataManager.getInstance().setShowInitial(true);
- showInitialCheckBox.setChecked(true);
- }
-
- // change button status
- SettingDialogManager.getInstance().updateSaveButtonStatus(null);
- }
- };
+// HIDDEN SETTING WIDGET (CHECKBOX, BUTTON)
+// private DACheckboxSelectionListener showInitiaRadioButtonListener = new DACheckboxSelectionListener() {
+// @Override
+// public void handleSelectionEvent(DACheckBox checkbox) {
+// if (SettingDataManager.getInstance().isShowInitial()) {
+// SettingDataManager.getInstance().setShowInitial(false);
+// showInitialCheckBox.setChecked(false);
+// } else {
+// SettingDataManager.getInstance().setShowInitial(true);
+// showInitialCheckBox.setChecked(true);
+// }
+//
+// // change button status
+// SettingDialogManager.getInstance().updateSaveButtonStatus(null);
+// }
+// };
private DACheckboxSelectionListener autoStopRadioButtonListener = new DACheckboxSelectionListener() {
@Override
SettingDataManager.getInstance().setAutoStop(true);
autoStopCheckBox.setChecked(true);
}
-
- // change button status
- SettingDialogManager.getInstance().updateSaveButtonStatus(null);
+// HIDDEN SETTING WIDGET (CHECKBOX, BUTTON)
+// // change button status
+// SettingDialogManager.getInstance().updateSaveButtonStatus(null);
}
};
}
\ No newline at end of file
Rectangle r = new Rectangle(0, 0, rect.width - 1, rect.height - 1);
e.gc.setForeground(ColorResources.SETTING_STROKE);
e.gc.drawRectangle(r);
- e.gc.drawLine(0, 22, rect.width-1, 22);
+ e.gc.drawLine(0, 22, rect.width-1, 22);
+ e.gc.setBackground(ColorResources.SETTING_TITLE_BACKGROUND);
+ e.gc.fillRectangle(1, 1, 84, 21);
}
});
}
// label
targetLabel = new Label(targetComp, SWT.TRANSPARENT);
FormData data = new FormData();
- data.top = new FormAttachment(0, 1);
+ data.top = new FormAttachment(0, 4);
data.left = new FormAttachment(0, 1);
- data.height = 21;
- data.width = 84;
+ data.height = 18;
+ data.width = 84;
targetLabel.setLayoutData(data);
targetLabel.setText(ConfigureLabels.SETTING_DIALOG_TARGET_TITLE);
targetLabel.setBackground(ColorResources.SETTING_TITLE_BACKGROUND);
// ToogleButtonGroup
Map<String, TargetData> targetList = SettingDataManager.getInstance().getTargetListMap();
- String selectedTarget = SettingDataManager.getInstance().getSelectedTarget();
+ String selectedTarget = SettingDataManager.getInstance().getConnectedTarget().getTargetName();
+ SettingDataManager.getInstance().setSelectedTarget(selectedTarget);
DACustomToggleButtonGroup targetGroup = new DACustomToggleButtonGroup();
Point imagePoint = new Point(18, 8);
Point fontPoint = new Point(-1, 60);
createTemplateTitleComposite();
createTemplateDescriptionComposite();
- // change button status
- SettingDialogManager.getInstance().updateSaveButtonStatus(null);
+// HIDDEN SETTING WIDGET (CHECKBOX, BUTTON)
+// // change button status
+// SettingDialogManager.getInstance().updateSaveButtonStatus(null);
}
}
});
if (selectedTarget.equals(entry.getKey()) == true) {
targetGroup.setSelection(toggle);
}
- }
+ }
targetComp.layout(true);
}
compData.top = new FormAttachment(0, 230);
compData.left = new FormAttachment(0, 98);
compData.width = 504;
- compData.height = 159;
+ compData.height = 164;
descriptionComp.setLayoutData(compData);
descriptionComp.setBackground(ColorResources.WHITE);
e.gc.setForeground(ColorResources.SETTING_STROKE);
e.gc.drawRectangle(r);
e.gc.drawLine(0, 22, rect.width-1, 22);
+
+ e.gc.setBackground(ColorResources.SETTING_TITLE_BACKGROUND);
+ e.gc.fillRectangle(1, 1, 502, 21);
+
}
});
}
// label : template
templateLabel = new Label(templateComp, SWT.TRANSPARENT);
FormData data = new FormData();
- data.top = new FormAttachment(0, 1);
+ data.top = new FormAttachment(0, 4);
data.left = new FormAttachment(0, 1);
- data.height = 21;
+ data.height = 18;
data.width = 502;
templateLabel.setLayoutData(data);
templateLabel.setText(ConfigureLabels.SETTING_DIALOG_TEMPLATE_TITLE);
if(toggleButton.isToggled()) {
// set select template
TargetData target = SettingDataManager.getInstance().getTarget(null);
- target.setSelectedTemplate(toggleButton.getText());
- target.changeAvailableFeatureListMap(toggleButton.getText());
-
- // change description
- createTemplateDescriptionComposite();
+ String preSelectedTemplate = target.getSelectedTemplate();
- // change button status
- SettingDialogManager.getInstance().updateSaveButtonStatus(null);
+ // TODO : redefine custom template usage
+ if (preSelectedTemplate.equals(toggleButton.getText()) == false) {
+ target.setSelectedTemplate(toggleButton.getText());
+ target.changeAvailableFeatureListMap(toggleButton.getText());
+
+ // change description
+ createTemplateDescriptionComposite();
+ }
+
+// HIDDEN SETTING WIDGET (CHECKBOX, BUTTON)
+// // change button status
+// SettingDialogManager.getInstance().updateSaveButtonStatus(null);
}
}
});
public class WelcomeDialog extends DAMessageBox {
- private DACustomButton applyButton = null;
-// private DACustomButton revertButton = null;
- private DACustomButton runButton = null;
+ private DACustomButton okButton = null;
+ private DACustomButton cancelButton = null;
+// HIDDEN SETTING WIDGET (CHECKBOX, BUTTON)
+// private DACustomButton applyButton = null;
+// private DACustomButton revertButton = null;
+// private DACustomButton runButton = null;
+// private DACheckBox useAgainCheckButton = null;
+
private SettingDialogTemplatePage templatesPage = null;
- private DACheckBox useAgainCheckButton = null;
public WelcomeDialog(Shell parentShell) {
super(parentShell);
SettingDataManager.getInstance(); // read setting information file
}
- private DACustomButtonClickEventListener applyButtonListener = new DACustomButtonClickEventListener() {
+ private DACustomButtonClickEventListener okButtonListener = new DACustomButtonClickEventListener() {
@Override
public void handleClickEvent(DACustomButton button) {
doApply();
- applicableButteon();
- }
- };
- private DACustomButtonClickEventListener revertButtonListener = new DACustomButtonClickEventListener() {
-
- @Override
- public void handleClickEvent(DACustomButton button) {
- doRevert();
- applicableButteon();
+ doRun();
+ shell.close(); // close dialog
}
};
- private DACustomButtonClickEventListener runButtonListener = new DACustomButtonClickEventListener() {
+ private DACustomButtonClickEventListener cancelButtonListener = new DACustomButtonClickEventListener() {
@Override
public void handleClickEvent(DACustomButton button) {
+ doRevert();
doRun();
shell.close(); // close dialog
}
};
+
+// HIDDEN SETTING WIDGET (CHECKBOX, BUTTON)
+// private DACustomButtonClickEventListener applyButtonListener = new DACustomButtonClickEventListener() {
+//
+// @Override
+// public void handleClickEvent(DACustomButton button) {
+// doApply();
+// applicableButteon();
+// }
+// };
+// private DACustomButtonClickEventListener revertButtonListener = new DACustomButtonClickEventListener() {
+//
+// @Override
+// public void handleClickEvent(DACustomButton button) {
+// doRevert();
+// applicableButteon();
+// }
+// };
+//
+// private DACustomButtonClickEventListener runButtonListener = new DACustomButtonClickEventListener() {
+//
+// @Override
+// public void handleClickEvent(DACustomButton button) {
+// doRun();
+// shell.close(); // close dialog
+// }
+// };
private void doApply() {
- // add & remove tab view page
- SettingDialogManager.getInstance().updateTabViewPage();
-
- // add & remove (timeline) chart
- SettingDialogManager.getInstance().updateChartList();
-
- // write setting data
- SettingDataManager.getInstance().applySettingData();
+ if (DACommunicator.isRunning() == false) {
+ // add & remove tab view page
+ SettingDialogManager.getInstance().updateTabViewPage();
+
+ // add & remove (timeline) chart
+ SettingDialogManager.getInstance().updateChartList();
+
+ // write setting data
+ SettingDataManager.getInstance().applySettingData();
+ }
}
private void doRevert() {
// rollback setting data
SettingDataManager.getInstance().revertSettingData();
- // update template view
- templatesPage.createTemplateTitleComposite();
- templatesPage.createTemplateDescriptionComposite();
- templatesPage.createTargetComposite();
+// HIDDEN SETTING WIDGET (CHECKBOX, BUTTON)
+// // update template view
+// templatesPage.createTemplateTitleComposite();
+// templatesPage.createTemplateDescriptionComposite();
+// templatesPage.createTargetComposite();
}
private void doRun() {
}
}
- private DACheckboxSelectionListener useAgainCheckbuttonListener = new DACheckboxSelectionListener() {
- @Override
- public void handleSelectionEvent(DACheckBox checkbox) {
- if (SettingDataManager.getInstance().isShowInitial()) {
- SettingDataManager.getInstance().setShowInitial(false);
- useAgainCheckButton.setChecked(false);
- } else {
- SettingDataManager.getInstance().setShowInitial(true);
- useAgainCheckButton.setChecked(true);
- }
-
- // change button status
- SettingDialogManager.getInstance().updateSaveButtonStatus(null);
- }
- };
+// HIDDEN SETTING WIDGET (CHECKBOX, BUTTON)
+// private DACheckboxSelectionListener useAgainCheckbuttonListener = new DACheckboxSelectionListener() {
+// @Override
+// public void handleSelectionEvent(DACheckBox checkbox) {
+// if (SettingDataManager.getInstance().isShowInitial()) {
+// SettingDataManager.getInstance().setShowInitial(false);
+// useAgainCheckButton.setChecked(false);
+// } else {
+// SettingDataManager.getInstance().setShowInitial(true);
+// useAgainCheckButton.setChecked(true);
+// }
+//
+// // change button status
+// SettingDialogManager.getInstance().updateSaveButtonStatus(null);
+// }
+// };
protected boolean run() {
IDECommunicator.setOpenWelcomeDlg(true);
- shell.setSize(611, 582);
+ shell.setSize(611, 558);
shell.setLayout(new FormLayout());
shell.setText(AnalyzerLabels.SETTING_TITLE);
shell.setBackground(ColorResources.CONFIGURATION_TABLE_COVER_BACKGROUND_COLOR);
compData.top = new FormAttachment(banner, 0);
compData.left = new FormAttachment(0, 0);
compData.right = new FormAttachment(100, 0);
- compData.bottom = new FormAttachment(100, -71);
+ compData.bottom = new FormAttachment(100, -49);
contentsComp.setLayoutData(compData);
// check exist setting file
e.gc.drawLine(0, 1, rect.width-1, 1);
}
});
-
- // ask use again image
- useAgainCheckButton = new DACheckBox(buttonContentsComp, SWT.NONE);
- FormData data = new FormData();
- data.top = new FormAttachment(0, 13);
- data.left = new FormAttachment(0, 12);
- data.height = 16;
- data.width = 312;
- useAgainCheckButton.setLayoutData(data);
- useAgainCheckButton.setForeground(ColorResources.BLACK);
- useAgainCheckButton
- .setBackground(ColorResources.CONFIGURATION_BUTTON_COVER_BACKGROUND_COLOR);
- useAgainCheckButton.setText(ConfigureLabels.SETTING_OPTION_SHOW_INITIAL);
- useAgainCheckButton.addSelectionListener(useAgainCheckbuttonListener);
- useAgainCheckButton.setChecked(SettingDataManager.getInstance().isShowInitial());
- runButton = new DAButton(buttonContentsComp, SWT.NONE);
- runButton.addClickListener(runButtonListener);
- if (ApplicationWorkbenchWindowAdvisor.isAutoStart()) {
- runButton.setText(WidgetLabels.RUN);
- } else {
- runButton.setText(WidgetLabels.CLOSE);
- }
+ cancelButton = new DAButton(buttonContentsComp, SWT.NONE);
+ cancelButton.addClickListener(cancelButtonListener);
+ cancelButton.setText(WidgetLabels.CANCEL);
- runButton.setButtonFont(FontResources.DIALOG_BUTTON_FONT);
+ cancelButton.setButtonFont(FontResources.DIALOG_BUTTON_FONT);
FormData buttonData = new FormData();
buttonData.right = new FormAttachment(100, -9);
- buttonData.top = new FormAttachment(useAgainCheckButton, 6);
+ buttonData.top = new FormAttachment(0, 11);
+ buttonData.width = 100;
+ buttonData.height = 28;
+ cancelButton.setLayoutData(buttonData);
+
+ okButton = new DAButton(buttonContentsComp, SWT.NONE);
+ okButton.addClickListener(okButtonListener);
+ okButton.setText(WidgetLabels.OK);
+ okButton.setButtonFont(FontResources.DIALOG_BUTTON_FONT);
+ buttonData = new FormData();
+ buttonData.right = new FormAttachment(cancelButton, -8);
+ buttonData.top = new FormAttachment(0, 11);
buttonData.width = 100;
buttonData.height = 28;
- runButton.setLayoutData(buttonData);
+ okButton.setLayoutData(buttonData);
+// HIDDEN SETTING WIDGET (CHECKBOX, BUTTON)
+// // ask use again image
+// useAgainCheckButton = new DACheckBox(buttonContentsComp, SWT.NONE);
+// FormData data = new FormData();
+// data.top = new FormAttachment(0, 13);
+// data.left = new FormAttachment(0, 12);
+// data.height = 16;
+// data.width = 312;
+// useAgainCheckButton.setLayoutData(data);
+// useAgainCheckButton.setForeground(ColorResources.BLACK);
+// useAgainCheckButton
+// .setBackground(ColorResources.CONFIGURATION_BUTTON_COVER_BACKGROUND_COLOR);
+// useAgainCheckButton.setText(ConfigureLabels.SETTING_OPTION_SHOW_INITIAL);
+// useAgainCheckButton.addSelectionListener(useAgainCheckbuttonListener);
+// useAgainCheckButton.setChecked(SettingDataManager.getInstance().isShowInitial());
+//
+// runButton = new DAButton(buttonContentsComp, SWT.NONE);
+// runButton.addClickListener(runButtonListener);
+// if (ApplicationWorkbenchWindowAdvisor.isAutoStart()) {
+// runButton.setText(WidgetLabels.RUN);
+// } else {
+// runButton.setText(WidgetLabels.CLOSE);
+// }
+//
+// runButton.setButtonFont(FontResources.DIALOG_BUTTON_FONT);
+// FormData buttonData = new FormData();
+// buttonData.right = new FormAttachment(100, -9);
+// buttonData.top = new FormAttachment(useAgainCheckButton, 6);
+// buttonData.width = 100;
+// buttonData.height = 28;
+// runButton.setLayoutData(buttonData);
+//
// revertButton = new DAButton(buttonContentsComp, SWT.NONE);
// revertButton.addClickListener(revertButtonListener);
// revertButton.setText(WidgetLabels.REVERT);
// buttonData.width = 100;
// buttonData.height = 28;
// revertButton.setLayoutData(buttonData);
-
- applyButton = new DAButton(buttonContentsComp, SWT.NONE);
- applyButton.addClickListener(applyButtonListener);
- applyButton.setText(WidgetLabels.APPLY);
- applyButton.setButtonFont(FontResources.DIALOG_BUTTON_FONT);
- buttonData = new FormData();
+//
+// applyButton = new DAButton(buttonContentsComp, SWT.NONE);
+// applyButton.addClickListener(applyButtonListener);
+// applyButton.setText(WidgetLabels.APPLY);
+// applyButton.setButtonFont(FontResources.DIALOG_BUTTON_FONT);
+// buttonData = new FormData();
// buttonData.right = new FormAttachment(revertButton, -8);
- buttonData.right = new FormAttachment(runButton, -8);
- buttonData.top = new FormAttachment(useAgainCheckButton, 6);
- buttonData.width = 100;
- buttonData.height = 28;
- applyButton.setLayoutData(buttonData);
+// buttonData.top = new FormAttachment(useAgainCheckButton, 6);
+// buttonData.width = 100;
+// buttonData.height = 28;
+// applyButton.setLayoutData(buttonData);
+//
+// applicableButteon();
+
- applicableButteon();
shell.addShellListener(shellListener);
shell.open();
return true;
}
- public void applicableButteon() {
- applyButton.setButtonEnabled(false);
-// revertButton.setButtonEnabled(false);
- runButton.setButtonEnabled(true);
- }
-
- public void editableButteon() {
- if (DACommunicator.isRunning() == false) {
- applyButton.setButtonEnabled(true);
-// revertButton.setButtonEnabled(true);
- runButton.setButtonEnabled(false);
- }
- }
+// HIDDEN SETTING WIDGET (CHECKBOX, BUTTON)
+// public void applicableButteon() {
+// okButton.setButtonEnabled(false);
+//// revertButton.setButtonEnabled(false);
+// cancelButton.setButtonEnabled(true);
+// }
+//
+// public void editableButteon() {
+// if (DACommunicator.isRunning() == false) {
+// okButton.setButtonEnabled(true);
+//// revertButton.setButtonEnabled(true);
+// cancelButton.setButtonEnabled(false);
+// }
+// }
private void notifyAutoRun() {
synchronized (IDECommunicator.getWaitingWelcomeDlg()) {