--- /dev/null
+package org.tizen.dynamicanalyzer.ui.toolbar.setting;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.ScrolledComposite;
+import org.eclipse.swt.events.ShellEvent;
+import org.eclipse.swt.events.ShellListener;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Shell;
+import org.tizen.dynamicanalyzer.nl.TargetDialogLabels;
+import org.tizen.dynamicanalyzer.nl.WidgetLabels;
+import org.tizen.dynamicanalyzer.resources.ColorResources;
+import org.tizen.dynamicanalyzer.resources.FontResources;
+import org.tizen.dynamicanalyzer.shortcut.ShortCutManager;
+import org.tizen.dynamicanalyzer.widgets.button.DACustomButton;
+import org.tizen.dynamicanalyzer.widgets.button.DACustomButtonClickEventListener;
+import org.tizen.dynamicanalyzer.widgets.da.base.DAButton;
+import org.tizen.dynamicanalyzer.widgets.da.base.DAMessageBox;
+
+public class TargetDialog extends DAMessageBox {
+ private static boolean opened = false;
+
+ public TargetDialog(Shell parentShell) {
+ super(parentShell);
+ }
+
+ protected boolean run() {
+ if (opened) {
+ return false;
+ }
+
+ shell.setSize(1010, 620);
+ shell.setLayout(new FormLayout());
+ shell.setText(TargetDialogLabels.TITLE);
+ shell.setBackground(ColorResources.WHITE);
+
+ // base composite
+ Composite baseComp = new Composite(shell, SWT.NONE);
+ FormLayout compLayout = new FormLayout();
+ baseComp.setLayout(compLayout);
+
+ FormData compData = new FormData();
+ compData.top = new FormAttachment(0, 0);
+ compData.left = new FormAttachment(0, 0);
+ compData.right = new FormAttachment(100, 0);
+ compData.bottom = new FormAttachment(100, -60);
+ baseComp.setLayoutData(compData);
+
+ ScrolledComposite scrolledComp = new ScrolledComposite(baseComp, SWT.BORDER | SWT.V_SCROLL);
+ scrolledComp.setLayout(new FormLayout());
+ FormData scrollCompData = new FormData();
+ scrollCompData.top = new FormAttachment(0, 0);
+ scrollCompData.left = new FormAttachment(0, 0);
+ scrollCompData.right = new FormAttachment(100, 0);
+ scrollCompData.bottom = new FormAttachment(100, 0);
+ scrolledComp.setLayoutData(scrollCompData);
+ scrolledComp.setExpandVertical(true);
+ scrolledComp.setBackground(ColorResources.WHITE);
+
+
+
+ // button composite
+ Composite buttonContentsComp = new Composite(shell, SWT.NONE);
+ compLayout = new FormLayout();
+ buttonContentsComp.setLayout(compLayout);
+ buttonContentsComp.setBackground(ColorResources.WHITE);
+ compData = new FormData();
+ compData.top = new FormAttachment(100, -60);
+ compData.left = new FormAttachment(0, 0);
+ compData.right = new FormAttachment(100, 0);
+ compData.bottom = new FormAttachment(100, 0);
+ buttonContentsComp.setLayoutData(compData);
+
+ DACustomButton okButton = new DAButton(buttonContentsComp, SWT.NONE);
+ okButton.addClickListener(okButtonListener);
+ okButton.setText(WidgetLabels.OK);
+ okButton.setButtonFont(FontResources.DIALOG_BUTTON_FONT);
+ FormData buttonData = new FormData();
+ buttonData.top = new FormAttachment(0, 15);
+ buttonData.right = new FormAttachment(100, -15);
+ buttonData.width = 100;
+ buttonData.height = 30;
+ okButton.setLayoutData(buttonData);
+
+ DACustomButton cancelButton = new DAButton(buttonContentsComp, SWT.NONE);
+ cancelButton.addClickListener(cancelButtonListener);
+ cancelButton.setText(WidgetLabels.CANCEL);
+ cancelButton.setButtonFont(FontResources.DIALOG_BUTTON_FONT);
+ buttonData = new FormData();
+ buttonData.top = new FormAttachment(0, 15);
+ buttonData.right = new FormAttachment(okButton, -8);
+ buttonData.width = 100;
+ buttonData.height = 30;
+ cancelButton.setLayoutData(buttonData);
+
+ DACustomButton refressButton = new DAButton(buttonContentsComp, SWT.NONE);
+ refressButton.addClickListener(refreshButtonListener);
+ refressButton.setText(TargetDialogLabels.REFRESH);
+ refressButton.setButtonFont(FontResources.DIALOG_BUTTON_FONT);
+ buttonData = new FormData();
+ buttonData.top = new FormAttachment(0, 15);
+ buttonData.right = new FormAttachment(cancelButton, -8);
+ buttonData.width = 100;
+ buttonData.height = 30;
+ refressButton.setLayoutData(buttonData);
+
+ opened = true;
+ ShortCutManager.getInstance().setEnabled(!opened);
+
+ shell.addShellListener(shellListener);
+ shell.open();
+
+ return true;
+ }
+
+ private DACustomButtonClickEventListener okButtonListener = new DACustomButtonClickEventListener() {
+
+ @Override
+ public void handleClickEvent(DACustomButton button) {
+ shell.close();
+ }
+ };
+
+ private DACustomButtonClickEventListener cancelButtonListener = new DACustomButtonClickEventListener() {
+
+ @Override
+ public void handleClickEvent(DACustomButton button) {
+ shell.close();
+ }
+ };
+
+ private DACustomButtonClickEventListener refreshButtonListener = new DACustomButtonClickEventListener() {
+
+ @Override
+ public void handleClickEvent(DACustomButton button) {
+
+ }
+ };
+
+ private ShellListener shellListener = new ShellListener() {
+
+ @Override
+ public void shellActivated(ShellEvent e) {
+ // TODO Auto-generated method stub
+ }
+
+ @Override
+ public void shellClosed(ShellEvent e) {
+ opened = false;
+ ShortCutManager.getInstance().setEnabled(!opened);
+ }
+
+ @Override
+ public void shellDeactivated(ShellEvent e) {
+ // TODO Auto-generated method stub
+ }
+
+ @Override
+ public void shellDeiconified(ShellEvent e) {
+ // TODO Auto-generated method stub
+ }
+
+ @Override
+ public void shellIconified(ShellEvent e) {
+ // TODO Auto-generated method stub
+ }
+
+ };
+}