[Title] add "select skin folder" and package version up
authorjihye kim <jihye1128.kim@samsung.com>
Sat, 24 Mar 2012 06:42:47 +0000 (15:42 +0900)
committerjihye kim <jihye1128.kim@samsung.com>
Sat, 24 Mar 2012 06:42:47 +0000 (15:42 +0900)
[Type] Enhancement
[Module] emulator-manager
[Priority] major
[Jira#]
[Redmine#]
[Problem]
[Cause]
[Solution]
[TestCase]

25 files changed:
jaxb_src/org/tizen/emulator/manager/vms/xml/BaseInformationType.java
jaxb_src/org/tizen/emulator/manager/vms/xml/DeviceType.java
jaxb_src/org/tizen/emulator/manager/vms/xml/DiskImageFormatType.java
jaxb_src/org/tizen/emulator/manager/vms/xml/DisplayType.java
jaxb_src/org/tizen/emulator/manager/vms/xml/EmulatorConfiguration.java
jaxb_src/org/tizen/emulator/manager/vms/xml/ObjectFactory.java
jaxb_src/org/tizen/emulator/manager/vms/xml/RamType.java
jaxb_src/org/tizen/emulator/manager/vms/xml/SkinType.java
jaxb_src/org/tizen/emulator/manager/vms/xml/StorageType.java
jaxb_src/org/tizen/emulator/manager/vms/xml/UsabilityType.java
jaxb_src/org/tizen/emulator/manager/vms/xml/package-info.java
package/pkginfo.manifest
src/org/tizen/emulator/manager/tool/FileIO.java
src/org/tizen/emulator/manager/tool/Launcher.java
src/org/tizen/emulator/manager/ui/MainDialog.java
src/org/tizen/emulator/manager/ui/MenuHandling.java
src/org/tizen/emulator/manager/ui/detail/VMPropertyView.java
src/org/tizen/emulator/manager/ui/detail/VMResource.java
src/org/tizen/emulator/manager/ui/vmstree/VMsTree.java
src/org/tizen/emulator/manager/vms/VMCreateHelper.java
src/org/tizen/emulator/manager/vms/VMProcess.java
src/org/tizen/emulator/manager/vms/VMPropertyValue.java
src/org/tizen/emulator/manager/vms/VMViewWidget.java [deleted file]
xsd/em.xml
xsd/em.xsd

index 6bfd76c..86d2400 100644 (file)
@@ -1,8 +1,8 @@
 //
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 
 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
 // Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2012.03.14 at 10:40:42 오후 KST 
+// Generated on: 2012.03.24 at 01:54:52 PM KST 
 //
 
 
index 1fa8fb4..8750424 100644 (file)
@@ -1,8 +1,8 @@
 //
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 
 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
 // Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2012.03.14 at 10:40:42 오후 KST 
+// Generated on: 2012.03.24 at 01:54:52 PM KST 
 //
 
 
index 63fa8af..abef6ae 100644 (file)
@@ -1,8 +1,8 @@
 //
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 
 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
 // Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2012.03.14 at 10:40:42 오후 KST 
+// Generated on: 2012.03.24 at 01:54:52 PM KST 
 //
 
 
index 427b1fa..d9ad37b 100644 (file)
@@ -1,8 +1,8 @@
 //
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 
 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
 // Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2012.03.14 at 10:40:42 오후 KST 
+// Generated on: 2012.03.24 at 01:54:52 PM KST 
 //
 
 
@@ -55,6 +55,17 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
  *             &lt;/simpleContent>
  *           &lt;/complexType>
  *         &lt;/element>
+ *         &lt;element name="skinPath">
+ *           &lt;complexType>
+ *             &lt;complexContent>
+ *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 &lt;sequence>
+ *                   &lt;element name="path" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *                 &lt;/sequence>
+ *               &lt;/restriction>
+ *             &lt;/complexContent>
+ *           &lt;/complexType>
+ *         &lt;/element>
  *       &lt;/sequence>
  *     &lt;/restriction>
  *   &lt;/complexContent>
@@ -66,7 +77,8 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 @XmlAccessorType(XmlAccessType.FIELD)
 @XmlType(name = "displayType", propOrder = {
     "resolution",
-    "density"
+    "density",
+    "skinPath"
 })
 public class DisplayType {
 
@@ -74,6 +86,8 @@ public class DisplayType {
     protected DisplayType.Resolution resolution;
     @XmlElement(required = true)
     protected DisplayType.Density density;
+    @XmlElement(required = true)
+    protected DisplayType.SkinPath skinPath;
 
     /**
      * Gets the value of the resolution property.
@@ -123,6 +137,30 @@ public class DisplayType {
         this.density = value;
     }
 
+    /**
+     * Gets the value of the skinPath property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link DisplayType.SkinPath }
+     *     
+     */
+    public DisplayType.SkinPath getSkinPath() {
+        return skinPath;
+    }
+
+    /**
+     * Sets the value of the skinPath property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link DisplayType.SkinPath }
+     *     
+     */
+    public void setSkinPath(DisplayType.SkinPath value) {
+        this.skinPath = value;
+    }
+
 
     /**
      * <p>Java class for anonymous complex type.
@@ -266,4 +304,58 @@ public class DisplayType {
 
     }
 
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType>
+     *   &lt;complexContent>
+     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       &lt;sequence>
+     *         &lt;element name="path" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+     *       &lt;/sequence>
+     *     &lt;/restriction>
+     *   &lt;/complexContent>
+     * &lt;/complexType>
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "", propOrder = {
+        "path"
+    })
+    public static class SkinPath {
+
+        protected String path;
+
+        /**
+         * Gets the value of the path property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getPath() {
+            return path;
+        }
+
+        /**
+         * Sets the value of the path property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setPath(String value) {
+            this.path = value;
+        }
+
+    }
+
 }
index 72f3337..211a672 100644 (file)
@@ -1,8 +1,8 @@
 //
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 
 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
 // Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2012.03.14 at 10:40:42 오후 KST 
+// Generated on: 2012.03.24 at 01:54:52 PM KST 
 //
 
 
index 2b181b1..be0b118 100644 (file)
@@ -1,8 +1,8 @@
 //
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 
 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
 // Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2012.03.14 at 10:40:42 오후 KST 
+// Generated on: 2012.03.24 at 01:54:52 PM KST 
 //
 
 
@@ -37,67 +37,67 @@ public class ObjectFactory {
     }
 
     /**
-     * Create an instance of {@link DisplayType }
+     * Create an instance of {@link StorageType.SDCard }
      * 
      */
-    public DisplayType createDisplayType() {
-        return new DisplayType();
+    public StorageType.SDCard createStorageTypeSDCard() {
+        return new StorageType.SDCard();
     }
 
     /**
-     * Create an instance of {@link UsabilityType }
+     * Create an instance of {@link BaseInformationType }
      * 
      */
-    public UsabilityType createUsabilityType() {
-        return new UsabilityType();
+    public BaseInformationType createBaseInformationType() {
+        return new BaseInformationType();
     }
 
     /**
-     * Create an instance of {@link BaseInformationType }
+     * Create an instance of {@link StorageType }
      * 
      */
-    public BaseInformationType createBaseInformationType() {
-        return new BaseInformationType();
+    public StorageType createStorageType() {
+        return new StorageType();
     }
 
     /**
-     * Create an instance of {@link RamType.Size }
+     * Create an instance of {@link DisplayType.Density }
      * 
      */
-    public RamType.Size createRamTypeSize() {
-        return new RamType.Size();
+    public DisplayType.Density createDisplayTypeDensity() {
+        return new DisplayType.Density();
     }
 
     /**
-     * Create an instance of {@link StorageType.SDCard }
+     * Create an instance of {@link UsabilityType }
      * 
      */
-    public StorageType.SDCard createStorageTypeSDCard() {
-        return new StorageType.SDCard();
+    public UsabilityType createUsabilityType() {
+        return new UsabilityType();
     }
 
     /**
-     * Create an instance of {@link EmulatorConfiguration }
+     * Create an instance of {@link DeviceType }
      * 
      */
-    public EmulatorConfiguration createEmulatorConfiguration() {
-        return new EmulatorConfiguration();
+    public DeviceType createDeviceType() {
+        return new DeviceType();
     }
 
     /**
-     * Create an instance of {@link DisplayType.Density }
+     * Create an instance of {@link RamType.Size }
      * 
      */
-    public DisplayType.Density createDisplayTypeDensity() {
-        return new DisplayType.Density();
+    public RamType.Size createRamTypeSize() {
+        return new RamType.Size();
     }
 
     /**
-     * Create an instance of {@link UsabilityType.Logging }
+     * Create an instance of {@link UsabilityType.FileSharing }
      * 
      */
-    public UsabilityType.Logging createUsabilityTypeLogging() {
-        return new UsabilityType.Logging();
+    public UsabilityType.FileSharing createUsabilityTypeFileSharing() {
+        return new UsabilityType.FileSharing();
     }
 
     /**
@@ -109,19 +109,19 @@ public class ObjectFactory {
     }
 
     /**
-     * Create an instance of {@link RamType }
+     * Create an instance of {@link BaseInformationType.DiskImage }
      * 
      */
-    public RamType createRamType() {
-        return new RamType();
+    public BaseInformationType.DiskImage createBaseInformationTypeDiskImage() {
+        return new BaseInformationType.DiskImage();
     }
 
     /**
-     * Create an instance of {@link DeviceType }
+     * Create an instance of {@link UsabilityType.Logging }
      * 
      */
-    public DeviceType createDeviceType() {
-        return new DeviceType();
+    public UsabilityType.Logging createUsabilityTypeLogging() {
+        return new UsabilityType.Logging();
     }
 
     /**
@@ -133,19 +133,27 @@ public class ObjectFactory {
     }
 
     /**
-     * Create an instance of {@link BaseInformationType.DiskImage }
+     * Create an instance of {@link DisplayType }
      * 
      */
-    public BaseInformationType.DiskImage createBaseInformationTypeDiskImage() {
-        return new BaseInformationType.DiskImage();
+    public DisplayType createDisplayType() {
+        return new DisplayType();
     }
 
     /**
-     * Create an instance of {@link UsabilityType.FileSharing }
+     * Create an instance of {@link RamType }
      * 
      */
-    public UsabilityType.FileSharing createUsabilityTypeFileSharing() {
-        return new UsabilityType.FileSharing();
+    public RamType createRamType() {
+        return new RamType();
+    }
+
+    /**
+     * Create an instance of {@link EmulatorConfiguration }
+     * 
+     */
+    public EmulatorConfiguration createEmulatorConfiguration() {
+        return new EmulatorConfiguration();
     }
 
     /**
@@ -157,11 +165,11 @@ public class ObjectFactory {
     }
 
     /**
-     * Create an instance of {@link StorageType }
+     * Create an instance of {@link DisplayType.SkinPath }
      * 
      */
-    public StorageType createStorageType() {
-        return new StorageType();
+    public DisplayType.SkinPath createDisplayTypeSkinPath() {
+        return new DisplayType.SkinPath();
     }
 
 }
index 198c88b..b3404a4 100644 (file)
@@ -1,8 +1,8 @@
 //
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 
 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
 // Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2012.03.14 at 10:40:42 오후 KST 
+// Generated on: 2012.03.24 at 01:54:52 PM KST 
 //
 
 
index 1775fa9..2c846af 100644 (file)
@@ -1,8 +1,8 @@
 //
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 
 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
 // Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2012.03.14 at 10:40:42 오후 KST 
+// Generated on: 2012.03.24 at 01:54:52 PM KST 
 //
 
 
index 95ff31b..d5fb700 100644 (file)
@@ -1,8 +1,8 @@
 //
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 
 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
 // Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2012.03.14 at 10:40:42 오후 KST 
+// Generated on: 2012.03.24 at 01:54:52 PM KST 
 //
 
 
index 2440ac1..6d18333 100644 (file)
@@ -1,8 +1,8 @@
 //
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 
 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
 // Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2012.03.14 at 10:40:42 오후 KST 
+// Generated on: 2012.03.24 at 01:54:52 PM KST 
 //
 
 
index 8e92c16..af1b416 100644 (file)
@@ -1,8 +1,8 @@
 //
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 
 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
 // Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2012.03.14 at 10:40:42 오후 KST 
+// Generated on: 2012.03.24 at 01:54:52 PM KST 
 //
 
 @javax.xml.bind.annotation.XmlSchema(namespace = "http://www.tizen.org/em", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
index d5b3da3..835f1be 100644 (file)
@@ -1,5 +1,5 @@
 Package: emulator-manager
-Version: 1.0.13
+Version: 1.0.14
 OS: linux
 Build-host-os: linux
 Maintainer: Yeong-Kyoon Lee<yeongkyoon.lee@samsung.com>
@@ -7,7 +7,7 @@ Source: emulator-manager
 Description: Tizen Emulator Manager
 
 Package: emulator-manager
-Version: 1.0.13
+Version: 1.0.14
 OS: windows
 Build-host-os: windows
 Maintainer: Yeong-Kyoon Lee<yeongkyoon.lee@samsung.com>
index 4e59562..26c85e7 100644 (file)
@@ -16,6 +16,7 @@ public class FileIO {
        private final static String etc_suffix = File.separator +"etc";
        private final static String log_suffix = File.separator +"logs";
        private final static String x86_kernel_suffix = File.separator +"kernel-img";
+       private final static String skin_suffix = File.separator + "skins";
 
        private static String currentPath;
        private static String emulatorPath;
@@ -32,6 +33,7 @@ public class FileIO {
        private static String etcPath;
        private static String x86KernelPath;
        private static String biosPath;
+       private static String skinPath;
 
        private static String vmsPath;
        private static String vmsArchPath;
@@ -67,6 +69,7 @@ public class FileIO {
                arcPath = emulatorPath + arch_suffix;
                etcPath = emulatorPath + etc_suffix;
                iconPath = emulatorPath + icon_suffix;
+               skinPath = emulatorPath + skin_suffix;
 
                dataPath = arcPath + data_suffix;
                confPath = arcPath + conf_suffix;
@@ -104,6 +107,7 @@ public class FileIO {
                        instance = new FileIO();
                }
        }
+
        public static FileIO getInstance() {
                return instance;
        }
@@ -129,6 +133,10 @@ public class FileIO {
                return iconPath;
        }
 
+       public String getSkinPath() {
+               return skinPath;
+       }
+
        public String getDataPath(){
                return dataPath;
        }
index 5c35cab..cbb85da 100644 (file)
@@ -61,6 +61,13 @@ public class Launcher {
                        List<String> cmd = new ArrayList<String>();
                        int width = property.getConfiguration().getDevice().getDisplay().getResolution().getWidth();
                        int height = property.getConfiguration().getDevice().getDisplay().getResolution().getHeight();
+                       String skinPath = null;
+                       if (property.getConfiguration().getDevice().getDisplay().getSkinPath() != null) {
+                               skinPath = property.getConfiguration().getDevice().getDisplay().getSkinPath().getPath();
+                               if (skinPath.isEmpty()) {
+                                       skinPath = null;
+                               }
+                       }
                        String fileshare = property.getConfiguration().getUsability().getFileSharing().getPath();
                        String sdcard = property.getConfiguration().getDevice().getStorage().getSDCard().getDiskImage();
                        int isLinux = System.getProperty("os.name").toLowerCase().indexOf("linux");
@@ -78,6 +85,9 @@ public class Launcher {
                        cmd.add("--skin-args");
                        cmd.add("width=" + width);
                        cmd.add("height=" + height);
+                       if (skinPath != null) {
+                               cmd.add("path=" + skinPath);
+                       }
                        cmd.add("--qemu-args");
                        cmd.add("-drive");
                        cmd.add("file=" + EmulatorVMs.getInstance().getVMsBaseDirectory() + File.separator  +property.getArch().toString() + File.separator + property.getName() + File.separator +"emulimg-" + property.getName() + ".x86,if=virtio");
index 7bbeeed..5dc5c47 100644 (file)
@@ -243,7 +243,7 @@ public class MainDialog {
        }
 
        public void closeDetailView() {
-               if (vmsTree.getCountSelectionItem() > 1) {
+               if (vmsTree.getSelectionContentCount() > 1) {
                        deleteButton.setEnabled(true);
                        resetButton.setEnabled(true);
                } else {
index c6c5778..45c1c75 100644 (file)
@@ -36,7 +36,7 @@ public class MenuHandling {
        }
 
        public void resetVirtualMachine() {
-               if (listTable.getCountSelectionItem() == 1) {
+               if (listTable.getSelectionContentCount() == 1) {
                        if (!checkRunnigVM(listTable.getSelectionItem())) {
                                return;
                        }
@@ -49,7 +49,7 @@ public class MenuHandling {
                int response = msg.open();
                boolean success = false;
                if (response == SWT.OK) {
-                       if (listTable.getCountSelectionItem() == 1) {
+                       if (listTable.getSelectionContentCount() == 1) {
                                if (!resetProcess(listTable.getSelectionItem())) {
                                        return;
                                }
@@ -140,7 +140,7 @@ public class MenuHandling {
 
        // TOOD : error checking
        public boolean deleteVirtualMachine() {
-               if (listTable.getCountSelectionItem() == 1) {
+               if (listTable.getSelectionContentCount() == 1) {
                        if (!checkRunnigVM(listTable.getSelectionItem())) {
                                return false;
                        }
@@ -152,7 +152,7 @@ public class MenuHandling {
 
                int response = msg.open();
                if (response == SWT.OK) {
-                       if (listTable.getCountSelectionItem() == 1) {
+                       if (listTable.getSelectionContentCount() == 1) {
                                if (!deleteProcess(listTable.getSelectionItem())) {
                                        return false;
                                }
index de642a9..5654f9e 100644 (file)
@@ -12,6 +12,7 @@ import org.eclipse.swt.events.SelectionListener;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
 import org.eclipse.swt.widgets.DirectoryDialog;
 import org.eclipse.swt.widgets.FileDialog;
 import org.eclipse.swt.widgets.Label;
@@ -25,12 +26,11 @@ import org.tizen.emulator.manager.ui.ResourceRegistry.ImageName;
 import org.tizen.emulator.manager.vms.VMCreateHelper;
 import org.tizen.emulator.manager.vms.VMProcess;
 import org.tizen.emulator.manager.vms.VMPropertyValue;
-import org.tizen.emulator.manager.vms.VMViewWidget;
 import org.tizen.emulator.manager.vms.VMsProperty;
 
 enum CItem{
        ImageName("Name"), ImageNameInfo(""), BaseImage("BaseImage"), 
-       Resolution("Display Resolution"), Density("Display Density"),
+       Resolution("Display Resolution"), Density("Display Density"), SkinPath("Skin Path"),
        SDType("SDCard"), SDPath("SDCard Path"), RAMSize("RAM Size"),
        ShareType("File Sharing"), SharePath("File Sharing Path");
 
@@ -45,7 +45,7 @@ enum CItem{
 
 enum DItem{
        ImageName("Name"), BaseImage("BaseImage"), 
-       Resolution("Display Resolution"), Density("Display Density"),
+       Resolution("Display Resolution"), Density("Display Density"), SkinPath("Skin Path"),
        SDType("SDCard"), SDPath("SDCard Path"), RAMSize("RAM Size"),
        ShareType("File Sharing"), SharePath("File Sharing Path"), Dummy("");
 
@@ -93,14 +93,9 @@ public class VMPropertyView {
 
        public VMPropertyView(Table table) {
                this.helper      = new VMCreateHelper();
-               this.process     = new VMProcess();
+               this.process = new VMProcess();
                this.widget      = new VMViewWidget();
-               this.table              = table;
-
-//             InputStream resourceAsStream = this.getClass().getClassLoader().getResourceAsStream("res/folder.png");
-//             if(resourceAsStream != null)
-//                     this.image  = new Image(EmulatorManager.getInstance().getDisplay(), resourceAsStream);
-
+               this.table      = table;
                this.image = ResourceRegistry.getImage(ImageName.FOLDER);
                makeItemList();
        }
@@ -141,10 +136,11 @@ public class VMPropertyView {
                widget.itemList.get(DItem.ImageName.ordinal()).setText(1, oldValue.imageName);
 
                widget.itemList.get(DItem.BaseImage.ordinal()).setText(1, oldValue.baseImagePathName);
-               
+
                widget.itemList.get(DItem.Resolution.ordinal()).setText(1, oldValue.resolution);
                widget.itemList.get(DItem.Density.ordinal()).setText(1, String.valueOf(oldValue.dpi));
-               
+               widget.itemList.get(DItem.SkinPath.ordinal()).setText(1, oldValue.skinPathName);
+
                widget.itemList.get(DItem.SDType.ordinal()).setText(1, oldValue.isSDCardSupport 
                                                                                                                        ? SupportType.getInstance().get(0) : SupportType.getInstance().get(1));
                widget.itemList.get(DItem.SDPath.ordinal()).setText(1, oldValue.SDCardPathName);
@@ -167,10 +163,11 @@ public class VMPropertyView {
                widget.itemList.get(CItem.ImageName.ordinal()).setText(1, oldValue.imageName);
 
                widget.itemList.get(CItem.BaseImage.ordinal()).setText(1, oldValue.baseImagePathName);
-               
+
                widget.itemList.get(CItem.Resolution.ordinal()).setText(1, oldValue.resolution);
                widget.itemList.get(CItem.Density.ordinal()).setText(1, String.valueOf(oldValue.dpi));
-               
+               widget.itemList.get(CItem.SkinPath.ordinal()).setText(1, oldValue.skinPathName);
+
                widget.itemList.get(CItem.SDType.ordinal()).setText(1,SupportType.getInstance().get(0));
                widget.itemList.get(CItem.SDPath.ordinal()).setText(1, oldValue.SDCardPathName);
 
@@ -224,6 +221,10 @@ public class VMPropertyView {
                editor = new TableEditor(table);
                editor.grabHorizontal = true;
                editor.setEditor(widget.DIPspinner, widget.itemList.get(DItem.Density.ordinal()), 1);
+
+               editor = new TableEditor(table);
+               editor.grabHorizontal = true;
+               editor.setEditor(widget.skinPathCombo, widget.itemList.get(DItem.SkinPath.ordinal()), 1);
                
                editor = new TableEditor(table);
                editor.grabHorizontal = true;
@@ -269,6 +270,10 @@ public class VMPropertyView {
 
                editor = new TableEditor(table);
                editor.grabHorizontal = true;
+               editor.setEditor(widget.skinPathCombo, widget.itemList.get(CItem.SkinPath.ordinal()), 1);
+
+               editor = new TableEditor(table);
+               editor.grabHorizontal = true;
                editor.setEditor(widget.SDCardTypeCombo, widget.itemList.get(CItem.SDType.ordinal()), 1);
 
                editor = new TableEditor(table);
@@ -402,6 +407,14 @@ public class VMPropertyView {
                                                        DisplayResoultion.getInstance().findIndex(oldValue.resolution));
                widget.DIPspinner = new Spinner(table, SWT.BORDER);
                widget.DIPspinner.setValues(oldValue.dpi, 100, 480, 0, 1, 1);
+               
+               widget.skinPathCombo = helper.makeCombo(table);
+               helper.addComboItem(widget.skinPathCombo, SkinPath.getInstance().getList());
+               widget.skinPathCombo.add(oldValue.skinPathName, 0);
+               widget.skinPathCombo.add("-----------------------------------------------------", 1);
+               widget.skinPathCombo.add("--Select existing SkinFolder", SkinPath.getInstance().size() + 2);
+               widget.skinPathCombo.select(0);
+               widget.skinPathCombo.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
 
                createDisplayListener();
        }
@@ -417,6 +430,19 @@ public class VMPropertyView {
                                                widget.DIPspinner.setSelection(newValue.dpi);
                                        }
                                }
+
+                               if (SkinPath.getInstance().size() == 0) {
+                                       newValue.skinPath = "emul_" + newValue.resolution;
+                                       newValue.skinPathName = "emul_" + newValue.resolution;
+                               } else {
+                                       int i = SkinPath.getInstance().findIndex(newValue.resolution);
+                                       newValue.skinPath = SkinPath.getInstance().get(i);
+                                       newValue.skinPathName = SkinPath.getInstance().get(i);
+                               }
+                               widget.skinPathCombo.remove(0);
+                               widget.skinPathCombo.add(newValue.skinPath, 0);
+                               widget.skinPathCombo.select(0);
+
                                if (!isCreateMode) {
                                        checkModifyState();
                                }
@@ -436,6 +462,40 @@ public class VMPropertyView {
                                }
                        }
                });
+               
+               widget.skinPathCombo.addSelectionListener(new SelectionListener() {
+                       @Override
+                       public void widgetSelected(SelectionEvent e) {
+                               int i = widget.skinPathCombo.getSelectionIndex();
+                               if (i == SkinPath.getInstance().size() + 2) { // Select Exist Skin Folder
+                                       if (widget.skinPathDD == null) {
+                                               widget.skinPathDD = new DirectoryDialog(table.getShell(), SWT.OPEN);
+                                               widget.skinPathDD.setText("Select a Direcory");
+                                       }
+                                       String path = widget.skinPathDD.open();
+                                       if(path != null) {
+                                               newValue.skinPath = path;
+                                               newValue.skinPathName = path.substring(path.lastIndexOf(SEFARATOR) + 1, path.length());
+                                       }
+
+                               }  else if (i != 0 && i != 1) {
+                                       newValue.skinPath = widget.skinPathCombo.getItem(i);
+                                       newValue.skinPathName = widget.skinPathCombo.getItem(i);
+                               }
+
+                               widget.skinPathCombo.remove(0);
+                               widget.skinPathCombo.add(newValue.skinPathName, 0);
+                               widget.skinPathCombo.select(0);
+
+                               if (!isCreateMode) {
+                                       checkModifyState();
+                               }
+                       }
+                       @Override
+                       public void widgetDefaultSelected(SelectionEvent e) {
+                       }
+                       
+               });
        }
 
        private void createSDCardArea(final Table table) {
@@ -446,7 +506,8 @@ public class VMPropertyView {
                widget.SDCardPathCombo = helper.makeCombo(table);
                helper.addComboItem(widget.SDCardPathCombo, SDCard.getInstance().getList());
                widget.SDCardPathCombo.add(oldValue.SDCardPathName, 0);
-               widget.SDCardPathCombo.add("--Select existing SDCard", SDCard.getInstance().size() + 1);
+               widget.SDCardPathCombo.add("-----------------------------------------------", 1);
+               widget.SDCardPathCombo.add("--Select existing SDCard", SDCard.getInstance().size() + 2);
                widget.SDCardPathCombo.select(0);
                widget.SDCardPathCombo.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
                widget.SDCardPathCombo.setEnabled(oldValue.isSDCardSupport);
@@ -480,7 +541,7 @@ public class VMPropertyView {
                        @Override
                        public void widgetSelected(SelectionEvent e) {
                                int i = widget.SDCardPathCombo.getSelectionIndex();
-                               if (i == SDCard.getInstance().size() + 1) { // Select Exist SDCard
+                               if (i == SDCard.getInstance().size() + 2) { // Select Exist SDCard
                                        if (widget.SDImageFD == null) {
                                                widget.SDImageFD = new FileDialog(table.getShell(), SWT.OPEN);
                                                widget.SDImageFD.setText("Select an existing SD card");
@@ -493,15 +554,16 @@ public class VMPropertyView {
                                        if(path != null) {
                                                newValue.SDCardPath = path;
                                                newValue.SDCardPathName = path.substring(path.lastIndexOf(SEFARATOR) + 1, path.length());
-                                               widget.SDCardPathCombo.remove(0);
-                                               widget.SDCardPathCombo.add(newValue.SDCardPathName, 0);
-                                               widget.SDCardPathCombo.select(0);
                                        }
-                               } else if (i != 0) {
+                               } else if (i != 0 && i != 1) {
                                        newValue.SDCardPath = widget.SDCardPathCombo.getItem(i);
                                        newValue.SDCardPathName = widget.SDCardPathCombo.getItem(i);
                                }
 
+                               widget.SDCardPathCombo.remove(0);
+                               widget.SDCardPathCombo.add(newValue.SDCardPathName, 0);
+                               widget.SDCardPathCombo.select(0);
+
                                if (!isCreateMode) {
                                        checkModifyState();
                                }
@@ -603,6 +665,9 @@ public class VMPropertyView {
                if (newValue.dpi != oldValue.dpi) {
                        isModify = true;
                }
+               if (newValue.skinPath != oldValue.skinPath) {
+                       isModify = true;
+               }
 
                if (newValue.isSDCardSupport != oldValue.isSDCardSupport) {
                        isModify = true;
@@ -654,3 +719,48 @@ public class VMPropertyView {
                return p;
        }
 }
+
+class VMViewWidget {
+       public Table table;
+
+       public ArrayList<TableItem> itemList;
+       public Text  imageNameText;
+       public Label nameinfoLabel;
+
+       public Button selectBaseImageButton;
+       public FileDialog baseImageFD;
+
+       public Combo resolutionCombo;
+       public Spinner DIPspinner;
+       public Combo skinPathCombo;
+       public DirectoryDialog skinPathDD;
+
+       public Combo  SDCardTypeCombo;
+       public Combo  SDCardPathCombo;
+       public FileDialog SDImageFD;
+       
+       public Combo ramSizeCombo;
+
+       public Combo  shareTypeCombo;
+       public Button selectShareFolderButton;
+       public DirectoryDialog shareFileDD;
+
+       public Button cancelButton;
+       public Button confirmButton;
+       
+       public void close() {
+               //itemList.clear();
+               imageNameText.dispose();
+               if (nameinfoLabel != null)
+                       nameinfoLabel.dispose();
+               selectBaseImageButton.dispose();
+               resolutionCombo.dispose();
+               DIPspinner.dispose();
+               skinPathCombo.dispose();
+               SDCardTypeCombo.dispose();
+               SDCardPathCombo.dispose();
+               ramSizeCombo.dispose();
+               shareTypeCombo.dispose();
+               selectShareFolderButton.dispose();
+       }
+}
index 781726e..f90c8ac 100644 (file)
@@ -2,6 +2,8 @@ package org.tizen.emulator.manager.ui.detail;
 
 import java.util.ArrayList;
 
+import org.tizen.emulator.manager.vms.VMCreateHelper;
+
 class StringArrayResource
 {
        private ArrayList<String> list;
@@ -19,7 +21,11 @@ class StringArrayResource
 
        public String[] getList()
        {
-               return list.toArray(new String[size()]);
+               if (size() == 0) {
+                       return null;
+               } else {
+                       return list.toArray(new String[size()]);
+               }
        }
 
        public String get(int i) {
@@ -101,6 +107,36 @@ class DisplayResoultion extends StringArrayResource
        }
 }
 
+class SkinPath extends StringArrayResource
+{
+       private static SkinPath skinPath = new SkinPath();
+       public static SkinPath getInstance() {
+               return skinPath;
+       }
+
+       private SkinPath() {
+               ArrayList<String> list = new VMCreateHelper().makeSkinfolderList();
+               int index = 0;
+               for (String s : list) {
+                       add(index++, s);
+               }
+       }
+
+       public int findIndex(String r) {
+               String[] strArray = getList();
+               String s = null;
+               // TODO:
+               r = "emul_" + r;
+               for (int i = 0; i < strArray.length; i++) {
+                       s = strArray[i];
+                       if (s.equals(r)) {
+                               return i;
+                       }
+               }
+               return getDefaultIndex();
+       }
+}
+
 class SDCard extends StringArrayResource
 {
        private static SDCard capacity = new SDCard();
index a4f7726..e773987 100644 (file)
@@ -197,23 +197,6 @@ public class VMsTree {
                return count;
        }
 
-       public int getCountSelectionItem() {
-               int count = 0;
-               Object data;
-               for (int i = 0; i < vmsTree.getSelectionCount(); i++) {
-                        data = vmsTree.getSelection()[i].getData();
-                       if(!(data instanceof RowItem))
-                               continue;
-
-                       if (data instanceof CreateMarker || data instanceof TreeMarker) {
-                               return 0;
-                       }
-
-                       count++;
-               }
-               return count;
-       }
-
        public ArrayList<VMsProperty> getSelectionItems() {
                ArrayList<VMsProperty> list = new ArrayList<VMsProperty>();
 
index bcdca26..20534a4 100644 (file)
@@ -1,11 +1,15 @@
 package org.tizen.emulator.manager.vms;
 
+import java.io.File;
+import java.util.ArrayList;
+
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.widgets.Combo;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Event;
 import org.eclipse.swt.widgets.Listener;
+import org.tizen.emulator.manager.tool.FileIO;
 import org.tizen.emulator.manager.vms.VMsProperty.Architecture;
 
 public class VMCreateHelper {
@@ -58,7 +62,11 @@ public class VMCreateHelper {
        }
 
        public void addComboItem(Combo combo, Object[] items) {
-               addComboItem(combo, items, 0);
+               if (items == null) {
+                       return;
+               } else {
+                       addComboItem(combo, items, 0);
+               }
        }
 
        public void addComboItem(Combo combo, Object[] items, int defaultIndex) {
@@ -70,4 +78,20 @@ public class VMCreateHelper {
 
                combo.select(defaultIndex);
        }
+
+       public ArrayList<String> makeSkinfolderList() {
+               ArrayList<String> list = new ArrayList<String>();
+               File skins = new File(FileIO.getInstance().getSkinPath());
+
+               if (skins.exists()) {
+                       //System.out.println(skins.getAbsolutePath());
+                       for (File dir : skins.listFiles()) {
+                               if (dir.isDirectory()) {
+                                       //System.out.println(dir.getName());
+                                       list.add(dir.getName());
+                               }
+                       } 
+               }
+               return list;
+       }
 }
index 70b0ecd..bbac691 100644 (file)
@@ -100,6 +100,17 @@ public class VMProcess {
                        property.getConfiguration().getDevice().getDisplay().getDensity().setValue(newVM.dpi);
                }
 
+               if (newVM.skinPath != oldVM.skinPath) {
+                       if (newVM.skinPath == newVM.skinPathName) {
+                               newVM.skinPath = filePath.getSkinPath() + SEFARATOR + newVM.skinPathName;
+                       }
+                       if (property.getConfiguration().getDevice().getDisplay().getSkinPath() == null) {
+                               property.getConfiguration().getDevice().getDisplay().setSkinPath
+                                               (EmulatorVMs.getInstance().getObjectFactory().createDisplayTypeSkinPath());
+                       }
+                       property.getConfiguration().getDevice().getDisplay().getSkinPath().setPath(newVM.skinPath);
+               }
+
                if (newVM.isSDCardSupport != oldVM.isSDCardSupport) {
                        isModify = true;
                        if (newVM.isSDCardSupport) {
@@ -260,6 +271,9 @@ public class VMProcess {
                ec.getDevice().getDisplay().getDensity().setUnit("dpi");
                ec.getDevice().getDisplay().getDensity().setValue(newVM.dpi);
 
+               ec.getDevice().getDisplay().setSkinPath(factory.createDisplayTypeSkinPath());
+               ec.getDevice().getDisplay().getSkinPath().setPath(newVM.skinPath);
+
                ec.getDevice().setRAM(factory.createRamType());
                ec.getDevice().getRAM().setSize(factory.createRamTypeSize());
                ec.getDevice().getRAM().getSize().setUnit("MiB");
@@ -329,6 +343,9 @@ public class VMProcess {
                newVM.resolutionType.setWidth(Integer.valueOf(newVM.resolution.substring(0,i)));
                newVM.resolutionType.setHeight(Integer.valueOf(newVM.resolution.substring(i+1,newVM.resolution.length())));
 
+               if (newVM.skinPath == newVM.skinPathName) {
+                       newVM.skinPath = filePath.getSkinPath() + SEFARATOR + newVM.skinPathName;
+               }
                return true;
        }
 
index 642f852..89d278a 100644 (file)
@@ -2,6 +2,7 @@ package org.tizen.emulator.manager.vms;
 
 import java.io.File;
 
+import org.tizen.emulator.manager.tool.FileIO;
 import org.tizen.emulator.manager.vms.xml.DisplayType.Resolution;
 
 
@@ -18,6 +19,8 @@ public class VMPropertyValue {
        public Resolution resolutionType;
        public String resolution;
        public int dpi;
+       public String skinPath;
+       public String skinPathName;
 
        public boolean isSDCardSupport;
        public String SDCardPath;
@@ -43,6 +46,8 @@ public class VMPropertyValue {
                resolutionType          = oldTarget.resolutionType;
                resolution                      = oldTarget.resolution;
                dpi                             = oldTarget.dpi;
+               skinPath                        = oldTarget.skinPath;
+               skinPathName            = oldTarget.skinPathName;
 
                isSDCardSupport         = oldTarget.isSDCardSupport;
                SDCardPath                      = oldTarget.SDCardPath;
@@ -70,6 +75,10 @@ public class VMPropertyValue {
                resolutionType.setHeight(1280);
                resolution                      = "720x1280";
                dpi = 316; // this value be related to resolution
+               // TODO : Skin Path
+               skinPath = FileIO.getInstance().getSkinPath() + File.separator + "emul_" + resolution;
+               skinPathName = "emul_" + resolution;
+               //
 
                isSDCardSupport         = false;
                SDCardPath                      = "";
@@ -95,12 +104,28 @@ public class VMPropertyValue {
                resolutionType = re;
                resolution = String.valueOf(re.getWidth()) + "x" + String.valueOf(re.getHeight());
                dpi = property.getConfiguration().getDevice().getDisplay().getDensity().getValue();
+
+               // Skin Path
+               if (property.getConfiguration().getDevice().getDisplay().getSkinPath() != null) {
+                       skinPath = property.getConfiguration().getDevice().getDisplay().getSkinPath().getPath();
+                       if (skinPath != null) {
+                               skinPathName = skinPath.substring(skinPath.lastIndexOf(File.separator) + 1, skinPath.length());
+                       } else {
+                               skinPath = "";
+                               skinPathName = "( None )";
+                       }
+               } else {
+                       skinPath = "";
+                       skinPathName = "( None )";
+               }
+               //
+
                SDCardPath = property.getConfiguration().getDevice().getStorage().getSDCard().getDiskImage();
                if (SDCardPath != null) {
                        isSDCardSupport = true;
                        SDCardPathName = SDCardPath.substring
                                                                                (SDCardPath.lastIndexOf(File.separator) + 1, SDCardPath.length());
-               } else if (SDCardPath == null) {
+               } else {
                        SDCardPath = "";
                        SDCardPathName = "( None )";
                }
@@ -110,7 +135,7 @@ public class VMPropertyValue {
                        isFileShareSupport = true;
                        fileSharePathName = fileSharePath.substring
                                        (fileSharePath.lastIndexOf(File.separator) + 1, fileSharePath.length());
-               } else if (fileSharePath == null) {
+               } else {
                        fileSharePath = "";
                        fileSharePathName = "( None )";
                }
diff --git a/src/org/tizen/emulator/manager/vms/VMViewWidget.java b/src/org/tizen/emulator/manager/vms/VMViewWidget.java
deleted file mode 100644 (file)
index d7e4d10..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-package org.tizen.emulator.manager.vms;
-
-import java.util.ArrayList;
-
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.DirectoryDialog;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Spinner;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.swt.widgets.TableItem;
-
-public class VMViewWidget {
-       public Table table;
-
-       public ArrayList<TableItem> itemList;
-       public Text  imageNameText;
-       public Label nameinfoLabel;
-
-       public Button selectBaseImageButton;
-       public FileDialog baseImageFD;
-
-       public Combo resolutionCombo;
-       public Spinner DIPspinner;
-
-       public Combo  SDCardTypeCombo;
-       public Combo  SDCardPathCombo;
-       public FileDialog SDImageFD;
-       
-       public Combo ramSizeCombo;
-
-       public Combo  shareTypeCombo;
-       public Button selectShareFolderButton;
-       public DirectoryDialog shareFileDD;
-
-       public Button cancelButton;
-       public Button confirmButton;
-       
-       public void close() {
-               //itemList.clear();
-               imageNameText.dispose();
-               if (nameinfoLabel != null)
-                       nameinfoLabel.dispose();
-               selectBaseImageButton.dispose();
-               resolutionCombo.dispose();
-               DIPspinner.dispose();
-               SDCardTypeCombo.dispose();
-               SDCardPathCombo.dispose();
-               ramSizeCombo.dispose();
-               shareTypeCombo.dispose();
-               selectShareFolderButton.dispose();
-       }
-}
index 13c6685..7f0c3e8 100644 (file)
@@ -22,6 +22,7 @@
         <height>0</height>
       </resolution>
       <density unit="dpi">0</density>
+      <skinPath/>
     </display>
     <storage>
       <SDCard/>
index 8d29c8a..8492c52 100644 (file)
                        <element name="resolution" minOccurs="1" maxOccurs="1">
                                <complexType>
                                        <sequence>
-                                               <element name="width" type="int" minOccurs="1" maxOccurs="1" />
-                                               <element name="height" type="int" minOccurs="1" maxOccurs="1" />
+                                               <element name="width" type="int" minOccurs="1"
+                                                       maxOccurs="1" />
+                                               <element name="height" type="int" minOccurs="1"
+                                                       maxOccurs="1" />
                                        </sequence>
                                </complexType>
                        </element>
                                        </simpleContent>
                                </complexType>
                        </element>
+                       <element name="skinPath" minOccurs="1" maxOccurs="1">
+                <complexType>
+                    <sequence>
+                        <element name="path" type="string" minOccurs="0" />
+                    </sequence>
+                </complexType>
+            </element>
                </sequence>
        </complexType>