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$
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;
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$
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;
private static ArrayList<RESOLUTION> 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;
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;
}
return type;
}
- public Resolution getResolution() {
- return resolution;
- }
-
public String getStrValue() {
return strValue;
}
return strTypeValue;
}
+ @Override
public String toString() {
return strTypeValue;
}
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;
}