import org.tizen.dynamicanalyzer.shortcut.ShortCutManager;
import org.tizen.dynamicanalyzer.util.CommonUtil;
import org.tizen.dynamicanalyzer.util.Logger;
-import org.tizen.dynamicanalyzer.util.WorkbenchUtil;
import org.tizen.dynamicanalyzer.widgets.button.DACustomButton;
import org.tizen.dynamicanalyzer.widgets.button.DACustomButtonClickEventListener;
import org.tizen.dynamicanalyzer.widgets.da.base.DAButton;
public class AboutDialog extends DAMessageBox {
private static boolean opened = false;
- private DACustomButton licenseButton = null;
private DACustomButton okButton = null;
private static String ideBuildVersionInfo = CommonConstants.EMPTY;
}
};
- private DACustomButtonClickEventListener licenseButtonListener = new DACustomButtonClickEventListener() {
-
- @Override
- public void handleClickEvent(DACustomButton button) {
- Shell shell = WorkbenchUtil.getWorkbenchWindow().getShell();
- LicenseDialog dialog = new LicenseDialog(shell);
- dialog.open();
- }
- };
-
protected boolean run() {
if (opened) {
return false;
okData.height = DesignConstants.DA_BUTTON_HEIGHT;
okButton.setLayoutData(okData);
- licenseButton = new DAButton(buttonComp, SWT.NONE);
- licenseButton.addClickListener(licenseButtonListener);
- licenseButton.setText(AnalyzerLabels.ABOUT_DIALOG_LICENSE);
- licenseButton.setButtonFont(FontResources.DIALOG_BUTTON_FONT);
-
- FormData licenceData = new FormData();
- licenceData.top = new FormAttachment(0, 9);
- licenceData.right = new FormAttachment(okButton, -10);
- licenceData.width = DesignConstants.DA_BUTTON_WIDTH;
- licenceData.height = DesignConstants.DA_BUTTON_HEIGHT;
- licenseButton.setLayoutData(licenceData);
-
opened = true;
ShortCutManager.getInstance().setEnabled(!opened);