From dc3392fb1e04db56973e91e5e82129a7ecbbba11 Mon Sep 17 00:00:00 2001 From: "jihye424.kim" Date: Wed, 14 Oct 2015 18:12:18 +0900 Subject: [PATCH] Dialog: create 'DETAIL' mode dialog Change-Id: Ic2579e448b47a306008b6363bcb246a9a89d405d Signed-off-by: jihye424.kim --- .../ui/renewal/dialog/DeviceTemplateModifyDialog.java | 3 +++ .../tizen/emulator/manager/ui/renewal/dialog/Dialog.java | 4 +++- .../emulator/manager/ui/renewal/dialog/ModifyDialog.java | 4 +++- .../dialoghandler/DeviceTemplateDialogHandler.java | 15 ++++++++++++++- 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/src/org/tizen/emulator/manager/ui/renewal/dialog/DeviceTemplateModifyDialog.java b/src/org/tizen/emulator/manager/ui/renewal/dialog/DeviceTemplateModifyDialog.java index aa10920..b7bc922 100644 --- a/src/org/tizen/emulator/manager/ui/renewal/dialog/DeviceTemplateModifyDialog.java +++ b/src/org/tizen/emulator/manager/ui/renewal/dialog/DeviceTemplateModifyDialog.java @@ -49,6 +49,9 @@ public class DeviceTemplateModifyDialog extends ModifyDialog { super(parent, title, WIDTH, HEIGHT); } + public DeviceTemplateModifyDialog(Shell parent, String title, int style) { + super(parent, title, WIDTH, HEIGHT, style); + } public void create(DeviceTemplateValue value, List itemList) { // - create title, buttons diff --git a/src/org/tizen/emulator/manager/ui/renewal/dialog/Dialog.java b/src/org/tizen/emulator/manager/ui/renewal/dialog/Dialog.java index 0be525b..b5bfec1 100644 --- a/src/org/tizen/emulator/manager/ui/renewal/dialog/Dialog.java +++ b/src/org/tizen/emulator/manager/ui/renewal/dialog/Dialog.java @@ -72,7 +72,9 @@ public class Dialog { } public void setOKButtonEnable(boolean enable) { - okButton.setEnabled(enable); + if (okButton != null) { + okButton.setEnabled(enable); + } } public Dialog(Shell parent, String title, int width, int height, int buttonStyle) { diff --git a/src/org/tizen/emulator/manager/ui/renewal/dialog/ModifyDialog.java b/src/org/tizen/emulator/manager/ui/renewal/dialog/ModifyDialog.java index c0af9aa..fc8b475 100644 --- a/src/org/tizen/emulator/manager/ui/renewal/dialog/ModifyDialog.java +++ b/src/org/tizen/emulator/manager/ui/renewal/dialog/ModifyDialog.java @@ -54,9 +54,11 @@ public class ModifyDialog extends Dialog { public ModifyDialog(Shell parent, String title, int width, int height) { super(parent, title, width, height, BUTTON_STYLE); - // TODO Auto-generated constructor stub } + public ModifyDialog(Shell parent, String title, int width, int height, int style) { + super(parent, title, width, height, style); + } public void create(PropertyValue value, List itemList) { super.create(); diff --git a/src/org/tizen/emulator/manager/ui/renewal/dialoghandler/DeviceTemplateDialogHandler.java b/src/org/tizen/emulator/manager/ui/renewal/dialoghandler/DeviceTemplateDialogHandler.java index 6441bc8..85ec9bb 100644 --- a/src/org/tizen/emulator/manager/ui/renewal/dialoghandler/DeviceTemplateDialogHandler.java +++ b/src/org/tizen/emulator/manager/ui/renewal/dialoghandler/DeviceTemplateDialogHandler.java @@ -54,6 +54,7 @@ import org.tizen.emulator.manager.ui.renewal.item.modify.common.ProcessorItem; import org.tizen.emulator.manager.ui.renewal.item.modify.common.ProfileItem; import org.tizen.emulator.manager.ui.renewal.item.modify.common.RamSizeItem; import org.tizen.emulator.manager.ui.renewal.item.modify.common.SensorItem; +import org.tizen.emulator.manager.ui.renewal.item.modify.comp.PropertyValue; import org.tizen.emulator.manager.ui.renewal.item.modify.template.CameraItem; import org.tizen.emulator.manager.vms.xml.template2.ItemList2; @@ -62,9 +63,21 @@ public class DeviceTemplateDialogHandler { public static final String TITLE_CREATE = "New Template"; public static final String TITLE_MODIFY = "Modify Template"; public static final String TITLE_CLONE = "Clone Template"; - + public static final String TITLE_DETAIL = "Detail Information"; public static Map> itemListMap; + public static void detail(DeviceTemplateValue value) { + if (value == null) { + return; + } + + DeviceTemplateValue itemValue = value.clone(); + DeviceTemplateModifyDialog dialog + = new DeviceTemplateModifyDialog(MainDialog.getShell(), TITLE_DETAIL, SWT.OK); + dialog.setDialogMode(DIALOG_MODE.DETAIL); + dialog.create(new PropertyValue(itemValue), getItemList(null)); + dialog.open(); + } public static DeviceTemplateValue create(DeviceTemplateValue value) { if (value == null) { -- 2.7.4