tree list: changed information displayed in tree list.
authorminkee.lee <minkee.lee@samsung.com>
Tue, 25 Aug 2015 05:39:41 +0000 (14:39 +0900)
committerminkee.lee <minkee.lee@samsung.com>
Tue, 25 Aug 2015 05:39:41 +0000 (14:39 +0900)
- add image version. (custom-vm shows "custom")
- remove DPI.

Change-Id: Idddd71b7e95eb35a65039d88e29d28c05b4ff4a3
Signed-off-by: minkee.lee <minkee.lee@samsung.com>
src/org/tizen/emulator/manager/ui/list/ColumnContentHelper.java

index 7b77d3f..75c529c 100644 (file)
 package org.tizen.emulator.manager.ui.list;
 
 import org.tizen.emulator.manager.vms.VMProperty;
+import org.tizen.emulator.manager.vms.VMPropertyValue;
 import org.tizen.emulator.manager.vms.xml.DeviceType;
 import org.tizen.emulator.manager.vms.xml.DisplayType;
 
 public abstract class ColumnContentHelper {
        static final int numberOfColumns = 4;
-       static final String[] columnTitles = new String[] { "Name", "CPU", "Resolution", "Density", "RAM size", }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+       static final String[] columnTitles = new String[] { "Name", "Version", "Resolution", "CPU", "RAM size", }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
        static final ColumnContentHelper[] helpers = new ColumnContentHelper[] {
                new NameContentHelper(0),
-               new ArchitectureHelper(1),
+               new VersionContentHelper(1),
                new ResolutionContentHelper(2),
-               new DensityContentHelper(3),
+               new ArchitectureHelper(3),
                new RAMSizeContentHelper(4),
        };
-               
+
        int index;
-       
+
        protected ColumnContentHelper(int index) {
                this.index = index;
        }
-       
+
        public String getTitle() {
                return columnTitles[index];
        }
-       
+
        public int getIndex() {
                return index;
        }
@@ -64,7 +65,7 @@ public abstract class ColumnContentHelper {
        public static int getContentCount() {
                return numberOfColumns;
        }
-       
+
        public static ColumnContentHelper[] getContentHelpers() {
                return helpers;
        }
@@ -75,7 +76,7 @@ class NameContentHelper extends ColumnContentHelper {
        public NameContentHelper(int index) {
                super(index);
        }
-       
+
        @Override
        public String getContent(VMProperty property) {
                return property.getName();
@@ -86,7 +87,7 @@ class ArchitectureHelper extends ColumnContentHelper {
        public ArchitectureHelper(int index) {
                super(index);
        }
-       
+
        @Override
        public String getContent(VMProperty property) {
                return property.getArch().name();
@@ -97,25 +98,26 @@ class ResolutionContentHelper extends ColumnContentHelper {
        public ResolutionContentHelper(int index) {
                super(index);
        }
-       
+
        @Override
        public String getContent(VMProperty property) {
                DisplayType displayType = property.getConfiguration().getDevice().getDisplay();
-               
+
                return displayType.getResolution().getWidth()
                                + " x " + displayType.getResolution().getHeight(); //$NON-NLS-1$
        }
 }
 
-class DensityContentHelper extends ColumnContentHelper {
-       public DensityContentHelper(int index) {
+class VersionContentHelper extends ColumnContentHelper {
+       public VersionContentHelper(int index) {
                super(index);
        }
 
        @Override
        public String getContent(VMProperty property) {
-               DisplayType displayType = property.getConfiguration().getDevice().getDisplay();
-               return displayType.getDensity().getValue() + ""; //$NON-NLS-1$
+               VMPropertyValue value = property.getPropertyValue();
+               return value.baseImage.isStandard() ?
+                               property.getImageVersion() : "custom";
        }
 }