From: jihye424.kim Date: Sat, 7 Nov 2015 02:50:41 +0000 (+0900) Subject: vm property: delete Resolution class X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9b21e5ed062d7f3c0b0e7d6aa4bf8e85e620e216;p=sdk%2Femulator%2Femulator-manager.git vm property: delete Resolution class - delete Resolution class <- auto generate class from xml (xsd) file Conflicts: src/org/tizen/emulator/manager/devices/DeviceTemplateValue.java src/org/tizen/emulator/manager/ui/renewal/item/modify/common/ResolutionSubItem.java Change-Id: Ia549ff475529366b4dc99f4a4c75d80ed0583b77 Signed-off-by: jihye424.kim (cherry picked from commit 51588e743f19ef1b3193f3f07aa56f2fd316314a) --- diff --git a/src/org/tizen/emulator/manager/vms/Creator.java b/src/org/tizen/emulator/manager/vms/Creator.java index e06c2ca..a3f9d88 100644 --- a/src/org/tizen/emulator/manager/vms/Creator.java +++ b/src/org/tizen/emulator/manager/vms/Creator.java @@ -333,8 +333,8 @@ public class Creator { ec.getDevice().setDisplay(factory.createDisplayType()); ec.getDevice().getDisplay().setResolution(factory.createDisplayTypeResolution()); - ec.getDevice().getDisplay().getResolution().setWidth(newVM.resolution.getResolution().getWidth()); - ec.getDevice().getDisplay().getResolution().setHeight(newVM.resolution.getResolution().getHeight()); + ec.getDevice().getDisplay().getResolution().setWidth(newVM.resolution.getWidth()); + ec.getDevice().getDisplay().getResolution().setHeight(newVM.resolution.getHeight()); ec.getDevice().getDisplay().setDensity(factory.createDisplayTypeDensity()); ec.getDevice().getDisplay().getDensity().setUnit("dpi"); //$NON-NLS-1$ diff --git a/src/org/tizen/emulator/manager/vms/Modifier.java b/src/org/tizen/emulator/manager/vms/Modifier.java index bc0997b..fea7e77 100644 --- a/src/org/tizen/emulator/manager/vms/Modifier.java +++ b/src/org/tizen/emulator/manager/vms/Modifier.java @@ -51,7 +51,8 @@ public class Modifier { oldVM.resolutionType.setWidth(Integer.valueOf(newVM.resolution.substring(0,i))); oldVM.resolutionType.setHeight(Integer.valueOf(newVM.resolution.substring(i+1,newVM.resolution.length()))); */ - property.getConfiguration().getDevice().getDisplay().setResolution(newVM.resolution.getResolution()); + property.getConfiguration().getDevice().getDisplay().getResolution().setWidth(newVM.resolution.getWidth()); + property.getConfiguration().getDevice().getDisplay().getResolution().setHeight(newVM.resolution.getHeight()); /* if (newVM.keyType == 1) { // 1key newVM.skinPath = FilePath.getInstance().getDefaultSkinPath() + File.separator + "emul_" + newVM.resolution; diff --git a/src/org/tizen/emulator/manager/vms/RESOLUTION.java b/src/org/tizen/emulator/manager/vms/RESOLUTION.java index 122702b..7e63e88 100644 --- a/src/org/tizen/emulator/manager/vms/RESOLUTION.java +++ b/src/org/tizen/emulator/manager/vms/RESOLUTION.java @@ -31,8 +31,6 @@ package org.tizen.emulator.manager.vms; import java.util.ArrayList; -import org.tizen.emulator.manager.vms.xml.DisplayType.Resolution; - public class RESOLUTION { public static RESOLUTION MINI = new RESOLUTION(320, 320, "", 316); //$NON-NLS-1$ public static RESOLUTION HVGA = new RESOLUTION(320, 480,"HVGA", 160); //$NON-NLS-1$ @@ -45,7 +43,8 @@ public class RESOLUTION { public static RESOLUTION WQXGA = new RESOLUTION(2560, 1600, "WQXGA", 301); //$NON-NLS-1$ public static RESOLUTION R_360_480 = new RESOLUTION(360, 480, "", 316); //$NON-NLS-1$ - private Resolution resolution; + private int width = 0; + private int height = 0; private String type; private int dpi; private String strValue; @@ -54,9 +53,8 @@ public class RESOLUTION { private static ArrayList values; public RESOLUTION(int width, int height, String type, int dpi) { - this.resolution = new Resolution(); - resolution.setWidth(width); - resolution.setHeight(height); + setWidth(width); + setHeight(height); this.type = type; this.dpi = dpi; @@ -74,6 +72,22 @@ public class RESOLUTION { values.add(this); } + public int getWidth() { + return width; + } + + public void setWidth(int width) { + this.width = width; + } + + public int getHeight() { + return height; + } + + public void setHeight(int height) { + this.height = height; + } + public int getDPI() { return dpi; } @@ -82,10 +96,6 @@ public class RESOLUTION { return type; } - public Resolution getResolution() { - return resolution; - } - public String getStrValue() { return strValue; } @@ -94,6 +104,7 @@ public class RESOLUTION { return strTypeValue; } + @Override public String toString() { return strTypeValue; } diff --git a/src/org/tizen/emulator/manager/vms/VMPropertyValue.java b/src/org/tizen/emulator/manager/vms/VMPropertyValue.java index 2c4fbb6..2c6ec03 100644 --- a/src/org/tizen/emulator/manager/vms/VMPropertyValue.java +++ b/src/org/tizen/emulator/manager/vms/VMPropertyValue.java @@ -336,8 +336,8 @@ public class VMPropertyValue implements Cloneable { Resolution re = null; for (RESOLUTION d : RESOLUTION.values()) { re = property.getConfiguration().getDevice().getDisplay().getResolution(); - if (d.getResolution().getWidth() == re.getWidth() - && d.getResolution().getHeight() == re.getHeight()) { + if (d.getWidth() == re.getWidth() + && d.getHeight() == re.getHeight()) { resolution = d; break; }