import org.tizen.emulator.manager.ui.renewal.dialog.DeviceTemplateModifyDialog;
import org.tizen.emulator.manager.ui.renewal.dialog.ItemListUtil;
import org.tizen.emulator.manager.ui.renewal.item.ItemType;
+import org.tizen.emulator.manager.ui.renewal.item.modify.common.CheckItemData;
import org.tizen.emulator.manager.ui.renewal.item.modify.common.ConnectivityItem;
import org.tizen.emulator.manager.ui.renewal.item.modify.common.DisplayItem;
import org.tizen.emulator.manager.ui.renewal.item.modify.common.ModifyDialogItem;
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.RESOLUTION;
import org.tizen.emulator.manager.vms.xml.template2.ItemList2;
public class DeviceTemplateDialogHandler {
itemList.add(new NameItem("name", "Device Name"));
itemList.add(new ProfileItem());
- itemList.add(new DisplayItem(null));
+ itemList.add(new DisplayItem(new ArrayList<RESOLUTION>()));
itemList.add(new RamSizeItem());
itemList.add(new ProcessorItem());
- itemList.add(new SensorItem(null));
- itemList.add(new ConnectivityItem(null));
- itemList.add(new CameraItem(null));
+ itemList.add(new SensorItem(new ArrayList<CheckItemData>()));
+ itemList.add(new ConnectivityItem(new ArrayList<CheckItemData>()));
+ itemList.add(new CameraItem(new ArrayList<CheckItemData>()));
return itemList;
}
dialog.create(newValue, getItemList(property));
// TODO set display value to dialog
-
int retValue = dialog.open();
if (retValue == SWT.OK) {
private void initSubTreeItem(TreeModifyItem treeRoot) {
initDataList();
- item = new SubTreeModifyItem();
+ item = new SubTreeModifyItem(this,treeRoot);
item.setItemHeight(getContentHeight());
treeRoot.addSubItem((SubTreeModifyItem)item);
}
}
// 2. set isUse()
+ updateCheckBoxSubItems();
+
+ // 3. layout subitems.
+ layoutCheckBoxSubItems();
+
+ }
+
+
+ private void updateCheckBoxSubItems() {
for (CheckBoxSubItem subItem : subItemList) {
boolean isDataExist = false;
for (CheckItemData data : dataList) {
}
subItem.setUse(isDataExist);
}
-
- // 3. layout subitems.
- layoutCheckBoxSubItems();
-
}
}
+
+ @Override
+ public void changeItemValue(PropertyValue value) {
+ setInitialValue(value);
+ updateCheckBoxSubItems();
+ layoutCheckBoxSubItems();
+ }
}
return comboBox.getItemList();
}
+
+ protected List<Object> getComboDataList() {
+ return comboBox.getDataList();
+ }
+
+
protected String getComboItem(int index) {
return comboBox.getItemList().get(index);
}
}
protected void selectComboItem(int index) {
- comboBox.select(index);
+ selectComboItem(index, true);
+ }
+
+ protected void selectComboItem(int index, boolean notifySelect) {
+ comboBox.select(index, notifySelect);
+ comboBox.redraw();
}
+
+
protected String getSelectedItem() {
return comboBox.getSelectedItem();
}
// TODO override this.
}
+
+
+
}
import org.tizen.emulator.manager.ui.renewal.item.modify.comp.PropertyValue;
import org.tizen.emulator.manager.ui.renewal.item.modify.comp.SubTreeModifyItem;
import org.tizen.emulator.manager.ui.renewal.item.modify.comp.TreeModifyItem;
+import org.tizen.emulator.manager.ui.renewal.item.modify.vm.DeviceTemplateItem;
import org.tizen.emulator.manager.ui.renewal.widgets.ComboBox;
import org.tizen.emulator.manager.ui.renewal.widgets.TextInputBox;
import org.tizen.emulator.manager.ui.renewal.widgets.WidgetHelper;
/** constructor for tree sub item */
public DisplayItem(TreeModifyItem treeRoot, List<RESOLUTION> resList) {
super(NAME, TITLE);
- item = new SubTreeModifyItem();
+ item = new SubTreeModifyItem(this, treeRoot);
item.setItemHeight(ROW_HEIGHT * ROW_NUM + ModifyItem.LINE_WIDTH);
treeRoot.addSubItem((SubTreeModifyItem)item);
this.resList = resList;
initResolutionCombo();
}
+
+ // set widget disable if template is selected.
+ if (!(item instanceof SubTreeModifyItem)) {
+ return;
+ }
+ ModifyDialogItem parentDialogItem = ((SubTreeModifyItem)item).getTreeRoot().getDialogItem();
+ if (!(parentDialogItem instanceof DeviceTemplateItem)) {
+ return;
+ }
+ DeviceTemplateItem deviceTemplateItem = (DeviceTemplateItem)parentDialogItem;
+ if (deviceTemplateItem.getDeviceTemplate() != null) {
+ setWidgetEnabled(false);
+ }
+
}
}
+ @Override
+ public void changeItemValue(PropertyValue value) {
+ // display resolution
+ resolution = value.getResolution();
+ selectResolutionCombo();
+
+ // size
+ displaySize = String.valueOf(value.getDisplaySize());
+ selectSize();
+ // skin ?
+
+ // TODO disable ?
+ setWidgetEnabled(false);
+ }
+
+ private void setWidgetEnabled(boolean enabled) {
+ resolutionCombo.setEnabled(enabled);
+ widthTextBox.setEnabled(enabled);
+ heightTextBox.setEnabled(enabled);
+ sizeTextBox.setEnabled(enabled);
+// skinCombo.setEnabled(enabled);
+ }
}
public void setValue(PropertyValue value);
public abstract ModifyDialogItem cloneItem();
+
+
}
import org.tizen.emulator.manager.ui.renewal.item.modify.comp.IconItemTitle;
import org.tizen.emulator.manager.ui.renewal.item.modify.comp.ItemTitle;
import org.tizen.emulator.manager.ui.renewal.item.modify.comp.ModifyItem;
+import org.tizen.emulator.manager.ui.renewal.item.modify.comp.PropertyValue;
import org.tizen.emulator.manager.ui.renewal.item.modify.comp.SubTreeItemTitle;
import org.tizen.emulator.manager.ui.renewal.item.modify.comp.SubTreeModifyItem;
}
+ /** change item value and redraw */
+ public void changeItemValue(PropertyValue value) {
+ // sub tree Dialog-item have to override
+ }
+
+
public void mergeUIData(ModifyDialogItem srcDialogItem) {
// override this.
}
/** constructor for tree sub item */
public ProcessorItem(TreeModifyItem treeRoot) {
super(NAME, TITLE);
- item = new SubTreeModifyItem();
+ item = new SubTreeModifyItem(this,treeRoot);
treeRoot.addSubItem((SubTreeModifyItem)item);
}
// TODO ProcessorItem(TreeModifyItem treeRoot) ??
return new ProcessorItem();
}
+
+
+ @Override
+ public void changeItemValue(PropertyValue value) {
+ setInitialValue(value);
+ selectItem();
+ }
}
/** constructor for tree sub item */
public RamSizeItem(TreeModifyItem treeRoot) {
super(NAME, TITLE);
- item = new SubTreeModifyItem();
+ item = new SubTreeModifyItem(this,treeRoot);
treeRoot.addSubItem((SubTreeModifyItem)item);
}
break;
}
}
+
selectComboItem(index);
comboSelected();
+
}
private void comboSelected() {
// TODO RamSizeItem(TreeModifyItem treeRoot) ??
return new RamSizeItem();
}
+
+
+ @Override
+ public void changeItemValue(PropertyValue value) {
+ setInitialValue(value);
+ selectItem();
+ }
}
dataList.add(new CheckItemData("geo", "Geo-magnetic"));
dataList.add(new CheckItemData("light", "Light"));
dataList.add(new CheckItemData("haptic", "Haptic"));
- dataList.add(new CheckItemData("pressure", "Pressure"));
+ dataList.add(new CheckItemData("press", "Pressure"));
+ dataList.add(new CheckItemData("uv", "Ultraviolet"));
+ dataList.add(new CheckItemData("hrm", "Heartbeat Rate"));
+ dataList.add(new CheckItemData("test-mob", "test mobile"));
+
}
import org.eclipse.swt.widgets.Layout;
import org.tizen.emulator.manager.renewal.resources.ColorResources;
import org.tizen.emulator.manager.ui.renewal.dialog.VMModifyDialog;
+import org.tizen.emulator.manager.ui.renewal.item.modify.common.ModifyDialogItem;
public class ModifyItem {
+ private ModifyDialogItem modifyDialogItem;
+
public static final int ITEM_HEIGHT = 31;
public static final int LINE_WIDTH = 1;
public static final int LINE_INDENT = 7;
private int itemHeight = ITEM_HEIGHT;
+ public void setModifyDialogItem(ModifyDialogItem modifyDialogItem) {
+ this.modifyDialogItem = modifyDialogItem;
+ }
+
+ public ModifyDialogItem getDialogItem() {
+ return modifyDialogItem;
+ }
+
public int getItemHeight() {
return itemHeight;
}
import org.tizen.emulator.manager.vms.RESOLUTION;
import org.tizen.emulator.manager.vms.SKIN_SHAPE;
import org.tizen.emulator.manager.vms.VMPropertyValue;
+import org.tizen.emulator.manager.vms.xml.OptionType;
+import org.tizen.emulator.manager.vms.xml.SubOptionType;
public class PropertyValue {
+ private static String VALUE_ON = "on";
+ private static String VALUE_OFF = "off";
+
+
// VMPropertyValue or DeviceTemplateValue
private VMPropertyValue vmValue;
private DeviceTemplateValue templateValue;
public void setDisplaySize(double displaySize) {
if (isVMValue()) {
- // nothing
+ vmValue.screenSize = displaySize;
} else if (isTemplateValue()) {
templateValue.setDisplaySize(displaySize);
public double getDisplaySize() {
if (isVMValue()) {
-
+ return vmValue.screenSize;
} else if (isTemplateValue()) {
return templateValue.getDisplaySize();
public void setCheckBoxOptions(String name,
Map<String, Boolean> valueMap) {
if (isVMValue()) {
- // TODO
+ for (String key : valueMap.keySet()) {
+ vmValue.setAdvancedOptionSub(name, key, valueMap.get(key) ? VALUE_ON : VALUE_OFF);
+ }
} else if (isTemplateValue()) {
SubDevice subDevice = new SubDevice(name);
public Map<String, Boolean> getCheckBoxOptions(String name) {
Map<String, Boolean> valueMap = new HashMap<String, Boolean>();
- // TODO
if (isVMValue()) {
- // TODO
+ OptionType options = vmValue.getAdvancedOption(name);
+ if (options == null) {
+ return valueMap;
+ }
+ for (SubOptionType subOption : options.getSubOption()) {
+ valueMap.put(subOption.getName(), checkOn(subOption.getValue()));
+ }
} else if (isTemplateValue()) {
for (SubDevice subDevice : templateValue.getAdditionalDevices()) {
}
+ private static boolean checkOn(String onOffVal) {
+ if (onOffVal.equals(VALUE_ON)) {
+ return true;
+ } else {
+ return false;
+ }
+ }
// public
/*
package org.tizen.emulator.manager.ui.renewal.item.modify.comp;
import org.eclipse.swt.layout.GridData;
+import org.tizen.emulator.manager.ui.renewal.item.modify.common.ModifyDialogItem;
public class SubTreeModifyItem extends ModifyItem{
+ private final ModifyDialogItem dialogItem;
+ private final TreeModifyItem treeRoot;
+
+ public SubTreeModifyItem(ModifyDialogItem parentItem, TreeModifyItem treeRoot) {
+ this.dialogItem = parentItem;
+ this.treeRoot = treeRoot;
+ }
+
+ public ModifyDialogItem getDialogItem() {
+ return dialogItem;
+ }
+
+ public TreeModifyItem getTreeRoot() {
+ return treeRoot;
+ }
+
public void changeExpanding(boolean isExpand) {
GridData data = new GridData();
if (isExpand) {
import java.util.ArrayList;
import java.util.List;
-import org.tizen.emulator.manager.ui.renewal.item.modify.common.ModifyDialogItem;
-
public class TreeModifyItem extends ModifyItem{
- private ModifyDialogItem modifyDialogItem;
private final List<SubTreeModifyItem> subItemList = new ArrayList<SubTreeModifyItem>();
+ public List<SubTreeModifyItem> getSubItemList() {
+ return subItemList;
+ }
+
public void addSubItem(SubTreeModifyItem subItem) {
subItemList.add(subItem);
}
for (SubTreeModifyItem subItem : subItemList) {
subItem.changeExpanding(isExpand);
}
- modifyDialogItem.getDialog().layoutScrolledComposite();
+ getDialogItem().getDialog().layoutScrolledComposite();
}
- public void setModifyDialogItem(ModifyDialogItem modifyDialogItem) {
- this.modifyDialogItem = modifyDialogItem;
- }
}
import org.tizen.emulator.manager.ui.renewal.item.modify.common.ComboItem;
import org.tizen.emulator.manager.ui.renewal.item.modify.common.ModifyDialogItem;
import org.tizen.emulator.manager.ui.renewal.item.modify.comp.PropertyValue;
+import org.tizen.emulator.manager.ui.renewal.item.modify.comp.SubTreeModifyItem;
import org.tizen.emulator.manager.ui.renewal.item.modify.comp.TreeItemTitle;
import org.tizen.emulator.manager.ui.renewal.item.modify.comp.TreeModifyItem;
import org.tizen.emulator.manager.ui.renewal.widgets.ComboBox;
item = treeModifyItem;
}
+
+ public DeviceTemplate getDeviceTemplate() {
+ return template;
+ }
+
@Override
public void create(Composite parent) {
treeModifyItem.init(parent);
comboBox.addItem(temp.getValue().getName(), temp);
}
}
+
+ selectItem(false);
+// comboSelected();
}
@Override
@Override
public void setInitialValue(PropertyValue value) {
// TODO
- template = null;
+ template = value.getDeivceTemplate();
profile = ProfileList.getProfile(value.getProfile());
}
@Override
public void itemSelected(ComboBox comboBox) {
- // TODO change item list for selected template.
- System.out.println("item selected:" + comboBox.getSelectedItem());
+
template = (DeviceTemplate)comboBox.getSelectedData();
+ // - change item list value
+ for (SubTreeModifyItem subTree : treeModifyItem.getSubItemList()) {
+ ModifyDialogItem dialogItem = subTree.getDialogItem();
+ dialogItem.changeItemValue(new PropertyValue(template.getValue()));
+ }
}
@Override
public ModifyDialogItem cloneItem() {
return new DeviceTemplateItem();
}
+
+
+ private void selectItem(boolean notifySelect) {
+ if (comboBox == null || comboBox.isDisposed()) {
+ return;
+ }
+
+ // select item
+ int index = -1;
+ for (int i=0 ; i < getComboDataList().size() ; i++) {
+ if (getComboDataList().get(i).equals(template)) {
+ index = i;
+ System.out.println("template: " + template.getValue().getName());
+ System.out.println("index: " + i);
+ break;
+ }
+ }
+
+ if (index == -1) {
+ return; // TODO is return right? need custom template ?
+
+ }
+
+ selectComboItem(index, notifySelect);
+ }
}
*
*/
-
package org.tizen.emulator.manager.ui.renewal.widgets;
import java.util.ArrayList;
}
}
-
public Shell getParentShell() {
return parentShell;
}
addItem(items.size(), item);
}
-
public void addItem(int index, String item) {
addItem(index, item, null);
}
-
public void addItem(String item, Object data) {
addItem(items.size(), item, data);
}
-
public void addItem(int index, String item, Object data) {
try {
items.add(index, item);
- } catch (IndexOutOfBoundsException e) {
+ } catch (IndexOutOfBoundsException e) {
items.add(item);
}
}
}
-
@Override
public void redraw() {
textCanvas.redraw();
selectedIndex = index;
}
-
public int getSelectionIndex() {
return selectedIndex;
}
-
- public void select(int index) {
+ public void select(int index, boolean notifySelect) {
if (index < 0 || index >= items.size()) {
return;
}
selectedItem = items.get(index);
selectedData = datas.get(index);
- notifyListeners(SWT.Selection, new Event());
+ if (notifySelect) {
+ notifyListeners(SWT.Selection, new Event());
+ }
}
+ public void select(int index) {
+ select(index, true);
+ }
private void initBox() {
this.setLayout(new FormLayout());
}
-
private void createText() {
FormData data = new FormData();
data.left = new FormAttachment(0, TEXT_MARGIN_LEFT);
data.right = new FormAttachment(100, ARROW_AREA_WIDTH * -1);
data.top = new FormAttachment(0, 1);
- data.bottom = new FormAttachment(100,-1);
+ data.bottom = new FormAttachment(100, -1);
textCanvas = new Canvas(this, SWT.NONE);
textCanvas.setLayoutData(data);
drawText();
}
-
public void closeComboBox() {
popup.close();
}
@Override
public void paintControl(PaintEvent e) {
GC gc = e.gc;
- Rectangle rect = ((Canvas)e.widget).getBounds();
- gc.setForeground(ColorResources.CONTENT_FONT.getColor());
+ Rectangle rect = ((Canvas) e.widget).getBounds();
+ if (isDisabled()) {
+ gc.setForeground(ColorResources.TEXTBOX_DISABLE.getColor());
+
+ } else {
+ gc.setForeground(ColorResources.CONTENT_FONT.getColor());
+ }
gc.setFont(FontResources.CONTENT.getFont());
Point textExt = gc.textExtent(selectedItem);
int poxY = (rect.height - textExt.y) / 2;
});
}
+ public boolean isDisabled() {
+ return getState() == WSTATE.DISABLE_ON || getState() == WSTATE.DISABLE_OFF;
+ }
+
public void setText(String text) {
selectedItem = text;
redraw();
}
-
@Override
protected void draw(PaintEvent e) {
drawArrow(e);
}
+ @Override
+ public void setEnabled(boolean enabled) {
+ if (enabled) {
+ setState(WSTATE.NORMAL);
+ } else {
+ setState(WSTATE.DISABLE_ON);
+ }
+
+ super.setEnabled(enabled);
+
+ }
private void drawArrow(PaintEvent e) {
- // drawArrow
- Image image = getArrowImage();
- ImageData imageData = image.getImageData();
- GC gc = e.gc;
- Rectangle rect = ((Canvas)e.widget).getBounds();
- int posX = (rect.width - ARROW_AREA_WIDTH +
- (ARROW_AREA_WIDTH - imageData.width) /2 );
- int posY = (rect.height - imageData.height) / 2;
- gc.drawImage(image, posX, posY);
+
+ // draw only when enabled
+ if (!isDisabled()) {
+ Image image = getArrowImage();
+ ImageData imageData = image.getImageData();
+ GC gc = e.gc;
+ Rectangle rect = ((Canvas) e.widget).getBounds();
+ int posX = (rect.width - ARROW_AREA_WIDTH + (ARROW_AREA_WIDTH - imageData.width) / 2);
+ int posY = (rect.height - imageData.height) / 2;
+ gc.drawImage(image, posX, posY);
+ }
}
private Image getArrowImage() {
if (getState() == WSTATE.HOVER || getState() == WSTATE.SELECTED) {
if (arrowImageHover == null) {
- arrowImageHover = ImageResources.DROP_DOWN_ARROW_HOVER.getImage();
+ arrowImageHover = ImageResources.DROP_DOWN_ARROW_HOVER
+ .getImage();
}
return arrowImageHover;
}
}
-
private void addMouseListener() {
Listener mouseListener = new Listener() {
redraw();
}
- } else if (e.type == SWT.MouseExit) {
+ } else if (e.type == SWT.MouseExit) {
if (popup.isClosed()) {
setState(WSTATE.NORMAL);
redraw();
}
- } if (e.type == SWT.MouseUp) {
-// if (items.size() == 0) {
-// return;
-// }
- Rectangle rect = ((Canvas)e.widget).getClientArea();
+ } else if (e.type == SWT.MouseUp) {
+ // if (items.size() == 0) {
+ // return;
+ // }
+ Rectangle rect = ((Canvas) e.widget).getClientArea();
if (rect.contains(e.x, e.y)) {
- setState(getState() == WSTATE.SELECTED ? WSTATE.HOVER : WSTATE.SELECTED);
+ setState(getState() == WSTATE.SELECTED ? WSTATE.HOVER
+ : WSTATE.SELECTED);
redraw();
+ ((Composite)e.widget).setFocus();
popup.changePopup();
}
}
private static void initNinePatchResourceMap() {
ninePatchResourceMap = new NinePatchResourceMap();
ninePatchResourceMap.setImages(WSTATE.NORMAL, ColorResources.WHITE,
- ColorResources.BLACK,
- ImageResources.DROP_DOWN_BOX_NORMAL_LT,
+ ColorResources.WHITE, ImageResources.DROP_DOWN_BOX_NORMAL_LT,
ImageResources.DROP_DOWN_BOX_NORMAL_T,
ImageResources.DROP_DOWN_BOX_NORMAL_RT,
ImageResources.DROP_DOWN_BOX_NORMAL_R,
ImageResources.DROP_DOWN_BOX_NORMAL_L);
ninePatchResourceMap.setImages(WSTATE.HOVER, ColorResources.WHITE,
- ColorResources.BLACK,
- ImageResources.DROP_DOWN_BOX_HOVER_LT,
+ ColorResources.WHITE, ImageResources.DROP_DOWN_BOX_HOVER_LT,
ImageResources.DROP_DOWN_BOX_HOVER_T,
ImageResources.DROP_DOWN_BOX_HOVER_RT,
ImageResources.DROP_DOWN_BOX_HOVER_R,
ImageResources.DROP_DOWN_BOX_HOVER_L);
ninePatchResourceMap.setImages(WSTATE.SELECTED, ColorResources.WHITE,
- ColorResources.BLACK,
- ImageResources.DROP_DOWN_BOX_SELECTED_LT,
+ ColorResources.WHITE, ImageResources.DROP_DOWN_BOX_SELECTED_LT,
ImageResources.DROP_DOWN_BOX_SELECTED_T,
ImageResources.DROP_DOWN_BOX_SELECTED_RT,
ImageResources.DROP_DOWN_BOX_SELECTED_R,
ImageResources.DROP_DOWN_BOX_SELECTED_LB,
ImageResources.DROP_DOWN_BOX_SELECTED_L);
+ ninePatchResourceMap.setImages(WSTATE.DISABLE_ON, ColorResources.WHITE,
+ ColorResources.WHITE, ImageResources.TEXT_INPUT_BOX_NORMAL_LT,
+ ImageResources.TEXT_INPUT_BOX_NORMAL_T,
+ ImageResources.TEXT_INPUT_BOX_NORMAL_RT,
+ ImageResources.TEXT_INPUT_BOX_NORMAL_R,
+ ImageResources.TEXT_INPUT_BOX_NORMAL_RB,
+ ImageResources.TEXT_INPUT_BOX_NORMAL_B,
+ ImageResources.TEXT_INPUT_BOX_NORMAL_LB,
+ ImageResources.TEXT_INPUT_BOX_NORMAL_L);
}
}
createText();
}
+ @Override
+ public void setEnabled(boolean enabled) {
+ if (enabled) {
+ setState(WSTATE.NORMAL);
+ text.setForeground(ColorResources.CONTENT_FONT.getColor());
+ } else {
+ setState(WSTATE.DISABLE_ON);
+ text.setForeground(ColorResources.TEXTBOX_DISABLE.getColor());
+ }
+ super.setEnabled(enabled);
+
+ }
+
+ @Override
+ public void redraw() {
+ super.redraw();
+ text.redraw();
+ }
@Override
public NinePatchResourceMap getNinePatchResourceMap() {
ImageResources.TEXT_INPUT_BOX_SELECT_LB,
ImageResources.TEXT_INPUT_BOX_SELECT_L);
+ ninePatchResourceMap.setImages(WSTATE.DISABLE_ON, ColorResources.WHITE,
+ ColorResources.BLACK, ImageResources.TEXT_INPUT_BOX_NORMAL_LT,
+ ImageResources.TEXT_INPUT_BOX_NORMAL_T,
+ ImageResources.TEXT_INPUT_BOX_NORMAL_RT,
+ ImageResources.TEXT_INPUT_BOX_NORMAL_R,
+ ImageResources.TEXT_INPUT_BOX_NORMAL_RB,
+ ImageResources.TEXT_INPUT_BOX_NORMAL_B,
+ ImageResources.TEXT_INPUT_BOX_NORMAL_LB,
+ ImageResources.TEXT_INPUT_BOX_NORMAL_L);
}
}
if (newVM.screenSize != oldVM.screenSize) {
+ if (property.getConfiguration().getDevice().getDisplay().getScreenSize() == null) {
+ property.getConfiguration().getDevice().getDisplay().setScreenSize(
+ EmulatorVMList.getInstance().getObjectFactory().createDisplayTypeScreenSize());
+ }
property.getConfiguration().getDevice().getDisplay().getScreenSize().setValue(newVM.screenSize);
}