Dialog: create 'DETAIL' mode dialog
authorjihye424.kim <jihye424.kim@samsung.com>
Wed, 14 Oct 2015 09:12:18 +0000 (18:12 +0900)
committerjihye424.kim <jihye424.kim@samsung.com>
Wed, 14 Oct 2015 09:12:18 +0000 (18:12 +0900)
Change-Id: Ic2579e448b47a306008b6363bcb246a9a89d405d
Signed-off-by: jihye424.kim <jihye424.kim@samsung.com>
src/org/tizen/emulator/manager/ui/renewal/dialog/DeviceTemplateModifyDialog.java
src/org/tizen/emulator/manager/ui/renewal/dialog/Dialog.java
src/org/tizen/emulator/manager/ui/renewal/dialog/ModifyDialog.java
src/org/tizen/emulator/manager/ui/renewal/dialoghandler/DeviceTemplateDialogHandler.java

index aa10920..b7bc922 100644 (file)
@@ -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<ModifyDialogItem> itemList) {
                // - create title, buttons
index 0be525b..b5bfec1 100644 (file)
@@ -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) {
index c0af9aa..fc8b475 100644 (file)
@@ -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<ModifyDialogItem> itemList) {
                super.create();
index 6441bc8..85ec9bb 100644 (file)
@@ -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<String, List<ModifyDialogItem>> 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) {